Package jebl.evolution.sequences
Class GeneticCode
java.lang.Object
jebl.evolution.sequences.GeneticCode
A set of standard genetic codes.
- Version:
- $Id: GeneticCode.java 1044 2009-12-09 03:33:54Z stevensh $
- Author:
- Andrew Rambaut, Alexei Drummond
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final GeneticCode
static final GeneticCode
static final GeneticCode
static final GeneticCode
static final GeneticCode
static final GeneticCode
static final GeneticCode
static final GeneticCode
static final GeneticCode[]
Deprecated.static final GeneticCode
static final GeneticCode
static final GeneticCode
static final GeneticCode
static final GeneticCode
static final GeneticCode
-
Method Summary
Modifier and TypeMethodDescriptionReturns a length-64 string that for each nucleotide triplet contains the single-character amino acid code (seeAminoAcids
to which that triplet is translated in this genetic code.getCodonsForAminoAcid
(AminoAcidState aminoAcidState) Returns the description of the genetic codestatic Iterable<GeneticCode>
Returns an iterable that allows you to iterate over all the standard genetic codesstatic GeneticCode[]
getName()
Returns the name of the genetic codeint
int
Returns the number of terminator amino acids.getTranslation
(String nucleotides) Returns the state associated with AminoAcid represented by the three nucleotides.getTranslation
(CodonState codonState) Returns the state associated with AminoAcid represented by codonState.getTranslation
(NucleotideState nucleotide1, NucleotideState nucleotide2, NucleotideState nucleotide3) Returns the state associated with AminoAcid represented by the three nucleotides.boolean
isStartCodon
(CodonState codonState) Deprecated.isStartCodonString
(String tripletString) Checks whether all possible disambiguations of a given nucleotide triplet string represents a start codon.boolean
isStopCodon
(CodonState codonState) Deprecated.isStopCodonString
(String tripletString) Checks whether a given String represents a stop codon.toString()
Same as getDescription() (so that GeneticCode objects can be used e.g.static GeneticCode
valueOf
(int NCBITranslationTableNumber) static GeneticCode
-
Field Details
-
UNIVERSAL
-
VERTEBRATE_MT
-
YEAST
-
MOLD_PROTOZOAN_MT
-
MYCOPLASMA
-
INVERTEBRATE_MT
-
CILIATE
-
ECHINODERM_MT
-
EUPLOTID_NUC
-
BACTERIAL
-
ALT_YEAST
-
ASCIDIAN_MT
-
FLATWORM_MT
-
BLEPHARISMA_NUC
-
GENETIC_CODES
Deprecated.usegetGeneticCodes()
insteadUse of this field is deprecated because being an array it is mutable, i.e. an attacker could potentially replace values in this array.
-
-
Method Details
-
getGeneticCodes
Returns an iterable that allows you to iterate over all the standard genetic codes- Returns:
- An iterable over the genetic codes
-
getGeneticCodesArray
-
valueOf
- Parameters:
name
- the name of the genetic code- Returns:
- the genetic code such that
getDescription()
equals name
-
valueOf
- Parameters:
NCBITranslationTableNumber
- the name of the genetic code- Returns:
- the genetic code such that
getNcbiTranslationTableNumber()
equals NCBITranslationTableNumber
-
getName
Returns the name of the genetic code- Returns:
- the name of this genetic code
-
getDescription
Returns the description of the genetic code- Returns:
- the description of this genetic code
-
getCodeTable
Returns a length-64 string that for each nucleotide triplet contains the single-character amino acid code (seeAminoAcids
to which that triplet is translated in this genetic code.- Returns:
- the string passed to the constructor as the
codeTable
argument.
-
getTranslation
Returns the state associated with AminoAcid represented by codonState. Note that the state is the canonical state (generated combinatorially)- Returns:
- '?' if codon unknown
- See Also:
-
getTranslation
public AminoAcidState getTranslation(NucleotideState nucleotide1, NucleotideState nucleotide2, NucleotideState nucleotide3) Returns the state associated with AminoAcid represented by the three nucleotides. If one or more of the nucleotides are ambiguous, and all combinations translate to the same protein, then this method will return that protein- Returns:
- '?' if codon unknown
- See Also:
-
getTranslation
Returns the state associated with AminoAcid represented by the three nucleotides. If one or more of the nucleotides are ambiguous, and all combinations translate to the same protein, then this method will return that protein- Parameters:
nucleotides
- a string consisting of exactly 3 residues in any case.- Returns:
- '?' if codon unknown
- See Also:
-
isStartCodonString
Checks whether all possible disambiguations of a given nucleotide triplet string represents a start codon.- Parameters:
tripletString
- A string of length 3, with each character representing one nucleotide or ambiguity symbol- Returns:
- Whether all possible disambiguations of tripletString represent a start codon.
- Throws:
IllegalArgumentException
- if tripletString doesn't consist of 3 nucleotide or ambiguity symbolsNullPointerException
- if tripletString is null
-
isStartCodon
Deprecated.As of 2007-07-30,CodonState
s exist only for nonambiguous nucleotide triplets. Therefore, this method cannot be used to check if an ambiguous triplet of nucleotides codes for a transcription, start and therefore this method is deprecated.- Parameters:
codonState
-- Returns:
- True if the specified codonState codes for a transcription start under this genetic code.
-
isStopCodon
Deprecated.As of 2007-07-30,CodonState
s exist only for nonambiguous nucleotide triplets. Therefore, this method cannot be used to check if an ambiguous triplet of nucleotides codes for a stop, and therefore this method is deprecated.- Parameters:
codonState
-- Returns:
- True if the specified codonState codes for a stop under this genetic code.
-
isStopCodonString
Checks whether a given String represents a stop codon.- Parameters:
tripletString
- A string of length 3, with each character representing one nucleotide or ambiguity symbol- Returns:
- true if tripletString represents a stop codon.
- Throws:
IllegalArgumentException
- if tripletString doesn't consist of 3 nucleotide or ambiguity symbolsNullPointerException
- if tripletString is null
-
getCodonsForAminoAcid
- Returns:
- all the possible codons for a given amino acid
-
getStartCodons
- Returns:
- the codon states of starts
-
getStopCodons
- Returns:
- the codon states of stops.
-
getStopCodonCount
public int getStopCodonCount()Returns the number of terminator amino acids. -
getNcbiTranslationTableNumber
public int getNcbiTranslationTableNumber()- Returns:
- the number used by NCBI to represent this genetic code or -1 if none. Eg. 1 = Standard...
-
toString
Same as getDescription() (so that GeneticCode objects can be used e.g. in a JComboBox).
-
getGeneticCodes()
instead