aa2nt
Convert amino acid sequence to nucleotide sequence
Description
uses additional options specified by one or more name-value arguments. For example,
ntSeq
= aa2nt(aaSeq
,Name=Value
)ntSeq = aa2nt(aaSeq,GeneticCode=2)
uses the vertebrate mitochondrial
genetic code.
Examples
Convert an amino acid sequence to a nucleotide sequence
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
aaSeq
— Amino acid sequence
character vector | string | row vector of positive integers | structure
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
Sequence
field that contains an amino acid sequence, such as returned byfastaread
,getgenpept
,genpeptread
,getpdb
, orpdbread
.
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")
GeneticCode
— Genetic code number or name
1
or "Standard"
(default) | positive integer | character vector | string scalar
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 , and Mycoplasma/Spiroplasma |
5 | Invertebrate Mitochondrial |
6 | Ciliate , Dasycladacean , and Hexamita Nuclear |
9 | Echinoderm Mitochondrial |
10 | Euplotid Nuclear |
11 | Bacterial and Plant 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 D and N |
Glutamine or Glutamic acid (Glutamate) | Z | Random codon from E and Q |
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
Alphabet
— Nucleotide alphabet
"DNA"
(default) | "RNA"
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
ntSeq
— Nucleotide sequence
character vector
Nucleotide sequence, returned as a character vector.
Version History
Introduced before R2006a
See Also
aminolookup
| baselookup
| geneticcode
| nt2aa
| revgeneticcode
| seqviewer
| 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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- 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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)