| Bioinformatics Toolbox™ | ![]() |
NTStruct = basecount(SeqNT)
NTStruct = basecount(SeqNT,
...'Chart', ChartValue, ...)
NTStruct = basecount(SeqNT,
...'Others', OthersValue, ...)
NTStruct = basecount(SeqNT,
...'Structure', StructureValue, ...)
| SeqNT | One of the following:
|
| ChartValue | String specifying a chart type. Choices are 'pie' or 'bar'. |
| OthersValue | String specifying how to count ambiguous characters, including gaps indicated by a hyphen (-). Choices are 'full' (lists the ambiguous characters in separate fields) or 'bundle' (lists the ambiguous characters together in the field Others). Default is 'bundle'. |
| StructureValue | Suppresses the unknown characters warning when set to 'full' . |
| NTStruct | 1-by-1 MATLAB structure containing the fields A, C, G, and T. |
NTStruct = basecount(SeqNT) counts the number of each type of base in a SeqNT, a nucleotide sequence, and returns the counts in NTStruct, a 1-by-1 MATLAB structure containing the fields A, C, G, and T.
For sequences with the character U, the number of U characters is added to the T field.
If a 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 a sequence contains undefined nucleotide characters (E, F, H, I, J, L, O, P, Q, X, or Z), then 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.
If the property 'Others' is set to 'full', ambiguous characters are listed separately in the fields R, Y, K, M, S, W, B, D, H, V, N, and Gap.
NTStruct = basecount(SeqNT, ...'PropertyName', PropertyValue, ...) calls basecount 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:
NTStruct = basecount(SeqNT,
...'Chart', ChartValue, ...) creates
a chart showing the relative proportions of the nucleotides. ChartValue can
be 'pie' or 'bar'.
NTStruct = basecount(SeqNT, ...'Others', OthersValue, ...) specifies how to count ambiguous characters (R, Y, K, M, S, W, B, D, H, V, and N), or gaps indicated by a hyphen (-). Choices are 'full' (lists the ambiguous characters in separate fields) or 'bundle' (lists the ambiguous characters together in the field Others). Default is 'bundle'.
NTStruct = basecount(SeqNT, ...'Structure', StructureValue, ...) suppresses the unknown characters warning when set to 'full'.
basecount(SeqNT) — Displays fields for four nucleotides, and, if there are ambiguous and unknown characters, add an Others field with the ambiguous and unknown character counts.
basecount(SeqNT, 'Others', 'full') — Displays fields for 4 nucleotides, 11 ambiguous nucleotides, gaps, and, if there are unknown characters, adds an Others field with the unknown counts.
basecount(SeqNT, 'Structure', 'full') — Displays fields for four nucleotides and an Others field. If there are ambiguous or unknown characters, adds the counts to the Others field; otherwise displays 0 in the Others field.
basecount(SeqNT, 'Others', 'full', 'Structure', 'full') — Displays fields for 4 nucleotides, 11 ambiguous nucleotides, gaps, and an Others field. If there are unknown characters, adds the counts to the Others field; otherwise displays 0 in the Others field.
Count the bases in a DNA sequence and return the results in a structure.
Bases = basecount('TAGCTGGCCAAGCGAGCTTG')
Bases =
A: 4
C: 5
G: 7
T: 4
Get the count for adenosine (A) bases.
Bases.A
ans =
4
Count the bases in a DNA sequence containing ambiguous characters, listing the ambiguous characters in separate fields.
basecount('ABCDGGCCAAGCGAGCTTG','Others','full')
ans =
A: 4
C: 5
G: 6
T: 2
R: 0
Y: 0
K: 0
M: 0
S: 0
W: 0
B: 1
D: 1
H: 0
V: 0
N: 0
Gap: 0
Bioinformatics Toolbox™ functions: aacount, baselookup, codoncount, cpgisland, dimercount, nmercount, ntdensity, seqtool
![]() | atomiccomp | baselookup | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |