public class PairwiseStringAlignment extends StringAlignment
String
s. It
contains the two String
s that were aligned and expanded by
gap-symbols, and the edit-costs according to the employed
Costs
instance.Modifier | Constructor and Description |
---|---|
|
PairwiseStringAlignment(StringBuffer xml)
The standard constructor for the interface
Storable . |
protected |
PairwiseStringAlignment(String r1,
String r2,
double cost,
int startPos,
int endPos,
int numMatches)
Creates the instance for the two (extended)
String s and the
edit-costs. |
Modifier and Type | Method and Description |
---|---|
protected void |
fromXML(StringBuffer xml)
Parses the XML representation.
|
int |
getEndIndexOfAlignmentForFirst()
This method returns the end index of the alignment in the first sequence.
|
int |
getNumberOfMatches()
Returns the number of matches in this alignment.
|
int |
getStartIndexOfAlignmentForFirst()
This method returns the start index of the alignment in the first sequence.
|
StringBuffer |
toXML()
This method returns an XML representation as
StringBuffer of an
instance of the implementing class. |
compareTo, getAlignedString, getAnnotationResult, getCost, getLength, getNumberOfAlignedSequences, toString, toString
protected PairwiseStringAlignment(String r1, String r2, double cost, int startPos, int endPos, int numMatches)
String
s and the
edit-costs.public PairwiseStringAlignment(StringBuffer xml) throws NonParsableException
Storable
.
Creates a new PairwiseStringAlignment
out of its XML representation.xml
- the XML representation as StringBuffer
NonParsableException
- if the PairwiseStringAlignment
could not be reconstructed
out of the XML representation (the StringBuffer
could
not be parsed)Storable
public int getNumberOfMatches()
public int getStartIndexOfAlignmentForFirst()
public int getEndIndexOfAlignmentForFirst()
protected void fromXML(StringBuffer xml) throws NonParsableException
StringAlignment
fromXML
in class StringAlignment
xml
- the XML representationNonParsableException
- if XML could not be parsedpublic StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.toXML
in interface Storable
toXML
in class StringAlignment