API Reference

Cython bindings and Python interface to HMMER3.

HMMER is a biological sequence analysis tool that uses profile hidden Markov models to search for sequence homologs. HMMER3 is maintained by members of the the Eddy/Rivas Laboratory at Harvard University.

pyhmmer is a module, implemented using the Cython language, that provides bindings to HMMER3. It directly interacts with the HMMER internals, which has several advantages over CLI wrappers like hmmer-py.

HMMER

pyhmmer.hmmer.hmmsearch

Search HMM profiles against a sequence database.

pyhmmer.hmmer.phmmer

Search protein sequences against a sequence database.

pyhmmer.hmmer.nhmmer

Search nucleotide sequences against a sequence database.

pyhmmer.hmmer.hmmpress

Press several HMMs into a database.

pyhmmer.hmmer.hmmalign

Align several sequences to a reference HMM, and return the MSA.

Easel

Data Structures

pyhmmer.easel.Bitfield

A statically sized sequence of booleans stored as a packed bitfield.

pyhmmer.easel.KeyHash

A dynamically resized container to store byte keys using a hash table.

Sequences

pyhmmer.easel.Sequence

An abstract biological sequence with some associated metadata.

pyhmmer.easel.TextSequence

A biological sequence stored in text mode.

pyhmmer.easel.DigitalSequence

A biological sequence stored in digital mode.

pyhmmer.easel.SequenceFile

A wrapper around a sequence file, containing unaligned sequences.

Alignments

pyhmmer.easel.MSA

An abstract alignment of multiple sequences.

pyhmmer.easel.TextMSA

A multiple sequence alignement stored in text mode.

pyhmmer.easel.DigitalMSA

A multiple sequence alignment stored in digital mode.

pyhmmer.easel.MSAFile

A wrapper around a multiple-alignment file.

Linear Algebra

pyhmmer.easel.Vector

An abstract 1D array of fixed size.

pyhmmer.easel.VectorF

A vector storing single-precision floating point numbers.

pyhmmer.easel.VectorU8

A vector storing byte-sized unsigned integers.

pyhmmer.easel.Matrix

An abstract 2D array of fixed size.

pyhmmer.easel.MatrixF

A matrix storing single-precision floating point numbers.

pyhmmer.easel.MatrixU8

A matrix storing byte-sized unsigned integers.

Miscellaneous

pyhmmer.easel.Alphabet

A biological alphabet, including additional marker symbols.

pyhmmer.easel.Randomness

A portable, thread-safe random number generator.

pyhmmer.easel.SSIReader

A read-only handler for sequence/subsequence index file.

pyhmmer.easel.SSIWriter

A writer for sequence/subsequence index files.

Plan7

Hidden Markov Model

pyhmmer.plan7.HMM

A data structure storing the Plan7 Hidden Markov Model.

pyhmmer.plan7.HMMFile

A wrapper around a file (or database), storing serialized HMMs.

Profile

pyhmmer.plan7.Profile

A Plan7 search profile.

pyhmmer.plan7.OptimizedProfile

An optimized profile that uses platform-specific instructions.

pyhmmer.plan7.Background

The null background model of HMMER.

Pipelines

pyhmmer.plan7.Pipeline

An HMMER3 accelerated sequence/profile comparison pipeline.

pyhmmer.plan7.Builder

A factory for constructing new HMMs from raw sequences.

Results

pyhmmer.plan7.TopHits

A ranked list of top-scoring hits.

pyhmmer.plan7.Hit

A high-scoring database hit found by the comparison pipeline.

pyhmmer.plan7.Domains

A read-only view over the domains of a single Hit.

pyhmmer.plan7.Domain

A single domain in a query Hit.

pyhmmer.plan7.Alignment

An alignment of a sequence to a profile.

Traces

pyhmmer.plan7.TraceAligner

A factory for aligning several sequences to a reference model.

pyhmmer.plan7.Traces

A list of tracebacks obtained by aligning several sequences to a model.

pyhmmer.plan7.Trace

A traceback for the alignment of a model to a sequence.

Miscellaneous

pyhmmer.plan7.Cutoffs

A read-only view over the Pfam score cutoffs of a HMM or a Profile.

pyhmmer.plan7.EvalueParameters

A mutable view over the e-value parameters of a HMM or a Profile.

pyhmmer.plan7.Offsets

A mutable view over the disk offsets of a profile.

Errors

pyhmmer.errors.AllocationError

A memory error that is caused by an unsuccessful allocation.

pyhmmer.errors.UnexpectedError

An unexpected error that happened in the C code.

pyhmmer.errors.EaselError

An error that was raised from the Easel code.