bmvdgeijn / WASP

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

AttributeError: 'pysam.csamtools.AlignedRead' object has no attribute 'next_reference_name' #54

Open boxiangliu opened 8 years ago

boxiangliu commented 8 years ago

Hi Graham,

I got this error when running rmdup_pe.py. My pysam distribution is 0.9.1.4 (latest).

This error is specific to v0.2.1 as v0.1 can run without problem.

Bosh

gmcvicker commented 8 years ago

Hi Bosh,

I haven't been able to reproduce your problem, but I think that it could potentially be due to some unmapped reads in the input file. I have added a couple checks to rmdup_pe.py for unmapped reads and unmapped mates. Can you pull the latest version (https://github.com/bmvdgeijn/WASP/commit/32a2ea036aaeccf609202f9e8331cf37cce86cb5) and try again?

Thanks,

Graham

AmandaJLea commented 8 years ago

Hi Graham,

I'm getting the same error while running find_intersecting_snps.py. I don't have any unmapped reads in my bam files. Any idea what the issue could be? Thanks,

Amanda

gmcvicker commented 8 years ago

I think it may be due to a pysam version issue, although Bosh says that he is using the latest version of pysam. I just added some code to find_intersecting_snps.py and to rmdup_pe.py to both print out the pysam version and give an error message if the version of pysam is less than 0.8.4. Can both of you pull the latest commit (https://github.com/bmvdgeijn/WASP/commit/bfd622c0e5abbb06b6f91a2bc5276156075e84d9) to the master branch and re-run either rmdup_pe.py or find_intersecting_snps.py? If you could provide me with the output from the script (including pysam version) that would be helpful.

AmandaJLea commented 8 years ago

Hi Graham,

Thanks for getting to this so quickly. I just updated my pysam to 0.9.1.4 and ran the new version of find_intersecting_snps.py. It's working well now, seems like it was a pysam version issue.

Thanks again!

Amanda