Errors

Common errors and status codes for the easel and hmmer modules.

AllocationError

exception pyhmmer.errors.AllocationError(MemoryError)

A memory error that is caused by an unsuccessful allocation.

__init__(ctype, itemsize, count=1)

None

__repr__()

None

__str__()

None

UnexpectedError

exception pyhmmer.errors.UnexpectedError(RuntimeError)

An unexpected error that happened in the C code.

As a user of this library, you should never see this exception being raised. If you do, please open an issue with steps to reproduce on the bug tracker, so that proper error handling can be added to the relevant part of the bindings.

__init__(code, function)

None

__repr__()

None

__str__()

None

EaselError

exception pyhmmer.errors.EaselError(RuntimeError)

An error that was raised from the Easel code.

__init__(code, message)

None

__repr__()

None

__str__()

None

AlphabetMismatch

exception pyhmmer.errors.AlphabetMismatch(ValueError)

A value error caused by an alphabet mismatch.

This error is raised on occasions where several arguments to a function have mismatching alphabets. For instance, passing a DigitalSequence to a Builder with different alphabets:

>>> seq = easel.DigitalSequence(easel.Alphabet.dna())
>>> builder = plan7.Builder(easel.Alphabet.amino())
>>> builder.build(seq, plan7.Background(seq.alphabet))
Traceback (most recent call last):
  ...
pyhmmer.errors.AlphabetMismatch: Expected ..., found ...

New in version 0.3.0.

__eq__(other)

None

__init__(expected, actual)

None

__repr__()

None

__str__()

None

ServerError

exception pyhmmer.errors.ServerError(RuntimeError)

A runtime error that happened in a hmmpgmd server.

__init__(code, message)

None

__repr__()

None

__str__()

None

MissingCutoffs

exception pyhmmer.errors.MissingCutoffs(ValueError)

The model is missing bitscore cutoffs required by the pipeline.

New in version 0.8.2.

New in version 0.10.8: The model_name and bit_cutoffs displayed in the error message.

__init__(model_name=None, bit_cutoffs=None)

None

__repr__()

None

__str__()

None

InvalidParameter

exception pyhmmer.errors.InvalidParameter(ValueError)

An invalid parameter value was given.

New in version 0.8.2.

__init__(name, value, *, choices=None, hint=None)

None

__repr__()

None

__str__()

None

InvalidHMM

exception pyhmmer.errors.InvalidHMM(ValueError)

A value error caused by a HMM that fails validation.

New in version 0.10.3.

__init__(hmm, message)

None

__repr__()

None

__str__()

None