public interface TranslationTable
Encapsulates the mapping from a source to a destination alphabet.
A TranslationTable is in effect a map or function with the source domain being getSourceAlphabet() and the target domain being getTargetAlphabet(). The method translate() maps a single symbol from source to target.
It is presumed that there will be some explicit declaration of the mapping for attomic symbols, and that the mapping for all other symbols will be infered from these.
If you wish to translate every symbol in a symbol list then use TranslatedSymbolList to automate the job. If you want to translate windowed regions then first construct a WindowedSymbolList from the original sequence and then build a TranslatedSymbolList from this windowed view.
There are a range of named tables available. Their names are specified by the public static final fields in this interface. Each table can be retrieved by calling the static method RNATools.getGeneticCode(name) which will return the appropriate TanslationTable instance.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALT_YEAST_NUC
Translation table name for the alternative yeast nuclear
genetic code.
|
static java.lang.String |
ASCID_MITO
Translation table name for the ascidian mitochondrial genetic
code.
|
static java.lang.String |
BACTERIAL
Translation table name for the bacterial and plant plastid genetic code.
|
static java.lang.String |
BLEPH_MNUC
Translation table name for the blepharisma macronuclear genetic
code.
|
static java.lang.String |
CHLORO_MITO
Translation table name for the chlorophycean mitochondrial genetic
code.
|
static java.lang.String |
CILIATE_NUC
Translation table name for the ciliate nuclear genetic code.
|
static java.lang.String |
ECHIN_MITO
Translation table name for the echinoderm mitochondrial genetic
code.
|
static java.lang.String |
EUPL_NUC
Translation table name for the euplotid nuclear genetic code.
|
static java.lang.String |
FWORM_MITO
Translation table name for the flatworm mitochondrial genetic
code.
|
static java.lang.String |
INVERT_MITO
Translation table name for the invertebrate mitochondrial
genetic code.
|
static java.lang.String |
MOLD_MITO
Translation table name for the mold mitochondrial genetic code.
|
static java.lang.String |
SCENE_MITO
Translation table name for the scenedesmus obliquus mitochondrial genetic
code.
|
static java.lang.String |
TREMA_MITO
Translation table name for the trematode mitochondrial genetic
code.
|
static java.lang.String |
UNIVERSAL
Translation table name for the universal genetic code.
|
static java.lang.String |
VERT_MITO
Translation table name for the vertebrate mitochondrial genetic
code.
|
static java.lang.String |
YEAST_MITO
Translation table name for the yeast mitochondrial genetic
code.
|
Modifier and Type | Method and Description |
---|---|
Alphabet |
getSourceAlphabet()
The alphabet of Symbols that can be translated.
|
Alphabet |
getTargetAlphabet()
The alphabet of Symbols that will be produced.
|
Symbol |
translate(Symbol sym)
Translate a single symbol from source alphabet to the target alphabet.
|
static final java.lang.String UNIVERSAL
static final java.lang.String VERT_MITO
static final java.lang.String YEAST_MITO
static final java.lang.String MOLD_MITO
static final java.lang.String INVERT_MITO
static final java.lang.String CILIATE_NUC
static final java.lang.String ECHIN_MITO
static final java.lang.String EUPL_NUC
static final java.lang.String BACTERIAL
static final java.lang.String ALT_YEAST_NUC
static final java.lang.String ASCID_MITO
static final java.lang.String FWORM_MITO
static final java.lang.String BLEPH_MNUC
static final java.lang.String CHLORO_MITO
static final java.lang.String TREMA_MITO
static final java.lang.String SCENE_MITO
Alphabet getSourceAlphabet()
Alphabet getTargetAlphabet()
Symbol translate(Symbol sym) throws IllegalSymbolException
sym
- the Symbol to translate (member of source alphabet)IllegalSymbolException
- if sym is not a member of the source
alphabet