Package csb :: Package bio :: Package sequence :: Module alignment :: Class AbstractAlignmentAlgorithm |
[frames] | no frames]

# Class AbstractAlignmentAlgorithm

source code

    object --+
             |
            AbstractAlignmentAlgorithm

Known Subclasses:
  - GlobalAlignmentAlgorithm
  - , LocalAlignmentAlgorithm

Base class for all sequence alignment algorithms.

This class was designed with simple sequence alignment algorithms in mind. Implementors have full control over the behavior of the scoring function and the dynamic programming matrix, but implementing things that require additional matrices (such as affine gap penalties) might be trickier.

Nested Classes
| __metaclass__ Metaclass for defining Abstract Base Classes (ABCs).

Instance Methods
__init__(self, scoring=<csb.bio.sequence.alignment.IdentityMatrix object at 0x03700090>, gap=0) x.__init__(...) initializes x; see help(type(x)) for signature | source code
AlignmentResult |
align(self, query, subject) Align two sequences and return the optimal alignment. | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables
| __abstractmethods__ = ``frozenset([``'``_expandable``'``,` `'``_initialize``'``,``...``

Properties
float | gap Simple gap penalty
AbstractScoringMatrix | scoring_matrix Scoring matrix
Inherited from `object`: `__class__`

Method Details

### __init__(self, scoring=<csb.bio.sequence.alignment.IdentityMatrix object at 0x03700090>, gap=0) (Constructor) | source code
x.__init__(...) initializes x; see help(type(x)) for signature Parameters: `scoring` (AbstractScoringMatrix) - scoring matrix `gap` (float) - simple gap penalty Overrides: object.__init__ (inherited documentation)

### align(self, query, subject) | source code
Align two sequences and return the optimal alignment. Parameters: `query` (AbstractSequence) - first sequence `subject` (AbstractSequence) - second sequence Returns: AlignmentResult

Class Variable Details

  ### __abstractmethods__ Value:
      frozenset(['_expandable', '_initialize', '_max', '_terminus'])

Property Details

### gap Simple gap penalty Get Method: unreachable.gap(self) - Simple gap penalty Type: float

### scoring_matrix Scoring matrix Get Method: unreachable.scoring_matrix(self) - Scoring matrix Type: AbstractScoringMatrix