Package jebl.evolution.sequences
Class Codons
- java.lang.Object
-
- jebl.evolution.sequences.Codons
-
public final class Codons extends java.lang.Object- Version:
- $Id: Codons.java 744 2007-07-30 02:57:11Z twobeers $
- Author:
- Andrew Rambaut, Alexei Drummond
-
-
Field Summary
Fields Modifier and Type Field Description static intCANONICAL_STATE_COUNTstatic CodonState[]CANONICAL_STATESstatic CodonStateGAP_STATEstatic java.lang.StringNAMEstatic intSTATE_COUNTstatic CodonState[]STATESstatic CodonStateUNKNOWN_STATE
-
Constructor Summary
Constructors Constructor Description Codons()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetCanonicalStateCount()static java.util.List<State>getCanonicalStates()static CodonStategetGapState()static CodonStategetState(int index)static CodonStategetState(java.lang.String code)Gets the state object for the given code.static CodonStategetState(NucleotideState nucleotide1, NucleotideState nucleotide2, NucleotideState nucleotide3)static intgetStateCount()static java.util.List<State>getStates()static CodonStategetUnknownState()static booleanisGap(CodonState state)static booleanisUnknown(CodonState state)static NucleotideState[]toNucleotides(CodonState state)static NucleotideState[]toNucleotides(State[] states)static CodonState[]toStateArray(byte[] indexArray)static CodonState[]toStateArray(java.lang.String sequenceString)
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
CANONICAL_STATE_COUNT
public static final int CANONICAL_STATE_COUNT
- See Also:
- Constant Field Values
-
STATE_COUNT
public static final int STATE_COUNT
- See Also:
- Constant Field Values
-
CANONICAL_STATES
public static final CodonState[] CANONICAL_STATES
-
STATES
public static final CodonState[] STATES
-
UNKNOWN_STATE
public static final CodonState UNKNOWN_STATE
-
GAP_STATE
public static final CodonState GAP_STATE
-
-
Method Detail
-
getStateCount
public static int getStateCount()
-
getStates
public static java.util.List<State> getStates()
-
getCanonicalStateCount
public static int getCanonicalStateCount()
-
getCanonicalStates
public static java.util.List<State> getCanonicalStates()
-
getState
public static CodonState getState(NucleotideState nucleotide1, NucleotideState nucleotide2, NucleotideState nucleotide3)
-
getState
public static CodonState getState(java.lang.String code)
Gets the state object for the given code. Returns null if the code is illegal or contains ambiguous nucleotides.- Parameters:
code- a three-character string of non-ambiguous nucleotides in uppercase- Returns:
- the state
-
getState
public static CodonState getState(int index)
-
getUnknownState
public static CodonState getUnknownState()
-
getGapState
public static CodonState getGapState()
-
isUnknown
public static boolean isUnknown(CodonState state)
-
isGap
public static boolean isGap(CodonState state)
-
toNucleotides
public static NucleotideState[] toNucleotides(State[] states)
-
toNucleotides
public static NucleotideState[] toNucleotides(CodonState state)
-
toStateArray
public static CodonState[] toStateArray(java.lang.String sequenceString)
-
toStateArray
public static CodonState[] toStateArray(byte[] indexArray)
-
-