org.sStu
Interface Alignment


public interface Alignment

Represents the alignment.

Author:
Audrius Meskauskas
See Also:
http://www.gnu.org/licenses/gpl.txt

Method Summary
 int getAlignmentScore()
          Return the score of the alignment.
 java.lang.CharSequence getMiddleString()
          Get the "middle line" of the alignment, explaining the comparison process.
 java.lang.CharSequence getSequence(int number)
          Get the given sequence, previously set with setSequence(..).
 java.lang.String toString()
          Returns a string representation of the alignment.
 

Method Detail

getSequence

public java.lang.CharSequence getSequence(int number)
                                   throws java.lang.ArrayIndexOutOfBoundsException
Get the given sequence, previously set with setSequence(..).

Parameters:
number - The sequence number, counting from 0 (for two sequence alignment, only values 0 and 1 are valid.
Returns:
The sequence, containing additional '-' symbols at insertions. All returned sequences have the same length.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the number is negative of refers above the valid range.

getMiddleString

public java.lang.CharSequence getMiddleString()
Get the "middle line" of the alignment, explaining the comparison process.

Returns:
the "middle line" of the alignment, explaining the comparison process. For two sequence alignment, it contains the signal characters reporting comparison state ('|' from match, '.' for mismatch, ' ' for space).

getAlignmentScore

public int getAlignmentScore()
Return the score of the alignment. Must be called after the align() was called.

Returns:
The score of this alignment.

toString

public java.lang.String toString()
Returns a string representation of the alignment.

Returns:
String representation, containing first sequence, line feed, middle (explaining) sequence, line feed again and then the second sequence.