Package org.snpeff.codons

# Class CodonTables

java.lang.Object
org.snpeff.codons.CodonTables

All Implemented Interfaces:
  `Iterable<CodonTable>`

public class CodonTables extends Object implements Iterable<CodonTable>
All codon tables are stored here. Mapping for genome/chromosome to codon table are also stored here Note: This object is a singleton

Author:
  pcingola

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`STANDARD_TABLE`
`static final String`
`STANDARD_TABLE_NAME`

## Method Summary

Modifier and Type
Method
Description
`String`
`aa(String codon, Genome genome, String chromosome)`
Translate a codon into an amino acid for a given genome+chromosome
`void`
`add(CodonTable codonTable)`
Add a codon table
`List<String>`
`codon(String aa, Genome genome, String chromosome)`
Translate an amino acid into a codon for a given genome+chromosome
`static CodonTables`
`getInstance()`
`CodonTable`
`getTable(String codonTableName)`
Get a codon table by name
`CodonTable`
`getTable(Genome genome)`
Get default genome-wide codon table
`CodonTable`
`getTable(Genome genome, String chromosome)`
Get a codon table WARNING: It will return the standard codon table if nothing if found
`Iterator<CodonTable>`
`iterator()`
`void`
`set(Genome genome, CodonTable codonTable)`
Set a codon table for a all chromosomes in a genome I.e.: Default genome-wide chromosome table
`void`
`set(Genome genome, Chromosome chr, CodonTable codonTable)`
Set a codon table for a given genome invalid input: '&' chromosome

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

## Field Details

### STANDARD_TABLE

public static final String STANDARD_TABLE

See Also:
  - Constant Field Values

### STANDARD_TABLE_NAME

public static final String STANDARD_TABLE_NAME

See Also:
  - Constant Field Values

## Method Details

### getInstance

public static CodonTables getInstance()

### aa

public String aa(String codon, Genome genome, String chromosome)
Translate a codon into an amino acid for a given genome+chromosome

### add

public void add(CodonTable codonTable)
Add a codon table

### codon

public List<String> codon(String aa, Genome genome, String chromosome)
Translate an amino acid into a codon for a given genome+chromosome

### getTable

public CodonTable getTable(Genome genome)
Get default genome-wide codon table

### getTable

public CodonTable getTable(Genome genome, String chromosome)
Get a codon table WARNING: It will return the standard codon table if nothing if found

### getTable

public CodonTable getTable(String codonTableName)
Get a codon table by name

### iterator

public Iterator<CodonTable> iterator()

Specified by:
  `iterator` in interface `Iterable<CodonTable>`

### set

public void set(Genome genome, Chromosome chr, CodonTable codonTable)
Set a codon table for a given genome invalid input: '&' chromosome

### set

public void set(Genome genome, CodonTable codonTable)
Set a codon table for a all chromosomes in a genome I.e.: Default genome-wide chromosome table