Pysam is a Python package for reading, manipulating, and writing genomics data such as SAM/BAM/CRAM and VCF/BCF files. It's a lightweight wrapper of the HTSlib API, the same one that powers samtools, bcftools, and tabix.
I’ve used pysam with this patch for a while and find it very valuable when looking at AlignedSegments in a debugger or the REPL.
I’ve chosen to include only the (from my perspective) most important attributes so that the output doesn’t become too long, in particular when there’s a list with AlignedSegments.
The angle brackets are supposed to convey that the string cannot be passed to eval() to recreate the object. I’d be fine with removing them.
Before:
After:
I’ve used pysam with this patch for a while and find it very valuable when looking at
AlignedSegment
s in a debugger or the REPL.I’ve chosen to include only the (from my perspective) most important attributes so that the output doesn’t become too long, in particular when there’s a list with
AlignedSegment
s.The angle brackets are supposed to convey that the string cannot be passed to
eval()
to recreate the object. I’d be fine with removing them.