You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got an error that seems to be related to pysam (version 0.20.0 with python 3.10.9):
Traceback (most recent call last):
File "/usr/share/NanoMethPhase/nanomethphase.py", line 2242, in <module>
main()
File "/usr/share/NanoMethPhase/nanomethphase.py", line 2236, in main
args.func(args)
File "/usr/share/NanoMethPhase/nanomethphase.py", line 1194, in main_phase
alignmentwriter(result, outHP22BisSam)
File "/usr/share/NanoMethPhase/nanomethphase.py", line 411, in alignmentwriter
out_samRead.set_tags(all_tags)
File "pysam/libcalignedsegment.pyx", line 2656, in pysam.libcalignedsegment.AlignedSegment.set_tags
File "pysam/libcalignedsegment.pyx", line 385, in pysam.libcalignedsegment.pack_tags
AttributeError: module 'array' has no attribute 'typecode'
There is no `array.typecode` class attribute, so the `array.array`
arm produced an AttributeError instead of the intended ValueError.
Perhaps `value.typecode` was intended; but this error only arises
when a `value_type` has been specified, so the array's typecode
has no influence on `typecode` anyway. So we simplify the message.
Also add a similar check in the scalar arm of this if-else to avoid
an invalid `typecode` here being reported as a raw KeyError.
Fixespysam-developers#1233. Closespysam-developers#1235 -- hat tip @marcus1487 for issue analysis.
[TODO] All this code is confusing and should be rewritten using
HTSlib's more recent aux field manipulation APIs.
The AttributeError was a pysam bug. Some of the tagged fields being added in out_samRead.set_tags(all_tags) must have had invalid value types, and future pysam will report this via a more useful message.
I got an error that seems to be related to pysam (version 0.20.0 with python 3.10.9):
One line in my BAM:
My guess is that some tags in my BAM are not compatible with pysam. Any help? Thanks.
The text was updated successfully, but these errors were encountered: