bmvdgeijn / WASP

WASP: allele-specific pipeline for unbiased read mapping and molecular QTL discovery
Apache License 2.0
103 stars 51 forks source link

filter_remapped_reads.py #106

Open p4rkerw opened 3 years ago

p4rkerw commented 3 years ago

The latest version of filter_remapped_reads.py now gives the following error:

Traceback (most recent call last): File "/WASP/mapping/filter_remapped_reads.py", line 307, in main(options.to_remap_bam, options.remap_bam, options.keep_bam) File "/WASP/mapping/filter_remapped_reads.py", line 301, in main write_reads(to_remap_bam, keep_bam, keep_reads, bad_reads, cigar_strings) File "/WASP/mapping/filter_remapped_reads.py", line 275, in write_reads if (read.cigarstring in cigar_strings[read.qname][0]): TypeError: 'set' object is not subscriptable

The previous version of the script runs as expected with the following output: keep_reads: 2097757 bad_reads: 65912 discard_reads: 59095 (of which 52359 remapped with a different cigar)

Any thoughts on how to troubleshoot this issue?

Thanks! Parker

gmcvicker commented 3 years ago

Hi Parker,

Thank you for catching this. It was a bug introduced with the latest update and only affected single-end reads. I have made a fix and pushed it to the repo.

Thank you,

Graham

gmcvicker commented 3 years ago

Here is the fix: https://github.com/bmvdgeijn/WASP/commit/d3b8447fd7719fffa00b856fd1f27c845554693e