Commit fbded075 authored by Sebastien Moretti's avatar Sebastien Moretti
Browse files

Fix when all blast hits fail to be aligned + clean debug prints

parent 1e1122f7
......@@ -387,6 +387,7 @@ for(my $r=0; $r<=$#original_names; $r++){
# Align Nt seq with our protein query seq
my ($POS, $BOJ) = runExonerate($cache, $date, $r, $original_seq[$r], $fasta_header, @nt_GIs);
next HIT_LINK if ( !defined $POS );
my ($POSresult, $bestNucleotide) = prepareResults4CDS($POS, $equivalent_blast_hits[$qq], $original_seq[$r], $fasta_header);
$resultPOS .= $POSresult if ( $bestNucleotide ne '' && $POSresult ne '' && $resultPOS !~ /_G_$bestNucleotide/ );
......@@ -837,7 +838,7 @@ sub fetch {
return $content;
}
}
print "ERROR: Problem with NCBI eutils, please try again later\n";
print "\n\tERROR: Problem with NCBI eutils, please try again later\n";
exit(40);
}
......@@ -869,7 +870,7 @@ sub fetch_fasta {
}
print {*STDERR} "[[$url]]\n" if ( $debug );
unlink("$outfile");
print "ERROR: Problem with NCBI eutils, please try again later.\n";
print "\n\tERROR: Problem with NCBI eutils, please try again later.\n";
exit(45);
}
......@@ -1116,22 +1117,17 @@ sub testPositions{
my @cles = sort({$a <=> $b} keys(%$best_pos));
if ( !exists($cles[0]) ){
print {*STDERR} keys(%positions), " 1\n";
return(\%positions);
}
else{
print {*STDERR} keys(%positions), " 2\n";
return(\%positions) if ( exists($cles[0]) && $#cles < $#clefs );
print {*STDERR} keys(%$best_pos), " 3\n";
return($best_pos) if ( exists($cles[0]) && $#cles >= $#clefs );
}
}
elsif ( %$best_pos ne 0 ){
print {*STDERR} keys(%$best_pos), " 4\n";
return($best_pos);
}
else{
print {*STDERR} keys(%positions), " 5\n";
return(\%positions);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment