Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
Bio.pairwise2.dictionary_match Class Reference

List of all members.

Public Member Functions

def __init__
def __call__

Public Attributes


Detailed Description

dictionary_match(score_dict[, symmetric]) -> match_fn

Create a match function for use in an alignment.  score_dict is a
dictionary where the keys are tuples (residue 1, residue 2) and
the values are the match scores between those residues.  symmetric
is a flag that indicates whether the scores are symmetric.  If
true, then if (res 1, res 2) doesn't exist, I will use the score
at (res 2, res 1).

Definition at line 773 of file

Constructor & Destructor Documentation

def Bio.pairwise2.dictionary_match.__init__ (   self,
  symmetric = 1 

Definition at line 784 of file

00785     def __init__(self, score_dict, symmetric=1):
00786         self.score_dict = score_dict
        self.symmetric = symmetric

Member Function Documentation

def Bio.pairwise2.dictionary_match.__call__ (   self,

Definition at line 787 of file

00788     def __call__(self, charA, charB):
00789         if self.symmetric and (charA, charB) not in self.score_dict:
00790             # If the score dictionary is symmetric, then look up the
00791             # score both ways.
00792             charB, charA = charA, charB
00793         return self.score_dict[(charA, charB)]

Member Data Documentation

Definition at line 785 of file

Definition at line 786 of file

The documentation for this class was generated from the following file: