Class EndGapsHelper
java.lang.Object
com.biomatters.geneious.publicapi.implementations.EndGapsHelper
Calculates, and provides a method to determine whether residues in a
set of sequences are end gaps. End gaps are gaps at either end of the sequence.
This is useful in situations where we want to treat end gaps differently
from internal gaps.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EndGapsHelperA EndGaps instance that always returns false fromisEndGap(int, int) -
Constructor Summary
ConstructorsConstructorDescriptionEndGapsHelper(CharSequence[] residues, boolean freeEndGaps) Construct some new end gaps. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEndGap(int sequenceIndex, int residueIndex) Is this residue an end gap? End gaps are gaps at either end of the sequence.
-
Field Details
-
NO_END_GAPS
A EndGaps instance that always returns false fromisEndGap(int, int)
-
-
Constructor Details
-
EndGapsHelper
Construct some new end gaps.- Parameters:
residues- each CharSequence represents a single sequence. The CharSequences do not have to be all the same length. This parameter is used only for the duration of this method, and is not recorded for future use.freeEndGaps- if this is false, then all calls toisEndGap(int, int)will return false. Useful in situations where we do not have free end gaps.
-
-
Method Details
-
isEndGap
public boolean isEndGap(int sequenceIndex, int residueIndex) Is this residue an end gap? End gaps are gaps at either end of the sequence.- Parameters:
sequenceIndex- the index of the sequence in the range [0,n-1]residueIndex- the index of the residue in the range [0,n-1]- Returns:
- true if this residue an end gap.
-