Skip to content

Commit 7cf1932

Browse files
committed
Undefined corByAnnot
1 parent 166bd9c commit 7cf1932

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

LABEL_RES/scripts/evaluateResults.pl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,12 @@ ($)
196196
print STDOUT sprintf( "%10s\t%5s\t%5s\t%6s\n", 'CLADE', 'TP', 'Num', '%Acc' );
197197
print STDOUT '--------------------------------------', "\n";
198198
foreach my $anno ( sort { $a cmp $b } keys(%annots) ) {
199-
print sprintf( "%10s\t%5d\t%5d\t%5.1f%%\n",
200-
$anno, $corByAnno{$anno}, $annots{$anno}, ( 100 * $corByAnno{$anno} / $annots{$anno} ) );
199+
if ( defined $corByAnno{$anno} ) {
200+
print sprintf( "%10s\t%5d\t%5d\t%5.1f%%\n",
201+
$anno, $corByAnno{$anno}, $annots{$anno}, ( 100 * $corByAnno{$anno} / $annots{$anno} ) );
202+
} else {
203+
print sprintf( "%10s\t%5d\t%5d\t%5.1f%%\n", $anno, 0, $annots{$anno}, 0 );
204+
}
201205
}
202206
print STDOUT '--------------------------------------', "\n";
203207
print STDOUT sprintf( "%10s\t%5d\t%5d\t%5.1f%%\n", 'TOTAL', $correct, $total, ( 100 * $correct / $total ) );

0 commit comments

Comments
 (0)