Closed JohnReid closed 8 years ago
Thanks for the bug report John!
I've noticed that pySAM has actually deprecated aend
, so I'll fix that as well so pyDNase doesn't suddenly stop working.
By default, pyDNase just takes all the reads provided to it in the BAM - letting the user decide whether badly mapped/secondary alignments should be utilised. I (stupidly) never handled the situation where unmapped reads may be present in the BAM, and likewise, because not a lot of people are doing paired end alignment for DNase-seq (at least, none of the public data is), I didn't handle ignoring non-primary paired alignments.
For the minimum, I've changed it to only process mapped reads (see 4aca97feefe019f7103c0ec14f7b65844c8d359c) and I'll try to release this to master today, which should fix your issue.
For paired end reads, there's a lot of considerations. I'm thinking a command line flag to ignore secondary alignments or not, but I'll think about this a bit more before implementing something here -opinions and input welcome!
Great thanks for the quick response! I can't say I have any opinions on the secondary alignments as I'm a bit new to this read mapping and still trying to get the hang of it. If I suddenly form some strong opinions I'll be sure to let you know!
Hi, I have been running into a problem where
alignedread.aend
returnsNone
occasionally andwellington_footprints.py
exists with the following stack trace:The docs for pysam say
I thought all the reads were aligned but I could be wrong (I am a bit new to read mapping and DNase-seq and the data has come from a third party).
Is there any way for
wellington_footprints.py
to handle these problems gracefully rather than crashing? Can it just ignore these reads? This only seems to happen for reads mapped to the reverse strand:alignedread.pos
is neverNone
.And thanks for your nice software :)