org.aisb.bio.tools
Class SequenceAligner

java.lang.Object
  extended byorg.aisb.bio.tools.SequenceAligner
Direct Known Subclasses:
Needleman

public abstract class SequenceAligner
extends java.lang.Object

This interface describes any algorithm for doing pair-wise alignment of sequences. It's implemented via the command bean design pattern. This makes it simple to use from a variety of environments, such as JSP pages using JSTL or the JSP2 expression language.

Author:
Doug DeJulio

Constructor Summary
SequenceAligner()
           
 
Method Summary
abstract  void execute()
          Perform the operation.
abstract  java.lang.String getBestAlignmentAsString()
          Get the actual best alignment, in the form of a string consisting of tuples representing positions in the alignment.
abstract  java.lang.Character[][] getBestAlignmentsAsMatrix()
          Get the set of best alignments, in the form of a matrix.
abstract  java.lang.String[] getBestAlignmentsAsStrings()
          Get the set of best alignments, in the form of an array of strings consisting of tuples representing positions in the alignment.
abstract  int getBestAlignmentScore()
          Get the best alignment score, as defined by this algorithm.
 Sequence getFirstSequence()
          Get the first sequence to align.
abstract  int getNumberOfAlignments()
          Get the number of alignments that have the best score.
 Sequence getSecondSequence()
          Get the second sequence to align.
 void setFirstSequence(Sequence s1)
          Set the first sequence to align.
 void setSecondSequence(Sequence s2)
          Set the second sequence to align.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceAligner

public SequenceAligner()
Method Detail

setFirstSequence

public void setFirstSequence(Sequence s1)
Set the first sequence to align.

Parameters:
s1 - The first sequence.

getFirstSequence

public Sequence getFirstSequence()
Get the first sequence to align.

Returns:
The first sequence.

setSecondSequence

public void setSecondSequence(Sequence s2)
Set the second sequence to align.

Parameters:
s2 - The second sequence.

getSecondSequence

public Sequence getSecondSequence()
Get the second sequence to align.

Returns:
The second sequence.

getBestAlignmentScore

public abstract int getBestAlignmentScore()
Get the best alignment score, as defined by this algorithm.

Returns:
The score.

getNumberOfAlignments

public abstract int getNumberOfAlignments()
Get the number of alignments that have the best score.

Returns:
The number of alignments.

getBestAlignmentAsString

public abstract java.lang.String getBestAlignmentAsString()
Get the actual best alignment, in the form of a string consisting of tuples representing positions in the alignment.

Returns:
The best alignment.

getBestAlignmentsAsStrings

public abstract java.lang.String[] getBestAlignmentsAsStrings()
Get the set of best alignments, in the form of an array of strings consisting of tuples representing positions in the alignment.

Returns:
The best alignments.

getBestAlignmentsAsMatrix

public abstract java.lang.Character[][] getBestAlignmentsAsMatrix()
Get the set of best alignments, in the form of a matrix.

Returns:
The matrix showing the alignments.

execute

public abstract void execute()
Perform the operation.