aa2nt
Convert amino acid sequence to nucleotide sequence
Description
ntSeq = aa2nt(aaSeq,Name=Value)ntSeq = aa2nt(aaSeq,GeneticCode=2) uses the vertebrate mitochondrial
        genetic code.
Examples
Create an amino acid sequence.
rng('default') % For reproducibility seq = randseq(20,Alphabet="amino")
seq = 'TYNYMRQLVVDVVITNHYSV'
Convert it to a nucleotide sequence using the standard genetic code.
aa2nt(seq)
ans = 'ACATATAACTACATGAGACAGCTTGTAGTTGACGTTGTCATTACTAACCACTATAGCGTT'
Convert it using the vertebrate mitochondrial genetic code.
aa2nt(seq,GeneticCode=2)
ans = 'ACCTATAACTACATACGCCAACTCGTAGTGGATGTAGTAATTACTAATCACTATTCGGTT'
Convert using the Echinoderm Mitochondrial genetic code and the RNA alphabet.
aa2nt(seq,GeneticCode="ec",Alphabet="RNA")
ans = 'ACGUAUAACUACAUGCGGCAGUUAGUUGUCGACGUCGUGAUUACGAACCAUUAUAGUGUC'
Input Arguments
Amino acid sequence, specified as one of the following.
- Character vector or string of single-letter codes specifying an amino acid sequence. For valid letter codes, see the table Mapping Amino Acid Letter Codes to Integers. Unknown characters are mapped to - 0.
- Row vector of integers specifying an amino acid sequence. For valid integers, see the table Mapping Amino Acid Integers to Letter Codes. 
- MATLAB® structure containing a - Sequencefield that contains an amino acid sequence, such as returned by- fastaread,- getgenpept,- genpeptread,- getpdb, or- pdbread.
In general, the mapping from an amino acid to a nucleotide codon is not a one-to-one
            mapping. For amino acids with multiple possible nucleotide codons, this function
            randomly selects a codon corresponding to that particular amino acid. For the ambiguous
            characters B and Z, one of the amino acids
            corresponding to the letter is selected randomly, and then a codon sequence is selected
            randomly. For the ambiguous character X, a codon sequence is selected
            randomly from all possibilities.
Example: "TYNYMRQLVV"
Data Types: char | string
Name-Value Arguments
Specify optional pairs of arguments as
      Name1=Value1,...,NameN=ValueN, where Name is
      the argument name and Value is the corresponding value.
      Name-value arguments must appear after other arguments, but the order of the
      pairs does not matter.
    
Example: ntseq =
        aa2nt(seq,GeneticCode=2,Alphabet="RNA")
      Before R2021a, use commas to separate each name and value, and enclose 
      Name in quotes.
    
Example: ntseq =
        aa2nt(seq,'GeneticCode',"ec",'Alphabet',"RNA")
Genetic code number or name, specified as a positive integer, character vector, or string scalar. The following table has the list of genetic codes and their corresponding code names.
| Genetic Code Number | Genetic Code Name | 
|---|---|
| 1 | Standard | 
| 2 | Vertebrate Mitochondrial | 
| 3 | Yeast Mitochondrial | 
| 4 | Mold,Protozoan,Coelenterate Mitochondrial, andMycoplasma/Spiroplasma | 
| 5 | Invertebrate Mitochondrial | 
| 6 | Ciliate,Dasycladacean, andHexamita Nuclear | 
| 9 | Echinoderm Mitochondrial | 
| 10 | Euplotid Nuclear | 
| 11 | BacterialandPlant Plastid | 
| 12 | Alternative Yeast Nuclear | 
| 13 | Ascidian Mitochondrial | 
| 14 | Flatworm Mitochondrial | 
| 15 | Blepharisma Nuclear | 
| 16 | Chlorophycean Mitochondrial | 
| 21 | Trematode Mitochondrial | 
| 22 | Scenedesmus Obliquus Mitochondrial | 
| 23 | Thraustochytrium Mitochondrial | 
Tip
If you use a code name, you can truncate the name to the first two letters of the name.
The amino acid to nucleotide codon mapping for the standard genetic code is shown next.
| Amino Acid Name | Amino Acid Code | Nucleotide Codon | 
|---|---|---|
| Alanine | A | GCT GCC GCA GCG | 
| Arginine | R | CGT CGC CGA CGG AGA AGG | 
| Asparagine | N | AAT AAC | 
| Aspartic acid (Aspartate) | D | GAT GAC | 
| Cysteine | C | TGT TGC | 
| Glutamine | Q | CAA CAG | 
| Glutamic acid (Glutamate) | E | GAA GAG | 
| Glycine | G | GGT GGC GGA GGG | 
| Histidine | H | CAT CAC | 
| Isoleucine | I | ATT ATC ATA | 
| Leucine | L | 
 † indicates an alternative
                        start codon for the standard genetic code as defined here. If you are using  | 
| Lysine | K | AAA AAG | 
| Methionine | M | ATG | 
| Phenylalanine | F | TTT TTC | 
| Proline | P | CCT CCC CCA CCG | 
| Serine | S | TCT TCC TCA TCG AGT AGC | 
| Threonine | T | ACT ACC ACA ACG | 
| Tryptophan | W | TGG | 
| Tyrosine | Y | TAT TAC | 
| Valine | V | GTT GTC GTA GTG | 
| Asparagine or Aspartic acid (Aspartate) | B | Random codon from DandN | 
| Glutamine or Glutamic acid (Glutamate) | Z | Random codon from EandQ | 
| Unknown amino acid (any amino acid) | X | Random codon | 
| Translation stop | * | TAA TAG TGA | 
| Gap of indeterminate length | - | --- | 
| Unknown character (any character or symbol not in table) | ? | ??? | 
Data Types: double | char | string
Nucleotide alphabet, specified as "DNA" or
                "RNA". If "DNA", the function uses
                A, C, G, and
                T. If "RNA", the function uses
                A, C, G, and
                U.
Data Types: char | string
Output Arguments
Nucleotide sequence, returned as a character vector.
Version History
Introduced before R2006a
See Also
aminolookup | baselookup | geneticcode | nt2aa | revgeneticcode | rand | rng
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)