Package pal.datatype
Class AminoAcids
- java.lang.Object
-
- pal.datatype.SimpleDataType
-
- pal.datatype.AminoAcids
-
- All Implemented Interfaces:
java.io.Serializable,DataType
- Direct Known Subclasses:
SpecificAminoAcids
public class AminoAcids extends SimpleDataType
implements DataType for amino acids- Version:
- $Id: AminoAcids.java,v 1.19 2003/03/23 00:04:23 matt Exp $
- Author:
- Korbinian Strimmer, Alexei Drummond, Matthew Goode
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface pal.datatype.DataType
DataType.Utils
-
-
Field Summary
Fields Modifier and Type Field Description static AminoAcidsDEFAULT_INSTANCEstatic charTERMINATE_CHARACTERstatic intTERMINATE_STATE-
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 AminoAcids()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected chargetCharImpl(int state)java.lang.StringgetDescription()description of data typeintgetNumStates()get number of unique statesprotected intgetStateImpl(char c)For sub classes to implement main functionality of getState.static java.lang.StringgetTLA(int state)intgetTypeID()get numerical code describing the data typeprotected 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
-
-
-
-
Field Detail
-
DEFAULT_INSTANCE
public static final AminoAcids DEFAULT_INSTANCE
-
TERMINATE_CHARACTER
public static final char TERMINATE_CHARACTER
- See Also:
- Constant Field Values
-
TERMINATE_STATE
public static final int TERMINATE_STATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNumStates
public int getNumStates()
Description copied from interface:DataTypeget number of unique states- Returns:
- number of unique states
-
getStateImpl
protected 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 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- Returns:
- string describing the data type
-
getTypeID
public int getTypeID()
Description copied from interface:DataTypeget numerical code describing the data type- Returns:
- numerical code
-
getTLA
public static final java.lang.String getTLA(int state)
- Returns:
- a three letter acronym for an AminoAcid, according to state
-
-