Class pmr.molecule.DynamicAligner
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class pmr.molecule.DynamicAligner
java.lang.Object
   |
   +----pmr.molecule.DynamicAligner
  -  public class DynamicAligner
  -  extends Object
dynamic alignment of sequences (in the general sense) based on Kruskal's
description
   
  -   LEFT LEFT
-  
  
-   UP UP
-  
  
-   UPLEFT UPLEFT
-  
   
  -   DynamicAligner(int[][], double[][]) DynamicAligner(int[][], double[][])
-  create a DynamicAligner from a substitution matrix
   
  -   align(double) align(double)
-  this does the alignment;  the gap penalty should be given
  
-   extractAlignment() extractAlignment()
-  get the two sequences as gapped arrays of integers (e.g.
  
-   getDistance() getDistance()
-  return the distance between the two sequences (i.e.
   
 UP
UP
  public final static int UP
 LEFT
LEFT
  public final static int LEFT
 UPLEFT
UPLEFT
  public final static int UPLEFT
   
 DynamicAligner
DynamicAligner
  public DynamicAligner(int seq[][],
                        double penalties[][]) throws NonSquareMatrixException, IllegalArgumentException
  -  create a DynamicAligner from a substitution matrix
  
    -  Parameters:
    
-  seq - 2 int[] corresponding to the input data.  Each element points to an
 element in the row or column of the penalties matrix
    -  penalties - a square matrix of the penalty for matching seq[0][i] 
with seq[1][j]
    
-  Throws: NonSquareMatrixException
    
-  penalties is not a square matrix
    
-  Throws: IllegalArgumentException
    -  seq must have exactly 2 sequences
  
 
   
 align
align
  public void align(double gap)
  -  this does the alignment;  the gap penalty should be given
 getDistance
getDistance
  public double getDistance()
  -  return the distance between the two sequences (i.e. the sum of the PAM elements
 for each pair + the gaps)
 extractAlignment
extractAlignment
  public IntArray[] extractAlignment()
  -  get the two sequences as gapped arrays of integers (e.g. 0,1,2,3,-1,-1,4,-1,5)
 where the -1 represent gaps and the nonzero numers are serial numbers of the 
 sequences
All Packages  Class Hierarchy  This Package  Previous  Next  Index