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 int
static final CodonState[]
static final CodonState
static final String
static final int
static final CodonState[]
static final CodonState
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
static CodonState
static CodonState
getState
(int index) static CodonState
Gets the state object for the given code.static CodonState
getState
(NucleotideState nucleotide1, NucleotideState nucleotide2, NucleotideState nucleotide3) static int
static CodonState
static boolean
isGap
(CodonState state) static boolean
isUnknown
(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
-