|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpal.datatype.SimpleDataType
pal.datatype.Codons
public class Codons
implements DataType for all Codons (including terminators). Characters are defined as 'A-Z' followed by 'a-z' followed by '0-9' followed by '@' and '%' Now incorporates the ungeneral code from GeneralizedCodons (which has died due to it's limited use)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface pal.datatype.MolecularDataType |
|---|
MolecularDataType.Utils |
| Field Summary | |
|---|---|
static Codons |
DEFAULT_INSTANCE
|
| Constructor Summary | |
|---|---|
Codons()
|
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class pal.datatype.SimpleDataType |
|---|
getAmbiguousVersion, getChar, getPreferredChar, getPreferredCharImpl, getRecommendedGapState, getRecommendedUnknownState, getState, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownState, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface pal.datatype.DataType |
|---|
getAmbiguousVersion, getChar, getPreferredChar, getRecommendedGapState, getRecommendedUnknownState, getState, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownState |
| Field Detail |
|---|
public static final Codons DEFAULT_INSTANCE
| Constructor Detail |
|---|
public Codons()
| Method Detail |
|---|
public int getNumStates()
DataType
getNumStates in interface DataTypepublic int getStateImpl(char c)
SimpleDataType
getStateImpl in class SimpleDataTypeprotected char getCharImpl(int state)
getCharImpl in class SimpleDataTypepublic java.lang.String getDescription()
DataType
getDescription in interface DataTypeprotected final boolean isUnknownStateImpl(int state)
SimpleDataType
isUnknownStateImpl in class SimpleDataTypepublic int getTypeID()
DataType
getTypeID in interface DataTypepublic int[] getNucleotideStates(int[] residueStates)
getNucleotideStates in interface MolecularDataTyperesidue - 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 MolecularDataTypepublic boolean isCreatesIUPACNuecleotides()
isCreatesIUPACNuecleotides in interface MolecularDataTypepublic final int getNucleotideLength()
getNucleotideLength in interface MolecularDataTypepublic 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 characters
public static final int getCodonIndexFromNucleotideStates(int[] codon)
codon - a 3 element array of characters which contain Nucleotide states
public 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 examining
public static final int getCodonIndexFromIUPACNucleotideStates(int[] codon)
codon - a 3 element array of characters which contain Nucleotide statesstartingPosition - an offset into the array to start examining
public 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 examining
public static final char[] getNucleotidesFromCodonIndex(int index)
index - the codon index
public static final int[] getNucleotideStatesFromCodonIndex(int codonIndex)
index - the codon index
public static final double[] getF1X4CodonFrequencies(double[] nucleotideFrequencies)
public static final double[] getF3X4CodonFrequencies(double[][] nucleotideTripletFrequencies)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||