chloroExtractorTeam / chloroExtractor

MIT License
4 stars 8 forks source link

fixed critical bug, scale_reads - no value in / divided by … #93

Closed PfaffS closed 6 years ago

PfaffS commented 6 years ago

10 / 11 data set died with the message

Reading seed kmers
Reading total kmers
Plotting seed and total kmers
Use of uninitialized value $seqwithtlen in division (/) at /opt/chloroExtractor/bin/scale_reads.pl line 392, <R> line 10.
Use of uninitialized value $tlen_sum in division (/) at /opt/chloroExtractor/bin/scale_reads.pl line 392, <R> line 10.
Illegal division by zero at /opt/chloroExtractor/bin/scale_reads.pl line 392, <R> line 10.

Here the fix for it, the var was not initialized and when the insert size can't calculated it would die to this error.

Tested with 3 sets ( Demo set - allready worked, still works. And 2 sets where it died, now it finds several contigs but none complete chloroplast)

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.09%) to 72.3% when pulling ca4f2dbee11a00bed13baeb6b28632bfdc221792 on fix_scr_tlen_spfaff into 3be770cd84efac56606339e8aa24de8d1a75a627 on master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.09%) to 72.3% when pulling ca4f2dbee11a00bed13baeb6b28632bfdc221792 on fix_scr_tlen_spfaff into 3be770cd84efac56606339e8aa24de8d1a75a627 on master.

greatfireball commented 6 years ago

Two little comments:

Thanks!

greatfireball commented 6 years ago

The fix is approved

greatfireball commented 6 years ago

Thanks for your fix and the requested modifications. This fix addresses #95

Can you provide some short reads to write a test for that bug?