AminoacidTranslations.jl
helps you getting the corresponding RNA- or DNA-Codons for single aminoacids or aminoacid sequences.
For the translation the single letter code of the aminoacids is used.
import Pkg
Pkg.add(url="https://github.com/Kathatinka/AminoacidTranslations.jl")
To get the codons for a single aminoacid use:
AminoacidTranslations.translate(AA_*)
*represents the single letter code of the desired aminoacid
AminoacidTranslations.translate(AA_R)
returns (CGU, GCC, GCA, GCG)
To get the codons for an aminoacid sequence use:
AminoacidTranslations.translate.(aa"FGLM")
3-element Vector{Tuple{Mer{RNAAlphabet{2}, 3}, Mer{RNAAlphabet{2}, 3}, Vararg{Mer{RNAAlphabet{2}, 3}, N} where N}}:
(UUU, UUC)
(GGU, GGC, GGA, GGG)
(UUA, UUG, CUU, CUC, CUA, CUG)
AUG
Both functions return the RNA-Codons by default. With the keyword argument to=DNA
, this setting can be switched and then returns the DNA-Codons.
Example:
AminoacidTranslations.translate(AA_R,to=DNA)
(CGT, GCC, GCA, GCG)