| Contents | Index |
SeqInt = aa2int(SeqChar)
| SeqChar | One of the following:
|
| SeqInt | Amino acid sequence specified by a row vector of integers. |
SeqInt = aa2int(SeqChar) converts SeqChar, a character string of single-letter codes specifying an amino acid sequence, to SeqInt, a row vector of integers specifying the same amino acid sequence. For valid letter codes, see the table Mapping Amino Acid Letter Codes to Integers.
Mapping Amino Acid Letter Codes to Integers
| Amino Acid | Code | Integer |
|---|---|---|
| Alanine | A | 1 |
| Arginine | R | 2 |
| Asparagine | N | 3 |
| Aspartic acid (Aspartate) | D | 4 |
| Cysteine | C | 5 |
| Glutamine | Q | 6 |
| Glutamic acid (Glutamate) | E | 7 |
| Glycine | G | 8 |
| Histidine | H | 9 |
| Isoleucine | I | 10 |
| Leucine | L | 11 |
| Lysine | K | 12 |
| Methionine | M | 13 |
| Phenylalanine | F | 14 |
| Proline | P | 15 |
| Serine | S | 16 |
| Threonine | T | 17 |
| Tryptophan | W | 18 |
| Tyrosine | Y | 19 |
| Valine | V | 20 |
| Asparagine or Aspartic acid (Aspartate) | B | 21 |
| Glutamine or Glutamic acid (Glutamate) | Z | 22 |
| Unknown amino acid (any amino acid) | X | 23 |
| Translation stop | * | 24 |
| Gap of indeterminate length | - | 25 |
| Unknown character (any character or symbol not in table) | ? | 0 |
Converting a Simple Sequence
Convert the sequence of letters MATLAB to integers.
SeqInt = aa2int('MATLAB')
SeqInt =
13 1 17 11 1 21Converting a Random Sequence
Create a random string to represent an amino acid sequence.
SeqChar = randseq(20, 'alphabet', 'amino') SeqChar = dwcztecakfuecvifchds
Convert the amino acid sequence from letter to integer representation.
SeqInt = aa2int(SeqChar)
SeqInt =
Columns 1 through 13
4 18 5 22 17 7 5 1 12 14 0 7 5
Columns 14 through 20
20 10 14 5 9 4 16
aminolookup | int2aa | int2nt | nt2int

See how to analyze, visualize, and model biological data and systems using MathWorks products.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |