| Bioinformatics Toolbox | ![]() |
Count codons in nucleotide sequence
Codons = codoncount(SeqNT,
'PropertyName', PropertyValue...)
[Codons, CodonArray] = codoncount(SeqNT)
codoncount(..., 'Frame', FrameValue)
codoncount(..., 'Reverse', ReverseValue)
codoncount(..., 'Figure', FigureValue)
SeqNT | Nucleotide sequence. Enter a character string or vector of integers. You can also enter a structure with the field Sequence. |
| Frame | Property to select a reading frame. Enter 1, 2, or 3. Default value is 1. |
| Reverse | Property to control returning the complement sequence. Enter true or false. Default value is false. |
| Figure | Property to control plotting a heat map. Enter either true or false. Default value is false. |
Codons = codoncount(SeqNT, 'PropertyName',PropertyValue...) counts the number of codon in a sequence (SeqNT) and returns the codon counts in a structure with the fields AAA, AAC, AAG, ..., TTG, TTT.
For sequences that have codons with the character U, the U characters are added to codons with T characters.
If the sequence contains ambiguous nucleotide characters (R Y K M S W B D H V N) , or gaps indicated with a hyphen (-), this function creates a field Others and displays a warning message.
Warning: Ambiguous symbols 'symbol' 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 Z), codoncount ignores the characters and displays a warning message.
Warning: Unknown symbols 'symbol' appear in the sequence.
These will be ignored.[Codons, CodonArray] = codoncount(SeqNT) returns a 4x4x4 array (CodonArray) with the raw count data for each codon. The three dimensions correspond to the three positions in the codon. For example, the element (2,3,4) of the array gives the number of CGT codons where A <=> 1, C <=> 2, G <=> 3, and T <=> 4.
codoncount(...,'Frame', FrameValue) counts the codons in a specific reading frame.
codoncount(..., 'Reverse', ReverseValue), when Reverse is true, counts the codons for the reverse complement of the sequence
codoncount(..., 'Figure', FigureValue), when Figure is truedisplay a figure showing a heat map of the codon counts .
Count the number of standard 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 for the codons in a nucleotide sequence.
a = randseq(1000); codoncount(a,'Figure', true);

Bioinformatics Toolbox functionsaacount, basecount, dimercount, baselookup, nmercount, nmercount, seqcomplement, seqshoworfs, seqwordcount
| clustergram | dayhoff | ![]() |
© 1994-2005 The MathWorks, Inc.