Package pal.datatype

Class GapBalanced

All Implemented Interfaces:
Serializable, DataType, MolecularDataType

public class GapBalanced extends SimpleDataType implements MolecularDataType
implements a ResidueDataType for GapBalanced notation. The terminate character IS included as a state
Version:
$Id: GapBalanced.java,v 1.6 2003/03/23 00:04:23 matt Exp $
Author:
Matthew Goode
See Also:
  • Field Details

    • DEFAULT_INSTANCE

      public static final GapBalanced DEFAULT_INSTANCE
  • Constructor Details

    • GapBalanced

      public GapBalanced(CodonTable translationTable)
  • Method Details

    • getNumStates

      public int getNumStates()
      Description copied from interface: DataType
      get number of unique states
      Specified by:
      getNumStates in interface DataType
      Returns:
      number of unique states
    • getStateImpl

      public int getStateImpl(char c)
      Description copied from class: SimpleDataType
      For sub classes to implement main functionality of getState. Gaps do not need to be considered
      Specified by:
      getStateImpl in class SimpleDataType
    • getCharImpl

      protected char getCharImpl(int state)
      Specified by:
      getCharImpl in class SimpleDataType
    • isUnknownStateImpl

      protected final boolean isUnknownStateImpl(int state)
      Description copied from class: SimpleDataType
      For subclasses to handle, without regard for gaps
      Specified by:
      isUnknownStateImpl in class SimpleDataType
    • getDescription

      public String getDescription()
      Description copied from interface: DataType
      description of data type
      Specified by:
      getDescription in interface DataType
      Returns:
      string describing the data type
    • getTypeID

      public int getTypeID()
      Description copied from interface: DataType
      get numerical code describing the data type
      Specified by:
      getTypeID in interface DataType
      Returns:
      numerical code
    • getNucleotideStates

      public int[] getNucleotideStates(int[] residueStates)
      Specified by:
      getNucleotideStates in interface MolecularDataType
      Parameters:
      residueStates - an array of states corresponding to states of this datatype
      Returns:
      the corresponding IUPAC states
    • getMolecularStatesFromIUPACNucleotides

      public final int[] getMolecularStatesFromIUPACNucleotides(int[] nucleotideStates, int startingIndex)
      Currently converts ambiguous states to a simple version (IE takes the first possible simple state for the ambiguous state)
      Specified by:
      getMolecularStatesFromIUPACNucleotides in interface MolecularDataType
    • getMolecularStatesFromSimpleNucleotides

      public final int[] getMolecularStatesFromSimpleNucleotides(int[] nucleotideStates, int startingIndex)
      Specified by:
      getMolecularStatesFromSimpleNucleotides in interface MolecularDataType
      Returns:
    • isCreatesIUPACNuecleotides

      public boolean isCreatesIUPACNuecleotides()
      Specified by:
      isCreatesIUPACNuecleotides in interface MolecularDataType
      Returns:
      true
    • getNucleotideLength

      public final int getNucleotideLength()
      Specified by:
      getNucleotideLength in interface MolecularDataType
      Returns:
      1