The methods HTSeq.BAM_reader and HTSeq.SAM_reader create errors when parsing CIGAR alignment data using HTSeq version 0.6.1.
BAM error:
Traceback (most recent call last):
File "genes2samples.py", line 74, in <module>
for almnt in almnt_file:
File "/global/homes/a/arrivers/lib/python/python2.7/site-packages/HTSeq-0.6.1-py2.7-linux-x86_64.egg/HTSeq/init.py", line 946, in iter
yield SAM_Alignment.from_pysam_AlignedRead( pa, sf )
File "_HTSeq.pyx", line 1238, in HTSeq._HTSeq.SAM_Alignment.from_pysam_AlignedRead (src/_HTSeq.c:24106)
File "_HTSeq.pyx", line 1163, in HTSeq._HTSeq.build_cigar_list (src/_HTSeq.c:22745)
ValueError: Unknown CIGAR code '=' encountered.
SAM error:
Traceback (most recent call last):
File "genes2samples.py", line 74, in <module>
for almnt in almnt_file:
File "/global/homes/a/arrivers/lib/python/python2.7/site-packages/HTSeq-0.6.1-py2.7-linux-x86_64.egg/HTSeq/init.py", line 536, in iter
algnt = SAM_Alignment.from_SAM_line( line )
File "_HTSeq.pyx", line 1300, in HTSeq._HTSeq.SAM_Alignment.from_SAM_line (src/_HTSeq.c:24997)
File "_HTSeq.pyx", line 1116, in HTSeq._HTSeq.parse_cigar (src/_HTSeq.c:21711)
ValueError: ("Illegal CIGAR string '1X3=1X5=1X5=2X1=1X6=3X2=1X2=1X26='", 'line 6391847 of file ../../../../results/mapping/sam/BH73_118.sam')