From 6b4713ecd929c295ceb40dc55d5cb2389436103d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kusalananda=20K=C3=A4h=C3=A4ri?= <ak4@sanger.ac.uk> Date: Mon, 8 Aug 2011 10:57:30 +0000 Subject: [PATCH] In build_overlap_scores(): Only add target if $add_target is non-zero, just as is done for adding source. --- modules/Bio/EnsEMBL/IdMapping/ExonScoreBuilder.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/Bio/EnsEMBL/IdMapping/ExonScoreBuilder.pm b/modules/Bio/EnsEMBL/IdMapping/ExonScoreBuilder.pm index 2faa001c4c..212ed030f3 100644 --- a/modules/Bio/EnsEMBL/IdMapping/ExonScoreBuilder.pm +++ b/modules/Bio/EnsEMBL/IdMapping/ExonScoreBuilder.pm @@ -230,13 +230,14 @@ sub build_overlap_scores { my $add_target = 0; # compare exon containers - if ($source_ec and $target_ec) { - my $cmp = $self->compare_exon_containers($source_ec, $target_ec); - $add_source = 1 if ($cmp <= 0); - $add_target = 1 if ($cmp >= 0); + if ( $source_ec and $target_ec ) { + my $cmp = + $self->compare_exon_containers( $source_ec, $target_ec ); + if ( $cmp <= 0 ) { $add_source = 1 } + if ( $cmp => 0 ) { $add_target = 1 } } elsif ($source_ec) { $add_source = 1; - } else { + } elsif ($target_ec) { $add_target = 1; } -- GitLab