BSSeeker / BSseeker2

A versatile aligning pipeline for bisulfite sequencing data
http://pellegrini.mcdb.ucla.edu/BS_Seeker2/
MIT License
60 stars 25 forks source link

'pysam.libcalignedsegment.PileupRead' object has no attribute 'qpos' #32

Open joybio opened 4 years ago

joybio commented 4 years ago

Thank you for this project. I have however reached a barrier I can't seem to cross and need your help. Error report: Traceback (most recent call last): File "/home/l/backup1/software/BSseeker2-2.1.1/bs_seeker2-call_methylation.py", line 289, in pr_qpos =pr.qpos AttributeError: 'pysam.libcalignedsegment.PileupRead' object has no attribute 'qpos'

Here is the question, when I read the source code in line 289, It says: # for pr in col.pileups:

print pr

        if pysam.__version__ > "0.8.0" :
            pr_qpos = pr.query_position
        else :
            pr_qpos =pr.qpos
        #

But the version of my pysam is "0.14.0". why "pr_qpos =pr.qpos" P.S. When I delete the if-else and retain "pr_qpos = pr.query_position", it seems work.