Profile Covariance Models#

class pyinfernal.cm.CM#

A data structure storing an Infernal Covariance Model.

filter_hmm#

The HMM used for the initial filtering stages inside the Infernal pipeline.

Type:

pyhmmer.plan7.HMM or None

__init__(alphabet, M, name)#

Create a new, empty CM from scratch.

Parameters:
  • alphabet (Alphabet) – The alphabet of the model.

  • M (int) – The number of nodes of the model.

  • N (int) – The number of states of the model.

  • clen (int) – The model consensus length.

  • name (str) – The name of the model.

copy()#

Create a copy of this CM and return the copy.

M#

The number of states in the model.

Type:

int

N#

The number of nodes in the model.

Type:

int

accession#

The accession of the CM, if any.

Type:

str or None

command_line#

The command line that built the model.

Type:

str or None

creation_time#

The creation time of the CM, if any.

Example

Get the creation time for any HMM:

>>> trna.creation_time
datetime.datetime(2012, 4, 30, 8, 54, 53)

Set the creation time manually to a different date and time:

>>> ctime = datetime.datetime(2026, 1, 15, 13, 59, 10)
>>> trna.creation_time = ctime
>>> trna.creation_time
datetime.datetime(2026, 1, 15, 13, 59, 10)

Danger

Internally, Infernal always uses asctime to generate a timestamp for the HMMs, so this property assumes that every creation time field can be parsed into a datetime.datetime object using the "%a %b %d %H:%M:%S %Y" format.

Type:

datetime.datetime or None

description#

The description of the CM, if any.

Type:

str or None

name#

The name of the CM.

Type:

str

nseq#

The number of training sequences used, if any.

Type:

int or None

nseq_effective#

The number of effective sequences used, if any.

Type:

float or None