Package jebl.evolution.sequences
Class Codons
java.lang.Object
jebl.evolution.sequences.Codons
- Version:
- $Id: Codons.java 744 2007-07-30 02:57:11Z twobeers $
- Author:
- Andrew Rambaut, Alexei Drummond
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final CodonState[]static final CodonStatestatic final Stringstatic final intstatic final CodonState[]static final CodonState -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intstatic CodonStatestatic CodonStategetState(int index) static CodonStateGets the state object for the given code.static CodonStategetState(NucleotideState nucleotide1, NucleotideState nucleotide2, NucleotideState nucleotide3) static intstatic CodonStatestatic 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(String sequenceString)
-
Field Details
-
NAME
- See Also:
-
CANONICAL_STATE_COUNT
public static final int CANONICAL_STATE_COUNT- See Also:
-
STATE_COUNT
public static final int STATE_COUNT- See Also:
-
CANONICAL_STATES
-
STATES
-
UNKNOWN_STATE
-
GAP_STATE
-
-
Constructor Details
-
Codons
public Codons()
-
-
Method Details
-
getStateCount
public static int getStateCount() -
getStates
-
getCanonicalStateCount
public static int getCanonicalStateCount() -
getCanonicalStates
-
getState
public static CodonState getState(NucleotideState nucleotide1, NucleotideState nucleotide2, NucleotideState nucleotide3) -
getState
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
-
getUnknownState
-
getGapState
-
isUnknown
-
isGap
-
toNucleotides
-
toNucleotides
-
toStateArray
-
toStateArray
-