Package Bio :: Package SubsMat :: Class SeqMat
[hide private]
[frames] | no frames]

Class SeqMat

source code

object --+    
         |    
      dict --+
             |
            SeqMat
Known Subclasses:

A Generic sequence matrix class
The key is a 2-tuple containing the letter indices of the matrix. Those
should be sorted in the tuple (low, high). Because each matrix is dealt
with as a half-matrix.

Instance Methods [hide private]
 
_alphabet_from_matrix(self) source code
new empty dictionary

__init__(self, data=None, alphabet=None, mat_name='', build_later=0)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_correct_matrix(self) source code
 
_full_to_half(self)
Convert a full-matrix to a half-matrix
source code
 
_init_zero(self) source code
 
make_entropy(self) source code
 
sum(self) source code
 
print_full_mat(self, f=None, format='%4d', topformat='%4s', alphabet=None, factor=1, non_sym=None) source code
 
print_mat(self, f=None, format='%4d', bottomformat='%4s', alphabet=None, factor=1)
Print a nice half-matrix.
source code
 
__str__(self)
Print a nice half-matrix.
source code
 
__sub__(self, other)
returns a number which is the subtraction product of the two matrices
source code
 
__mul__(self, other)
returns a matrix for which each entry is the multiplication product of the...
source code
 
__add__(self, other) source code

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, __sizeof__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values, viewitems, viewkeys, viewvalues

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __subclasshook__

Class Variables [hide private]

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, data=None, alphabet=None, mat_name='', build_later=0)
(Constructor)

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

Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

print_mat(self, f=None, format='%4d', bottomformat='%4s', alphabet=None, factor=1)

source code 
Print a nice half-matrix. f=sys.stdout to see on the screen
User may pass own alphabet, which should contain all letters in the
alphabet of the matrix, but may be in a different order. This
order will be the order of the letters on the axes

__str__(self)
(Informal representation operator)

source code 
Print a nice half-matrix.

Overrides: object.__str__

__mul__(self, other)

source code 
returns a matrix for which each entry is the multiplication product of the
two matrices passed