Package csb :: Package bio :: Package hmm :: Class HMMLayer

[frames] | no frames]

# Class HMMLayer

source code

                  object --+
                           |
        core.AbstractIndexer --+
                               |
    core.BaseDictionaryContainer --+
                                   |
            core.DictionaryContainer --+
                                       |
                                      HMMLayer

Provides a dictionary-like catalog of the available states at this layer. Lookup keys are members of the States enumeration, e.g.:

    >>> profile.layers[i][States.Deletion]
    the deletion state at layer number i

Instance Methods

__init__(self, rank, residue, states=None) x.__init__(...) initializes x; see help(type(x)) for signature | source code

append(self, state) Append a new `state` to the catalog. | source code

update(self, state_kind, state) Update the sate of the specified kind under the current layer. | source code

Inherited from `core.BaseDictionaryContainer`: `__bool__`, `__contains__`, `__getitem__`, `__iter__`, `__len__`, `__nonzero__`, `__repr__`, `keys` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties
int | effective_deletions Number of effective deletions at this layer
int | effective_insertions Number of effective insertions at this layer
int | effective_matches Number of effective matches at this layer
int | rank Layer's position
Residue | residue Representative residue
Inherited from `core.BaseDictionaryContainer`: `length` Inherited from `object`: `__class__`

Method Details

### __init__(self, rank, residue, states=None)
(Constructor)

source code

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  - `rank` (int) - layer's number
  - `residue` (ProteinResidue) - a representative ProteinResidue that is associated with this layer
  - `states` (dict) - initialization dictionary of States.Item:State pairs
Overrides: object.__init__
  (inherited documentation)

### append(self, state)

source code

Append a new `state` to the catalog.

Parameters:
  - `state` (State) - the new state
Raises:
  - `StateExistsError` - when a state of the same type is already defined
Overrides: core.DictionaryContainer.append

### update(self, state_kind, state)

source code

Update the sate of the specified kind under the current layer.

Parameters:
  - `state_kind` (csb.core.EnumItem) - state type (key) - a member of States
  - `state` (State) - the new state info
Raises:
  - `ValueError` - if state.type differs from state_kind

Property Details

### effective_deletions

Number of effective deletions at this layer

Get Method:
  unreachable.effective_deletions(self) - Number of effective deletions at this layer
Set Method:
  unreachable.effective_deletions(self, value)
Type:
  int

### effective_insertions

Number of effective insertions at this layer

Get Method:
  unreachable.effective_insertions(self) - Number of effective insertions at this layer
Set Method:
  unreachable.effective_insertions(self, value)
Type:
  int

### effective_matches

Number of effective matches at this layer

Get Method:
  unreachable.effective_matches(self) - Number of effective matches at this layer
Set Method:
  unreachable.effective_matches(self, value)
Type:
  int

### rank

Layer's position

Get Method:
  unreachable.rank(self) - Layer's position
Set Method:
  unreachable.rank(self, value)
Type:
  int

### residue

Representative residue

Get Method:
  unreachable.residue(self) - Representative residue
Set Method:
  unreachable.residue(self, residue)
Type:
  Residue