java.lang.Object
com.biomatters.geneious.publicapi.implementations.EndGapsHelper

public class EndGapsHelper extends 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 Details

  • Constructor Details

    • EndGapsHelper

      public EndGapsHelper(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 to isEndGap(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.