chloroExtractorTeam / chloroExtractor

MIT License
4 stars 8 forks source link

chloroExtractor dies with error message progress bar already finished #128

Closed Joyvalley closed 5 years ago

Joyvalley commented 5 years ago

When running chloroExtractor on simulated data I consistently get this error message:

[Thu Apr 11 11:55:08 2019] Loading kmer hash:  99%
[Thu Apr 11 11:55:08 2019] Loading kmer hash: 100%
[Thu Apr 11 11:55:08 2019] Loading kmer hash: 100%
progress bar already finished at /opt/chloroExtractor/bin/kmer_filter_reads.pl line 398.
[19-04-11 11:55:08] [PipeWrap] kfr2 exited:7424 
[19-04-11 11:55:08] [PipeWrap]  at /opt/chloroExtractor/bin/../lib/PipeWrap.pm line 153.

After some digging it looks like kmer_filter_reads.pl tries to update the Term::ProgressBar with a value higher than the count used for initialization. This results in an exception:

This example does not call $progress->update($max); at the end, since it is unnecessary, and ProgressBar will throw an exception at an attempt to update a finished bar.

greatfireball commented 5 years ago

Thanks for the report, I will try to build a fix asap.