Package Bio :: Package Align :: Module AlignInfo :: Class PSSM
[hide private]
[frames] | no frames]

Class PSSM

source code

object --+

Represent a position specific score matrix.

This class is meant to make it easy to access the info within a PSSM and also make it easy to print out the information in a nice table.

Let's say you had an alignment like this:


The position specific score matrix (when printed) looks like:

  G A T C
G 1 1 0 1
T 0 0 3 0
A 1 1 0 0
T 0 0 2 0
C 0 0 0 3

You can access a single element of the PSSM using the following:


For instance, to get the 'T' residue for the second element in the above alignment you would need to do:


Instance Methods [hide private]
__init__(self, pssm)
Initialize with pssm data to represent.
source code
__getitem__(self, pos) source code
source code
get_residue(self, pos)
Return the residue letter at the specified position.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, pssm)

source code 

Initialize with pssm data to represent.

The pssm passed should be a list with the following structure:

list[0] - The letter of the residue being represented (for instance, from the example above, the first few list[0]s would be GTAT... list[1] - A dictionary with the letter substitutions and counts.

Overrides: object.__init__

(Informal representation operator)

source code 

Overrides: object.__str__
(inherited documentation)