Kennedy-Lab-UW / Duplex-Sequencing

Other
57 stars 34 forks source link

AttributeError wtih pysam #43

Closed jpoell closed 7 years ago

jpoell commented 7 years ago

When running the UnifiedConsensusMaker.py on an unaligned bam-file I get the following error:

Parsing tags... Traceback (most recent call last): File "CapSeq_muts/UnifiedConsensusMaker.py", line 326, in main() File "CapSeq_muts/UnifiedConsensusMaker.py", line 140, in main temp_bam_entry.set_tag('X?', temp_read1_entry.query_name, 'Z') AttributeError: 'pysam.calignmentfile.AlignedSegment' object has no attribute 'set_tag'

I have created the unaligned bam-file as specified with FastqToSam using Picard-2.8.3 (only using the arguments required for paired end: F1, F2, O, and SM). I have the following dependencies installed: Samtools-1.3.1 Pysam-0.10.0 I ran the python-script using only the required arguments input and prefix.

Do you have any idea what caused the error and how I might resolve the issue?

scottrk commented 7 years ago

I'm going to guess that the set_tag method has been deprecated in the newest versions of pysam. Try the 0.9.x series, as that is what it was written for.

On Feb 14, 2017, at 4:35 AM, jpoell notifications@github.com wrote:

When running the UnifiedConsensusMaker.py on an unaligned bam-file I get the following error:

Parsing tags... Traceback (most recent call last): File "CapSeq_muts/UnifiedConsensusMaker.py", line 326, in main() File "CapSeq_muts/UnifiedConsensusMaker.py", line 140, in main temp_bam_entry.set_tag('X?', temp_read1_entry.query_name, 'Z') AttributeError: 'pysam.calignmentfile.AlignedSegment' object has no attribute 'set_tag'

I have created the unaligned bam-file as specified with FastqToSam using Picard-2.8.3 (only using the arguments required for paired end: F1, F2, O, and SM). I have the following dependencies installed: Samtools-1.3.1 Pysam-0.10.0 I ran the python-script using only the required arguments input and prefix.

Do you have any idea what caused the error and how I might resolve the issue?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

jpoell commented 7 years ago

That was in fact the problem. I guess I should've figured that one out myself, but at least now you know about this issue as well. Everything is running smoothly now. Thanks for the great program, it works wonders for my application!