Skip to content

v0.23.0

Latest
Compare
Choose a tag to compare
@jmarshall jmarshall released this 05 Feb 10:29
· 2 commits to master since this release
v0.23.0

This pysam release wraps htslib/samtools/bcftools 1.21 (PR #1310).

It has been tested with Python versions 3.6 through 3.13, and wheels are available via PyPI for all of those Python versions. Python versions 3.6 through 3.8 are end-of-life; particularly if you use pysam with one of these versions, please vote in the version survey at issue #1230.

This is expected to be the last release supporting Python 3.6 and 3.7.

Bugs fixed:

  • Fix pysam.samtools.command(save_stdout=filename) redirection of output to a file. (#677, reported by @haowenz and analysed by @yhoogstrate)

  • Reinstate HTTPS/S3/GCS support in pre-built Linux wheels when used on Debian and Ubuntu: these wheels now work around the discrepancy between Red Hat and Debian CA Certificate file locations. (#1257, #1268, reported by @daisieh and @litaifang)

  • Calling VariantHeader.new_record() repeatedly with the same samples object now sets GT correctly every time. (#1308, reported by @awgymer)

  • Correct the exception produced when AlignedSegment.set_tags() is used with an invalid value type. (#1233, PR #1235, reported by @weishwu and @marcus1487)

  • Numerous type hinting corrections. (#1298, #1316, PR #1296, PR #1306, PR #1313, PR #1315, thanks to @vepain, @awgymer, @mshunjan, and @msto)

  • The undocumented pysam.samtools.import_() alias for invoking samtools import has been removed; use pysam.samtools.fqimport() instead.

  • Corrections to several test data files to account for HTSlib 1.20 and later's improved validity checking. (#1291, reported by @SoapGentoo; etc)

New functionality:

  • AlignedSegment.get_aligned_pairs() now optionally returns the associated CIGAR operator in each position tuple. (#1292, PR #1294, thanks to @LaraFuhrmann and @DrYak)

  • New AlignmentFile.flush() and VariantFile.flush() methods for flushing buffered output to streams. (#1299, requested by @blex-max)

  • Improved str() for AlignedSegment now displays reference sequence names when they are available and uses #N only when necessary. (#1318, requested by @creaturemoon)

  • Implement repr() for AlignedSegment so that it displays the most useful fields. (PR #1267, thanks to @marcelm)

  • Pysam's tests can now be run in parallel. (#1284, reported by @yurivict)

Documentation improvements: