java.io.Serializable
, DataType
, MolecularDataType
public class Codons extends SimpleDataType implements MolecularDataType
MolecularDataType.Utils
Modifier and Type | Field | Description |
---|---|---|
static Codons |
DEFAULT_INSTANCE |
AMINO_ACID_DESCRIPTION, AMINOACIDS, CODON_DESCRIPTION, CODONS, GAP_BALANCED, GAP_BALANCED_DESCRIPTION, IUPAC_NUCELOTIDES_DESCRIPTION, IUPACNUCLEOTIDES, NUCLEOTIDE_DESCRIPTION, NUMERIC, PRIMARY_SUGGESTED_GAP_CHARACTER, SUGGESTED_GAP_CHARACTERS, SUGGESTED_GAP_STATE, SUGGESTED_UNKNOWN_STATE, TWO_STATE_DESCRIPTION, TWOSTATES, UNKNOWN, UNKNOWN_CHARACTER, UNKNOWN_TLA
Constructor | Description |
---|---|
Codons() |
Modifier and Type | Method | Description |
---|---|---|
protected char |
getCharImpl(int state) |
Get character corresponding to a given state
|
static int |
getCodonIndexFromIUPACNucleotideStates(int[] codon) |
The codon index is a number between 0 and 64 assigned to each different codon type
|
static int |
getCodonIndexFromIUPACNucleotideStates(int[] codon,
int startingPosition) |
The codon index is a number between 0 and 64 assigned to each different codon type
|
static int |
getCodonIndexFromNucleotides(char[] codon) |
The codon index is a number between 0 and 64 assigned to each different codon type
|
static int |
getCodonIndexFromNucleotideStates(int[] codon) |
The codon index is a number between 0 and 64 assigned to each different codon type
|
static int |
getCodonIndexFromNucleotideStates(int[] codon,
int startingPosition) |
The codon index is a number between 0 and 64 assigned to each different codon type
|
java.lang.String |
getDescription() |
description of data type
|
static double[] |
getF1X4CodonFrequencies(double[] nucleotideFrequencies) |
|
static double[] |
getF3X4CodonFrequencies(double[][] nucleotideTripletFrequencies) |
|
int[] |
getMolecularStatesFromIUPACNucleotides(int[] nucleotideStates,
int startingIndex) |
|
int[] |
getMolecularStatesFromSimpleNucleotides(int[] nucleotideStates,
int startingIndex) |
|
int |
getNucleotideLength() |
|
static char[] |
getNucleotidesFromCodonIndex(int index) |
Translates an index into a codon
|
int[] |
getNucleotideStates(int[] residueStates) |
|
static int[] |
getNucleotideStatesFromCodonIndex(int codonIndex) |
Translates an index into a codon
|
int |
getNumStates() |
get number of unique states
|
int |
getStateImpl(char c) |
For sub classes to implement main functionality of getState.
|
static java.lang.String |
getTLA(int state) |
|
int |
getTypeID() |
get numerical code describing the data type
|
boolean |
isCreatesIUPACNuecleotides() |
|
protected boolean |
isUnknownStateImpl(int state) |
For subclasses to handle, without regard for gaps
|
getAmbiguousVersion, getChar, getPreferredChar, getRecommendedGapState, getRecommendedUnknownState, getState, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAmbiguousVersion, getChar, getPreferredChar, getPreferredCharImpl, getRecommendedGapState, getRecommendedUnknownState, getState, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownState, toString
public static final Codons DEFAULT_INSTANCE
public int getNumStates()
DataType
getNumStates
in interface DataType
public int getStateImpl(char c)
SimpleDataType
getStateImpl
in class SimpleDataType
protected char getCharImpl(int state)
getCharImpl
in class SimpleDataType
public java.lang.String getDescription()
DataType
getDescription
in interface DataType
protected final boolean isUnknownStateImpl(int state)
SimpleDataType
isUnknownStateImpl
in class SimpleDataType
public int getTypeID()
DataType
public int[] getNucleotideStates(int[] residueStates)
getNucleotideStates
in interface MolecularDataType
residue
- states an array of states corresponding to states of public final int[] getMolecularStatesFromIUPACNucleotides(int[] nucleotideStates, int startingIndex)
getMolecularStatesFromIUPACNucleotides
in interface MolecularDataType
public final int[] getMolecularStatesFromSimpleNucleotides(int[] nucleotideStates, int startingIndex)
getMolecularStatesFromSimpleNucleotides
in interface MolecularDataType
public boolean isCreatesIUPACNuecleotides()
isCreatesIUPACNuecleotides
in interface MolecularDataType
public final int getNucleotideLength()
getNucleotideLength
in interface MolecularDataType
public static final java.lang.String getTLA(int state)
public static final int getCodonIndexFromNucleotides(char[] codon)
codon
- a 3 element array of characters which contain Nucleotide characterspublic static final int getCodonIndexFromNucleotideStates(int[] codon)
codon
- a 3 element array of characters which contain Nucleotide statespublic static final int getCodonIndexFromNucleotideStates(int[] codon, int startingPosition)
codon
- a 3 element array of characters which contain Nucleotide statesstartingPosition
- an offset into the array to start examiningpublic static final int getCodonIndexFromIUPACNucleotideStates(int[] codon)
codon
- a 3 element array of characters which contain Nucleotide statesstartingPosition
- an offset into the array to start examiningpublic static final int getCodonIndexFromIUPACNucleotideStates(int[] codon, int startingPosition)
codon
- a 3 element array of characters which contain Nucleotide statesstartingPosition
- an offset into the array to start examiningpublic static final char[] getNucleotidesFromCodonIndex(int index)
index
- the codon indexpublic static final int[] getNucleotideStatesFromCodonIndex(int codonIndex)
index
- the codon indexpublic static final double[] getF1X4CodonFrequencies(double[] nucleotideFrequencies)
public static final double[] getF3X4CodonFrequencies(double[][] nucleotideTripletFrequencies)