Skip to content

pysam-0.14

Compare
Choose a tag to compare
@AndreasHeger AndreasHeger released this 09 Feb 23:04
· 666 commits to master since this release
af6ff23

This release wraps htslib/samtools versions 1.7.0.

  • SAM/BAM/CRAM headers are now managed by a separate AlignmentHeader
    class.

  • AlignmentFile.header.as_dict() returns an ordered dictionary.

  • Use "stop" instead of "end" to ensure consistency to
    VariantFile. The end designations have been kept for backwards
    compatibility.

  • [#611] and [#293] CRAM repeated fetch now works, each iterator
    reloads index if multiple_iterators=True

  • [#608] pysam now wraps htslib 1.7 and samtools 1.7.

  • [#580] reference_name and next_reference_name can now be set to "*"
    (will be converted to None to indicate an unmapped location)

  • [#302] providing no coordinate to count_coverage will not count from
    start/end of contig.

  • [#325] @sq records will be automatically added to header if they are
    absent from text section of header.

  • [#529] add get_forward_sequence() and get_forward_qualities()
    methods

  • [#577] add from_string() and to_dict()/from_dict() methods to
    AlignedSegment. Rename tostring() to to_string() throughout for
    consistency

  • [#589] return None from build_alignment_sequence if no MD tag is set

  • [#528] add PileupColumn.len method

Backwards incompatible changes:

  • AlignmentFile.header now returns an AlignmentHeader object. Use
    AlignmentFile.header.to_dict() to get the dictionary as
    previously. Most dictionary accessor methods (keys(), values(),
    getitem, ...) have been implemented to ensure some level of
    backwards compatibility when only reading.

    The rationale for this change is to have consistency between
    AlignmentFile and VariantFile.

  • AlignmentFile and FastaFile now raise IOError instead of OSError

Medium term we plan to have a 1.0 release. The pysam
interface has grown over the years and the API is cluttered with
deprecated names (Samfile, getrname(), gettid(), ...). To work towards
this, the next release (0.15.0) will yield DeprecationWarnings
for any parts of the API that are considered obsolete and will not be
in 1.0. Once 1.0 has been reached, we will use semantic versioning.