Skip to content

Releases: althonos/pyhmmer

0.4.11

15 Dec 01:38
Compare
Choose a tag to compare

Added

  • plan7.HMMFile.read method to read a single plan7.HMM from an plan7.HMMFile (instead of using next).
  • closed property on easel.SequenceFile, easel.MSAFile and plan7.HMMFile to mark whether a file object is closed.
  • plan7.HMMFile.is_pressed method to check whether a HMM file has associated pressed data.
  • plan7.HMMFile.optimized_profiles methods to read the plan7.OptimizedProfile entries in an plan7.HMMFile is there are associated pressed data available.
  • Getters for the name, accession, description, consensus, consensus_structure, evalue_parameters and cutoffs properties of a plan7.OptimizedProfile.
  • plan7.OptimizedProfile.__eq__ implementation to compare two optimized profiles.
  • __sizeof__ implementations for plan7.OptimizedProfile and plan7.Profile to get the allocated size of a profile.

Fixed

  • Double-free caused by the Cython cycle breaking feature on several view types (easel.Randomness, easel.Vector, easel.Matrix, plan7.Cutoffs, plan7.EvalueParameters, plan7.Offsets, plan7.Trace)
  • plan7.Hit.description using the pointer to the accession string erroneously, causing occasional NULL dereference.
  • plan7.OptimizedProfile.copy performing a shallow copy instead of a deep copy as expected.

Changed

  • pyhmmer.hmmer type annotations now explicit support for plan7.Profile or plan7.OptimizedProfile inputs where applicable.

0.4.10

06 Dec 12:43
Compare
Choose a tag to compare

Added

  • entropy and relative_entropy methods to easel.VectorF to compute the Shannon entropy of a vector and the Kullback-Leibler divergence of two vectors.
  • mean_match_entropy, mean_match_information and mean_match_relative_entropy methods to plan7.HMM to get information statistics of an HMM model.
  • match_occupancy method to plan7.HMM to compute the occupancy for each match state as an easel.VectorF.

Fixed

  • plan7.Builder.build_msa using the gap-open and gap-extend probabilities instead of the MSA itself to compute the transition probabilities for the new HMM.

Changed

  • plan7.Builder.build will now only load the score system once and reuse it unless a different score system is requested between calls.

0.4.9

11 Nov 19:39
Compare
Choose a tag to compare

Added

  • plan7.ScoreData class to store the substitution scores and maximal extensions for a long target search.
  • plan7.LongTargetsPipeline to run searches on targets longer than 100,000 residues.
  • Alphabet methods to check whether an Alphabet object is a DNA, RNA, nucleotide or protein alphabet.
  • window_length and window_beta arguments to plan7.Builder to set the max length of nucleotide HMM created by builder objects.

Changed

  • pyhmmer.hmmer.nhmmer now uses a LongTargetsPipeline instead of a Pipeline to search the target sequences.
  • pyhmmer.hmmer.nhmmer now supports HMM queries in addition to DigitalSequence and DigitalMSA queries.
  • pyhmmer.hmmer.phmmer now always assumes protein queries.
  • Z and domZ attributes of plan7.TopHits objects is now read-only.

Fixed

  • nhmmer now uses DNA as the default alphabet instead of amino acid alphabet like it did before (#12).

0.4.8

27 Oct 14:45
Compare
Choose a tag to compare

Added

  • Constructor arguments and properties to plan7.Pipeline to support bit score thresholds instead to filter top hits.
  • Support for creating a SequenceFile and an MSAFile using a Python file-like object instead of only supporting filenames.
  • Support for reading individual sequences from an MSA file with SequenceFile.
  • TextMSA.alignment to access the actual alignment as a tuple of strings.
  • Subtraction and division support for easel.Vector subclasses

Changed

  • plan7.Cutoffs now support setting the bit score cutoffs, but requires both to be set or cleared at the same time.
  • easel.Vector will always allocate some memory when created manually to avoid having a special empty case in every vector method.
  • pyhmmer.easel.AllocationError now stores the size it failed to allocate, and the number of elements when allocating an array.

Fixed

  • TextSequence.digitize will not raise a ValueError when the sequence contains invalid characters for the alphabet (previously was an UnexpectedError).

0.4.7

28 Sep 00:26
Compare
Choose a tag to compare

Added

  • TraceAligner, Trace and Traces classes to pyhmmer.plan7 to get tracebacks after aligning several sequences against an HMM.
  • pyhmmer.hmmalign function with the same features as the hmmalign binary from HMMER3.
  • Support for out-of-band pickling in easel.Vector and easel.Matrix.

Changed

  • Allow creating an empty Vector or Matrix by calling their constructor without arguments.

Fixed

  • Potential unreported exceptions in plan7.OptimizedProfile.write and several plan7.SSIWriter methods.

0.4.6

10 Sep 13:12
Compare
Choose a tag to compare

Added

  • pickle protocol for easel.Alphabet, easel.Bitfield, easel.KeyHash, easel.Vector, easel.Matrix and plan7.HMM.
  • taxonomy_id and residue_markups properties to easel.Sequence.
  • sum_score property to plan7.Hit.
  • plan7.EvalueParameters class to expose the e-value parameters of a plan7.HMM or a plan7.Profile.
  • Equality checks and slicing for easel.Matrix and easel.Vector.
  • Support for creating and manipulating zero-sized easel matrices and vectors.
  • plan7.Cutoffs class to expose the Pfam score cutoffs of a plan7.HMM or a plan7.Profile.
  • Keyword arguments to configure E-value thresholds when creating a plan7.Pipeline object.
  • Support for using model-specific thresholding options in plan7.Pipeline.

Changed

  • Use the replace error handler when decoding error messages to skip potential decoding issues when already building an exception.
  • Improve pyhmmer.hmmer to ensure background threads exit on a KeyboardInterrupt.
  • easel.VectorU8.__eq__ accepts any object implementing the buffer protocol.
  • plan7.HMM.creation_time now takes and returns a datetime.datetime object, assuming the field is only ever set with asctime.
  • Refactor easel.Vector and easel.Matrix and mark exposed memory as C-contiguous.

Fixed

  • easel.Alphabet not reporting potential allocation errors.
  • Potential buffer overflow in easel.Matrix and easel.Vector when calling __init__ more than once.

0.4.5

19 Jul 16:14
Compare
Choose a tag to compare

Added

  • OptimizedProfile.convert method to configure an optimized profile from a Profile without reallocating a new P7_OPROFILE struct.

Changed

  • Rewrite the plan7.Pipeline search loop to avoid reacquiring the GIL between reference sequences.
  • Require the reference sequences to be stored in a collection (instead of an iterable) when passing them to the search_hmm, search_msa and search_seq methods of plan7.Pipeline.
  • Avoid reallocating a new OptimizedProfile every time a new HMM is passed to Pipeline.search_hmm.
  • Relax the GIL while sorting and thresholding TopHits in Pipeline search methods.

0.4.4

07 Jul 00:02
Compare
Choose a tag to compare

Added

  • ignore_gaps parameter to pyhmmer.plan7.SequenceFile, allowing to skip the gap characters when reading a sequence from an ungapped format.
  • __sizeof__ implementation for some
  • Dedicated check for sequence length before running the platform-specific code in pyhmmer.plan7.Pipeline.

Fixed

  • Score system not being set in pyhmmer.plan7.Builder.build_msa.
  • Alphabet not being checked after the first sequence in Pipeline search and scan methods.

0.4.3

03 Jul 11:05
Compare
Choose a tag to compare

Fixed

  • File object wrappers not reporting exceptions raised when seeking on OSX/BSD platforms.

0.4.2

20 Jun 14:53
Compare
Choose a tag to compare

Added

  • pyhmmer.easel.Randomness class exposing a deterministic random number generator.
  • pyhmmer.plan7.Builder.randomness and pyhmmer.plan7.Pipeline.randomness attributes exposing the internal random number generator used by each object.
  • pyhmmer.plan7.Hit.best_domain property mapping to the highest scoring domain of a hit.
  • pyhmmer.plan7.OptimizedProfile.rbv property exposing match scores.
  • pyhmmer.plan7.Domain.pvalue and pyhmmer.plan7.Hit.pvalue reporting the p-value for a domain or hit bitscore.

Fixed

  • Dimensions of the pyhmmer.plan7.OptimizedProfile.sbv matrix not being properly set.