Package pal.datatype
Class GapBalanced
- java.lang.Object
-
- pal.datatype.SimpleDataType
-
- pal.datatype.GapBalanced
-
- All Implemented Interfaces:
java.io.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:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface pal.datatype.DataType
DataType.Utils
-
Nested classes/interfaces inherited from interface pal.datatype.MolecularDataType
MolecularDataType.Utils
-
-
Field Summary
Fields Modifier and Type Field Description static GapBalancedDEFAULT_INSTANCE-
Fields inherited from interface pal.datatype.DataType
AMINO_ACID_DESCRIPTION, AMINOACIDS, CODON_DESCRIPTION, CODONS, GAP_BALANCED, GAP_BALANCED_DESCRIPTION, IUPAC_NUCELOTIDES_DESCRIPTION, IUPACNUCLEOTIDES, NUCLEOTIDE_DESCRIPTION, NUCLEOTIDES, NUMERIC, PRIMARY_SUGGESTED_GAP_CHARACTER, SUGGESTED_GAP_CHARACTERS, SUGGESTED_GAP_STATE, SUGGESTED_UNKNOWN_STATE, TWO_STATE_DESCRIPTION, TWOSTATES, UNKNOWN, UNKNOWN_CHARACTER, UNKNOWN_TLA
-
-
Constructor Summary
Constructors Constructor Description GapBalanced(CodonTable translationTable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected chargetCharImpl(int state)java.lang.StringgetDescription()description of data typeint[]getMolecularStatesFromIUPACNucleotides(int[] nucleotideStates, int startingIndex)Currently converts ambiguous states to a simple version (IE takes the first possible simple state for the ambiguous state)int[]getMolecularStatesFromSimpleNucleotides(int[] nucleotideStates, int startingIndex)intgetNucleotideLength()int[]getNucleotideStates(int[] residueStates)intgetNumStates()get number of unique statesintgetStateImpl(char c)For sub classes to implement main functionality of getState.intgetTypeID()get numerical code describing the data typebooleanisCreatesIUPACNuecleotides()protected booleanisUnknownStateImpl(int state)For subclasses to handle, without regard for gaps-
Methods inherited from class pal.datatype.SimpleDataType
getAmbiguousVersion, getChar, getPreferredChar, getPreferredCharImpl, getRecommendedGapState, getRecommendedUnknownState, getState, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownState, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface pal.datatype.DataType
getAmbiguousVersion, getChar, getPreferredChar, getRecommendedGapState, getRecommendedUnknownState, getState, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownState
-
-
-
-
Field Detail
-
DEFAULT_INSTANCE
public static final GapBalanced DEFAULT_INSTANCE
-
-
Constructor Detail
-
GapBalanced
public GapBalanced(CodonTable translationTable)
-
-
Method Detail
-
getNumStates
public int getNumStates()
Description copied from interface:DataTypeget number of unique states- Specified by:
getNumStatesin interfaceDataType- Returns:
- number of unique states
-
getStateImpl
public int getStateImpl(char c)
Description copied from class:SimpleDataTypeFor sub classes to implement main functionality of getState. Gaps do not need to be considered- Specified by:
getStateImplin classSimpleDataType
-
getCharImpl
protected char getCharImpl(int state)
- Specified by:
getCharImplin classSimpleDataType
-
isUnknownStateImpl
protected final boolean isUnknownStateImpl(int state)
Description copied from class:SimpleDataTypeFor subclasses to handle, without regard for gaps- Specified by:
isUnknownStateImplin classSimpleDataType
-
getDescription
public java.lang.String getDescription()
Description copied from interface:DataTypedescription of data type- Specified by:
getDescriptionin interfaceDataType- Returns:
- string describing the data type
-
getTypeID
public int getTypeID()
Description copied from interface:DataTypeget numerical code describing the data type
-
getNucleotideStates
public int[] getNucleotideStates(int[] residueStates)
- Specified by:
getNucleotideStatesin interfaceMolecularDataType- Parameters:
residueStates- an array of states corresponding to states ofthis 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:
getMolecularStatesFromIUPACNucleotidesin interfaceMolecularDataType
-
getMolecularStatesFromSimpleNucleotides
public final int[] getMolecularStatesFromSimpleNucleotides(int[] nucleotideStates, int startingIndex)- Specified by:
getMolecularStatesFromSimpleNucleotidesin interfaceMolecularDataType- Returns:
-
isCreatesIUPACNuecleotides
public boolean isCreatesIUPACNuecleotides()
- Specified by:
isCreatesIUPACNuecleotidesin interfaceMolecularDataType- Returns:
- true
-
getNucleotideLength
public final int getNucleotideLength()
- Specified by:
getNucleotideLengthin interfaceMolecularDataType- Returns:
- 1
-
-