| Bioinformatics Toolbox™ | ![]() |
Codons = codoncount(SeqNT)
[Codons, CodonArray] =
codoncount(SeqNT)
... = codoncount(SeqNT,
...'Frame', FrameValue, ...)
... = codoncount(SeqNT,
...'Reverse', ReverseValue, ...)
... = codoncount(SeqNT,
...'Figure', FigureValue, ...)
| SeqNT | One of the following:
Examples: 'ACGT' or [1 2 3 4] |
| FrameValue | Integer specifying a reading frame in the nucleotide sequence. Choices are 1 (default), 2, or 3. |
| ReverseValue | Controls the return of the codon count for the reverse complement sequence of the nucleotide sequence specified by SeqNT. Choices are true or false (default). |
| FigureValue | Controls the display of a heat map of the codon counts. Choices are true or false (default). |
| Codons | MATLAB structure containing fields for the 64 possible codons (AAA, AAC, AAG, ..., TTG, TTT), which contain the codon counts in SeqNT. |
| CodonArray | A 4-by-4-by-4 array containing the raw count data for each codon. The three dimensions correspond to the three positions in the codon, and the indices to each element are represented by 1 = A, 2 = C, 3 = G, and 4 = T. For example, the element (2,3,4) in the array contains the number of CGT codons. |
Codons = codoncount(SeqNT) counts the codons in SeqNT, a nucleotide sequence, and returns the codon counts in Codons, a MATLAB structure containing fields for the 64 possible codons (AAA, AAC, AAG, ..., TTG, TTT).
For sequences that have codons with the character U, these codons are added to the corresponding codons containing a T.
If the sequence contains ambiguous nucleotide characters (R, Y, K, M, S, W, B, D, H, V, or N), or gaps indicated by a hyphen (-), then these characters are counted in the field Others, and the following warning message appears:
Warning: Ambiguous symbols appear in the sequence. These will be in Others.
If the sequence contains undefined nucleotide characters (E, F, H, I, J, L, O, P, Q, X, or Z), then codons containing these characters are counted in the field Others, and the following warning message appears:
Warning: Unknown symbols appear in the sequence. These will be in Others.
[Codons, CodonArray] = codoncount(SeqNT) returns CodonArray, a 4-by-4-by-4 array containing the raw count data for each codon. The three dimensions correspond to the three positions in the codon, and the indices to each element are represented by 1 = A, 2 = C, 3 = G, and 4 = T. For example, the element (2,3,4) in the array contains the number of CGT codons.
... = codoncount(SeqNT, ...'PropertyName', PropertyValue, ...) calls codoncount with optional properties that use property name/property value pairs. You can specify one or more properties in any order. Each PropertyName must be enclosed in single quotation marks and is case insensitive. These property name/property value pairs are as follows:
... = codoncount(SeqNT,
...'Frame', FrameValue, ...) counts
the codons in the reading frame specified by FrameValue,
which can be 1 (default), 2,
or 3.
... = codoncount(SeqNT, ...'Reverse', ReverseValue, ...) controls the return of the codon count for the reverse complement sequence of SeqNT. Choices are true or false (default).
... = codoncount(SeqNT, ...'Figure', FigureValue, ...) controls the display of a heat map of the codon counts. Choices are true or false (default).
Count the codons in a nucleotide sequence.
codons = codoncount('AAACGTTA')
codons =
AAA: 1 ATC: 0 CGG: 0 GCT: 0 TCA: 0
AAC: 0 ATG: 0 CGT: 1 GGA: 0 TCC: 0
AAG: 0 ATT: 0 CTA: 0 GGC: 0 TCG: 0
AAT: 0 CAA: 0 CTC: 0 GGG: 0 TCT: 0
ACA: 0 CAC: 0 CTG: 0 GGT: 0 TGA: 0
ACC: 0 CAG: 0 CTT: 0 GTA: 0 TGC: 0
ACG: 0 CAT: 0 GAA: 0 GTC: 0 TGG: 0
ACT: 0 CCA: 0 GAC: 0 GTG: 0 TGT: 0
AGA: 0 CCC: 0 GAG: 0 GTT: 0 TTA: 0
AGC: 0 CCG: 0 GAT: 0 TAA: 0 TTC: 0
AGG: 0 CCT: 0 GCA: 0 TAC: 0 TTG: 0
AGT: 0 CGA: 0 GCC: 0 TAG: 0 TTT: 0
ATA: 0 CGC: 0 GCG: 0 TAT: 0
Count the codons in the second frame for the reverse complement of a sequence.
r2codons = codoncount('AAACGTTA','Frame',2,'Reverse',true);
Create a heat map of the codons in a random nucleotide sequence.
a = randseq(1000); codoncount(a,'Figure', true);

Bioinformatics Toolbox™ functions: aacount, basecount, baselookup, codonbias, dimercount, nmercount, ntdensity, seqrcomplement, seqwordcount
![]() | codonbias | cpgisland | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |