Yea, it is an old version that came along with the Enthought Python Distribution. Got it sorted out.
• 0 views
•
link
I am using Pysam to process a bam file containing paired reads. However, I get the error
AttributeError: 'csamtools.AlignedRead' object has no attribute 'rnext'
when I try to extract the chromosome that the mate of a read is aligned to. What am I doing wrong?
for row in samfile:
print(samfile.getrname(row.rname)+' '+samfile.getrname(row.rnext))
It gives the read's reference properly, however it gives an error for the mate's reference.
Yea, it is an old version that came along with the Enthought Python Distribution. Got it sorted out.
Log in to answer this question.
There are known issues with insufficient documentation for pysam. If you are comfortable with perl, you can try Bio::DB::Sam instead. It will do the same job with enough documentation for troubleshooting.