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

Variable Index

 o LEFT
 o UP
 o UPLEFT

Constructor Index

 o DynamicAligner(int[][], double[][])
create a DynamicAligner from a substitution matrix

Method Index

 o align(double)
this does the alignment; the gap penalty should be given
 o extractAlignment()
get the two sequences as gapped arrays of integers (e.g.
 o getDistance()
return the distance between the two sequences (i.e.

Variables

 o UP
  public final static int UP
 o LEFT
  public final static int LEFT
 o UPLEFT
  public final static int UPLEFT

Constructors

 o 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

Methods

 o align
  public void align(double gap)
this does the alignment; the gap penalty should be given
 o getDistance
  public double getDistance()
return the distance between the two sequences (i.e. the sum of the PAM elements for each pair + the gaps)
 o 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