Skip to content

Releases: pysam-developers/pysam

pysam-0.12.0

24 Aug 20:04
Compare
Choose a tag to compare

This release wraps htslib/samtools/bcftools versions 1.5.0 and
contains a series of bugfixes.

  • [#473] A new FastxRecord class that can be instantiated from class and
    modified in-place. Replaces PersistentFastqProxy.
  • [#521] In AligmentFile, Simplify file detection logic and allow remote index files
    • Removed attempts to guess data and index file names; this is magic left
      to htslib.
    • Removed file existence check prior to opening files with htslib
    • Better error checking after opening files that raise the appropriate
      error (IOError for when errno is set, ValueError otherwise for backward
      compatibility).
    • Report IO errors when loading an index by name.
    • Allow remote indices (tested using S3 signed URLs).
    • Document filepath_index and make it an alias for index_filename.
    • Added a require_index parameter to AlignmentFile
  • [#526] handle unset ref when creating new records
  • [#513] fix bcf_translate to skip deleted FORMAT fields to avoid
    segfaults
  • [#516] expose IO errors via IOError exceptions
  • [#487] add tabix line_skip, remove 'pileup' preset
  • add FastxRecord, replaces PersistentFastqProxy (still present for
    backwards compatibility)
  • [#496] upgrade to htslib/samtools/bcftools versions 1.5
  • add start/stop to AlignmentFile.fetch() to be consistent with
    VariantFile.fetch(). "end" is kept for backwards compatibility.

Upcoming changes:

In the next release we are plannig to separate the header information
from AlignmentFile into a separate class AlignmentHeader. This layout
is similar to VariantFile/VariantHeader. With this change we will
ensure that an AlignedSegment record will be linked to a header so
that chromosome names can be automatically translated from the numeric
representation. As a consequence, the way new AlignedSegment records
are created will need to change as the constructor requires a header::

header = pysam.AlignmentHeader(
    reference_names=["chr1", "chr2"],
    reference_lengths=[1000, 1000])
    
read = pysam.AlignedSegment(header)

This will affect all code that instantiates AlignedSegment objects
directly. We have not yet merged to allow users to provide feed-back.
The pull-request is here: #518
Please comment on github.

pysam-0.11.2.2

11 Jun 13:24
Compare
Choose a tag to compare

Bugfix release to address two issues:

  • Changes in 0.11.2.1 broke the GTF/GFF3 parser. Corrected and
    more tests have been added.
  • [#479] Correct VariantRecord edge cases described in issue

pysam-0.11.2

12 May 19:03
Compare
Choose a tag to compare

This release wraps htslib/samtools/bcfools versions 1.4.1 in response
to a security fix in these libraries. Additionaly the following
issues have been fixed:

  • [#452] add GFF3 support for tabix parsers
  • [#461] Multiple fixes related to VariantRecordInfo and handling of INFO/END
  • [#447] limit query name to 251 characters (only partially addresses issue)

VariantFile and related object fixes

  • Restore VariantFile.__dealloc__
  • Correct handling of bcf_str_missing in bcf_array_to_object and
    bcf_object_to_array
  • Added update() and pop() methods to some dict-like proxy objects
  • scalar INFO entries could not be set again after being deleted
  • VariantRecordInfo.delitem now allows unset flags to be deleted without
    raising a KeyError
  • Multiple other fixes for VariantRecordInfo methods
  • INFO/END is now accessible only via VariantRecord.stop and
    VariantRecord.rlen. Even if present behind the scenes, it is no longer
    accessible via VariantRecordInfo.
  • Add argument to issue a warning instead of an exception if input appears
    to be truncated

Other features and fixes:

  • Make AlignmentFile __dealloc__ and close more
    stringent
  • Add argument AlignmentFile to issue a warning instead of an
    exception if input appears to be truncated

pysam-0.11.1

23 Apr 21:06
Compare
Choose a tag to compare

Bugfix release to improve backwards compatibility:

  • [#440] add deprecated 'always' option to infer_query_length for backwards compatibility.

pysam-0.11.0

12 Apr 19:41
Compare
Choose a tag to compare

This release wraps the latest versions of htslib/samtools/bcftools and
implements a few bugfixes.

  • [#413] Wrap HTSlib/Samtools/BCFtools 1.4
  • [#422] Fix missing pysam.sort.usage() message
  • [#411] Fix BGZfile initialization bug
  • [#412] Add seek support for BGZFile
  • [#395] Make BGZfile iterable
  • [#433] Correct getQueryEnd
  • [#419] Export SAM enums such as pysam.CMATCH
  • [#415] Fix access by tid in AlignmentFile.fetch()
  • [#405] Writing SAM now outputs a header by default.
  • [#332] split infer_query_length(always) into infer_query_length and infer_read_length

pysam-0.10.0

22 Jan 21:02
Compare
Choose a tag to compare

This release implements further functionality in the VariantFile API
and includes several bugfixes:

  • treat special case -c option in samtools view outputs to stdout even
    if -o given, fixes #315
  • permit reading BAM files with CSI index, closes #370
  • raise Error if query name exceeds maximum length, fixes #373
  • new method to compute hash value for AlignedSegment
  • AlignmentFile, VariantFile and TabixFile all inherit from HTSFile
  • Avoid segfault by detecting out of range reference_id and
    next_reference in AlignedSegment.tostring
  • Issue #355: Implement streams using file descriptors for VariantFile
  • upgrade to htslib 1.3.2
  • fix compilation with musl libc
  • Issue #316, #360: Rename all Cython modules to have lib as a prefix
  • Issue #332, hardclipped bases in cigar included by
    pysam.AlignedSegment.infer_query_length()
  • Added support for Python 3.6 filename encoding protocol
  • Issue #371, fix incorrect parsing of scalar INFO and FORMAT fields in VariantRecord
  • Issue #331, fix failure in VariantFile.reset() method
  • Issue #314, add VariantHeader.new_record(), VariantFile.new_record() and
    VariantRecord.copy() methods to create new VariantRecord objects
  • Added VariantRecordFilter.add() method to allow setting new VariantRecord filters
  • Preliminary (potentially unsafe) support for removing and altering header metadata
  • Many minor fixes and improvements to VariantFile and related objects

Please note that all internal cython extensions now have a lib prefix. Any user cython extensions
using cimport to import pysam definitions will need changes.

pysam-0.9.1.4

18 Jul 15:05
Compare
Choose a tag to compare

This release is (almost) identical to 0.9.1 but aims to improve installation by querying htslib configuration directly.

Many thanks @jmarshall

This release also fixes a bug when parsing tags following CL tags in SAM/BAM headers.

pysam-0.9.1.3

01 Jul 20:08
Compare
Choose a tag to compare

This release is identical but aims to improve installation on systems without cython.

pysam-0.9.1.2

23 Jun 21:10
Compare
Choose a tag to compare

This release is identical to pysam 0.9.1 in functionality, but aims to improve installation without libcurl.

pysam-0.9.1.1

22 Jun 22:07
Compare
Choose a tag to compare

This release is functionally equivalent to 0.9.1, but aims to resolve installation issues on systems without cython.