Class EndGapsHelper
- java.lang.Object
-
- com.biomatters.geneious.publicapi.implementations.EndGapsHelper
-
public class EndGapsHelper extends java.lang.Object
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
Fields Modifier and Type Field Description static EndGapsHelper
NO_END_GAPS
A EndGaps instance that always returns false fromisEndGap(int, int)
-
Constructor Summary
Constructors Constructor Description EndGapsHelper(java.lang.CharSequence[] residues, boolean freeEndGaps)
Construct some new end gaps.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEndGap(int sequenceIndex, int residueIndex)
Is this residue an end gap? End gaps are gaps at either end of the sequence.
-
-
-
Field Detail
-
NO_END_GAPS
public static final EndGapsHelper NO_END_GAPS
A EndGaps instance that always returns false fromisEndGap(int, int)
-
-
Constructor Detail
-
EndGapsHelper
public EndGapsHelper(java.lang.CharSequence[] residues, boolean freeEndGaps)
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 Detail
-
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.
-
-