de.jstacs.algorithms.alignment
Class PairwiseStringAlignment

java.lang.Object
  extended by de.jstacs.algorithms.alignment.StringAlignment
      extended by de.jstacs.algorithms.alignment.PairwiseStringAlignment
All Implemented Interfaces:
Comparable<StringAlignment>

public class PairwiseStringAlignment
extends StringAlignment

Class for the representation of an alignment of two Strings. It contains the two Strings that were aligned and expanded by gap-symbols, and the edit-costs according to the employed Costs instance.

Author:
Jan Grau

Constructor Summary
protected PairwiseStringAlignment(String r1, String r2, double cost, int startPos, int endPos)
          Creates the instance for the two (extended) Strings and the edit-costs.
 
Method Summary
 int getEndIndexOfAlignmentForFirst()
          This method returns the end index of the alignment in the first sequence.
 int getStartIndexOfAlignmentForFirst()
          This method returns the start index of the alignment in the first sequence.
 
Methods inherited from class de.jstacs.algorithms.alignment.StringAlignment
compareTo, getAlignedString, getAnnotationResult, getCost, getLength, getNumberOfAlignedSequences, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PairwiseStringAlignment

protected PairwiseStringAlignment(String r1,
                                  String r2,
                                  double cost,
                                  int startPos,
                                  int endPos)
Creates the instance for the two (extended) Strings and the edit-costs.

Parameters:
r1 - the first String
r2 - the second String
cost - the edit-costs
startPos - the start position of the aligned block in the first String
endPos - the end position of the aligned block in the first String
Method Detail

getStartIndexOfAlignmentForFirst

public int getStartIndexOfAlignmentForFirst()
This method returns the start index of the alignment in the first sequence.

Returns:
the start index of the alignment in the first sequence

getEndIndexOfAlignmentForFirst

public int getEndIndexOfAlignmentForFirst()
This method returns the end index of the alignment in the first sequence.

Returns:
the end index of the alignment in the first sequence