From f56e8405bab9d7ae128d6fa38c09dab3c8c151d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kusalananda=20K=C3=A4h=C3=A4ri?= <ak4@sanger.ac.uk> Date: Thu, 27 Oct 2011 13:44:53 +0000 Subject: [PATCH] In internal_id_rescore(): sort out possible bug. --- modules/Bio/EnsEMBL/IdMapping/ScoreBuilder.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/Bio/EnsEMBL/IdMapping/ScoreBuilder.pm b/modules/Bio/EnsEMBL/IdMapping/ScoreBuilder.pm index 05c5f512b2..e556f04987 100644 --- a/modules/Bio/EnsEMBL/IdMapping/ScoreBuilder.pm +++ b/modules/Bio/EnsEMBL/IdMapping/ScoreBuilder.pm @@ -190,7 +190,8 @@ sub internal_id_rescore { my $ambiguous = 0; foreach my $e (@entries) { - if ( $e->target == $source and $e->score == $entries[0] ) { + if ( $e->target == $source and $e->score == $entries[0]->score() ) + { $ambiguous = 1; last; } @@ -201,7 +202,8 @@ sub internal_id_rescore { # now penalise those where source id != target id and score == best # score foreach my $e (@entries) { - if ( $e->target != $source and $e->score == $entries[0] ) { + if ( $e->target != $source and $e->score == $entries[0]->score() ) + { # PENALTY: This stable ID is not any longer on the same object. $matrix->set_score( $source, $e->target(), 0.8*$e->score() ); $i++; -- GitLab