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.
It introduces a new option to pysam.AlignedSegment.get_aligned_pairs: skip_soft_clipping
Soft clipping are discarded (similarly to what happens to them with the matches_only), but keeps all other features (matches, inserts, deletions, skip and padding).
I've expanded the test to cover the modified line 2052, making sure that soft-clippings are discarded, whereas inserts and padding remain unaffected by the new option.
This pull request addresses issue #1292.
It introduces a new option to pysam.AlignedSegment.get_aligned_pairs:
skip_soft_clipping
Soft clipping are discarded (similarly to what happens to them with the matches_only), but keeps all other features (matches, inserts, deletions, skip and padding).I've expanded the test to cover the modified line 2052, making sure that soft-clippings are discarded, whereas inserts and padding remain unaffected by the new option.