3
// (c) 1999-2001 PAL Development Core Team
5
// This package may be distributed under the
6
// terms of the Lesser GNU General Public License (LGPL)
13
* Describes a device for translating Nucleotide triplets
14
* or codon indices into amino acid codes.
15
* Codon Indexes (or states) are defined as in GeneralizedCodons
17
* @author Matthew Goode
18
* @author Alexei Drummond
22
* <li> 19 August 2003 - Added getAminoAcidStateFromIUPACStates()
25
* @version $Id: CodonTable.java,v 1.10 2003/09/04 03:22:34 matt Exp $
28
public interface CodonTable extends java.io.Serializable {
30
/** TypeID for Universal */
31
static final int UNIVERSAL = 0;
32
/** TypeID for Vertebrate Mitochondrial*/
33
static final int VERTEBRATE_MITOCHONDRIAL = 1;
34
/** TypeID for Yeast */
35
static final int YEAST = 2;
36
/** TypeID for Mold Protozoan Mitochondrial */
37
static final int MOLD_PROTOZOAN_MITOCHONDRIAL = 3;
38
/** TypeID for Mycoplasma */
39
static final int MYCOPLASMA = 4;
40
/** TypeID for Invertebrate Mitochondrial */
41
static final int INVERTEBRATE_MITOCHONDRIAL = 5;
42
/** TypeID for Cilate */
43
static final int CILATE = 6;
44
/** TypeID for Echinoderm Mitochondrial */
45
static final int ECHINODERM_MITOCHONDRIAL = 7;
46
/** TypeID for Euplotid Nuclear */
47
static final int EUPLOTID_NUCLEAR = 8;
48
/** TypeID for Ascidian Mitochondrial */
49
static final int ASCIDIAN_MITOCHONDRIAL = 9;
50
/** TypeID for Flatworm Mitochondrial */
51
static final int FLATWORM_MITOCHONDRIAL = 10;
52
/** TypeID for Blepharisma Nuclear */
53
static final int BLEPHARISMA_NUCLEAR = 11;
54
/** TypeID for Bacterial */
55
static final int BACTERIAL = 12;
56
/** TypeID for Alternative Yeast */
57
static final int ALTERNATIVE_YEAST = 13;
60
* A textual version of an organism type - type is index into array
62
static final String[] ORGANISM_TYPE_NAMES = {
64
"Vertebrate Mitochondrial",
66
"Mold Protozoan Mitochondrial",
68
"Invertebrate Mitochondrial",
70
"Echinoderm Mitochondrial",
72
"Ascidian Mitochondrial",
73
"Flatworm Mitochondrial",
74
"Blepharisma Nuclear",
80
* Returns the char associated with AminoAcid represented by 'codon'
81
* @note char is as defined by AminoAcids.java
83
* @return state for '?' if codon unknown or wrong length
85
char getAminoAcidChar(char[] codon);
88
* Returns the state associated with AminoAcid represented by 'codon'
89
* @note state is as defined by AminoAcids.java
91
* @return '?' if codon unknown or wrong length
93
int getAminoAcidState(char[] codon);
96
* @return all the possible codons for a given amino acid
98
char[][] getCodonsFromAminoAcidState(int aminoAcidState);
101
* @return all the possible codons for a given amino acid
103
char[][] getCodonsFromAminoAcidChar(char aminoAcidChar);
105
/** Returns the amino acid char at the corresponding codonIndex */
106
char getAminoAcidCharFromCodonIndex(int codonIndex);
108
/** Returns the amino acid state at the corresponding codonIndex */
109
int getAminoAcidStateFromCodonIndex(int codonIndex);
112
* @returns three IUPAC states representing the given amino acid
113
* @note The returned array should not be altered, and implementations
114
* should attempt to implement this as efficiently as possible
115
* @note the returned array may not be enough to accurately reconstruct the amino acid (as it may be too ambiguous)
117
int[] getIUPACStatesFromAminoAcidState(int aminoAcid);
118
int[] getStatesFromAminoAcidState(int aminoAcid);
121
* @return The AminoAcid states given the nucleotides states (array should be of size 3)
123
int getAminoAcidStateFromStates(int[] states);
127
* @return the codon states of terminator amino acids.
129
int[] getTerminatorIndexes();
132
* Returns the number of terminator amino acids.
134
int getNumberOfTerminatorIndexes();
137
* @return the type of this organism (see defined type constants)
139
int getOrganismTypeID();
142
* @return true if the amino acids that map to two codons are the same (synonymous). False otherwise
144
boolean isSynonymous(int codonIndexOne, int codonIndexTwo);