Package org.snpeff.codons
Class CodonTable
- java.lang.Object
-
- org.snpeff.codons.CodonTable
-
public class CodonTable extends java.lang.Object
A codon translation table- Author:
- pcingola
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_START_CODON
All start codons are translated as "M".static java.lang.String
TERMINATION_CODON
static java.lang.String
TERMINATION_CODON_1
-
Constructor Summary
Constructors Constructor Description CodonTable(java.lang.String name, java.lang.String table)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
aa(java.lang.String codons)
Translate codons to an amino acid sequencejava.lang.String
aa(java.lang.String codons, boolean fullProteinSequence)
java.lang.String
aaThreeLetterCode(char aa)
java.lang.String
aaThreeLetterCode(java.lang.String aa)
Convert 1-letter code to 3-letter code (amino acids) Reference: http://www.hgvs.org/mutnomen/standards.html#aalistjava.util.List<java.lang.String>
codon(java.lang.String aa)
Translate an amino acid into a codonint
degenerate(java.lang.String codon, int pos)
Degree of "degenerate site" What is a "degenerate site"? Here is an explanation form Stephen Wright (Univ.java.lang.String
getName()
boolean
isStart(java.lang.String codon)
Is 'codon' a start codon in this table?boolean
isStartFirst(java.lang.String codon)
Is the first codon a 'start' codon?boolean
isStop(java.lang.String codon)
Is 'codon' a stop codon in this table?boolean
isStopAa(java.lang.String aas)
Is there a stop codon in this amino acid sequencejava.lang.String
toString()
-
-
-
Field Detail
-
TERMINATION_CODON
public static final java.lang.String TERMINATION_CODON
- See Also:
- Constant Field Values
-
TERMINATION_CODON_1
public static final java.lang.String TERMINATION_CODON_1
- See Also:
- Constant Field Values
-
DEFAULT_START_CODON
public static final java.lang.String DEFAULT_START_CODON
All start codons are translated as "M". Reference: https://en.wikipedia.org/wiki/Start_codon Alternative start codons are different from the standard AUG codon and are found in both prokaryotes (bacteria) and eukaryotes. Alternate start codons are still translated as Met when they are at the start of a protein (even if the codon encodes a different amino acid otherwise). This is because a separate transfer RNA (tRNA) is used for initiation.- See Also:
- Constant Field Values
-
-
Method Detail
-
aa
public java.lang.String aa(java.lang.String codons)
Translate codons to an amino acid sequence
-
aa
public java.lang.String aa(java.lang.String codons, boolean fullProteinSequence)
-
aaThreeLetterCode
public java.lang.String aaThreeLetterCode(char aa)
-
aaThreeLetterCode
public java.lang.String aaThreeLetterCode(java.lang.String aa)
Convert 1-letter code to 3-letter code (amino acids) Reference: http://www.hgvs.org/mutnomen/standards.html#aalist- Parameters:
Amino
- acid in three letter code
-
codon
public java.util.List<java.lang.String> codon(java.lang.String aa)
Translate an amino acid into a codon
-
degenerate
public int degenerate(java.lang.String codon, int pos)
Degree of "degenerate site" What is a "degenerate site"? Here is an explanation form Stephen Wright (Univ. Toronto), who requested to add this feature "...a fourfold degenerate site would be a site where any change is synonymous. So the third codon position for the arginine CGN, is a fourfold degenerate site, as is the third codon position for valine, alanine, etc. Similarly, all second positions of a codon are zerofold degenerate, since any change is nonsynonymous. Many first codon positions are also zerofold degenerate, however, for example, the first codon position of AGG is NOT zerofold, because a shift to CGG is a synonymous change."- Parameters:
codon
-pos
-- Returns:
- Degenracy level, or '-1' if not available
-
getName
public java.lang.String getName()
-
isStart
public boolean isStart(java.lang.String codon)
Is 'codon' a start codon in this table?
-
isStartFirst
public boolean isStartFirst(java.lang.String codon)
Is the first codon a 'start' codon?
-
isStop
public boolean isStop(java.lang.String codon)
Is 'codon' a stop codon in this table?
-
isStopAa
public boolean isStopAa(java.lang.String aas)
Is there a stop codon in this amino acid sequence
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-