public abstract class AbstractIndexTranslator<T,D> extends java.lang.Object implements IndexTranslator<T>
| Constructor and Description |
|---|
AbstractIndexTranslator(AlignmentModel<T> model,
java.util.Set<T> gapTokens) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract D |
createSequenceData(java.lang.String sequenceID) |
protected void |
finalize() |
abstract int |
getAlignedIndex(java.lang.String sequenceID,
int unalignedIndex)
Returns the column in the alignment, the specified token is contained in
|
java.util.Set<T> |
getGapTokens()
Returns the set of gap tokens used by this instance.
|
AlignmentModel<T> |
getModel()
Returns the alignment model this instance works on.
|
protected D |
getSequenceData(java.lang.String sequenceID) |
abstract IndexRelation |
getUnalignedIndex(java.lang.String sequenceID,
int alignedIndex)
Returns the index of the sequence token at the specified alignment column.
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUnalignedLengthpublic AbstractIndexTranslator(AlignmentModel<T> model, java.util.Set<T> gapTokens)
public AlignmentModel<T> getModel()
IndexTranslatorgetModel in interface IndexTranslator<T>public java.util.Set<T> getGapTokens()
IndexTranslatorgetGapTokens in interface IndexTranslator<T>public abstract IndexRelation getUnalignedIndex(java.lang.String sequenceID, int alignedIndex)
IndexTranslatorgetUnalignedIndex in interface IndexTranslator<T>sequenceID - the ID of the sequence which contains the token to be locatedalignedIndex - the column index in the alignmentIndexRelation.getCorresponding()
will return IndexRelation.GAP, and IndexRelation.getBefore() and
{IndexRelation#getAfter()} the positions of the neighboring tokens, if present. If the specified
column contains a token, IndexRelation.getCorresponding() will return the index of that
token in the unaligned sequence.)public abstract int getAlignedIndex(java.lang.String sequenceID, int unalignedIndex)
IndexTranslatorgetAlignedIndex in interface IndexTranslator<T>sequenceID - the ID of the sequence which contains the token to be locatedunalignedIndex - the index of the token in the unaligned sequenceprotected abstract D createSequenceData(java.lang.String sequenceID)
protected D getSequenceData(java.lang.String sequenceID)
protected void finalize() throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable