Skip to content

Commit

Permalink
Merge pull request #93 from chloroExtractorTeam/fix_scr_tlen_spfaff
Browse files Browse the repository at this point in the history
fixed critical bug, scale_reads - no value in  / divided by zero
fixes #95
  • Loading branch information
greatfireball authored Feb 16, 2018
2 parents 3be770c + ca4f2db commit c8941e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/scale_reads.pl
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ =head1 CODE

my $c;
my $tlen_sum;
my $seqwithtlen;
my $seqwithtlen = 0;


while(my $aln = $sp->next_aln()){
Expand Down Expand Up @@ -389,7 +389,8 @@ =head1 CODE
print "coverage\t", $current_cov, "\n";
print "genome_size\t", $genome_size, "\n";
print "target_coverage\t", $opt{target_coverage}, "\n";
print "insert_size\t", int($tlen_sum/$seqwithtlen), "\n";
if ($seqwithtlen > 0){ print "insert_size\t", int($tlen_sum/$seqwithtlen), "\n";}
else {print "insert_size\tNA\n";}
print "closest_ref\t", $closest_ref || 'NA', "\n";


Expand Down

0 comments on commit c8941e6

Please sign in to comment.