mdshw5 / fastqp

Simple FASTQ quality assessment using Python
https://pypi.python.org/pypi/fastqp
MIT License
108 stars 14 forks source link

Bug in count-duplicates feature #20

Closed edurand closed 8 years ago

edurand commented 8 years ago

Running fastqp input.bam -o output -d raises UnboundLocalError: local variable 'ScalableBloomFilter' referenced before assignment

The bug can be traced to cli.py lines 132-133 and 138-139. The order of two blocks need to be reversed (or better, the two blocks need to be merged since they are testing for the same thing), so that ScalableBloomFilter is imported before it's used.

mdshw5 commented 8 years ago

Thanks, @edurand. This is kind of a silly error and I guess I should point out that the duplicate calculations are probably wildly underestimated if you're using the default sampling of 2M reads. I guess if you're evaluating all the reads in a file then this is a useful feature, so maybe I'll add a warning or mutually exclusive arguments that prevent misinterpretation of this value.