Count number of occurrences of word in sequence
Character vector or string containing a nucleotide or amino acid sequence. You can also
enter a structure with the field
Enter a short sequence of characters.
the number of times that a word appears in a sequence, and then returns
the number of occurrences of that word.
Word contains nucleotide or amino
acid symbols that represent multiple possible symbols (ambiguous characters),
seqwordcount counts all matches. For example,
R represents either
For another example, if
seqwordcount counts occurrences of both
seqwordcount does not count overlapping patterns
multiple times. In the following example,
TATATATA is counted as two distinct
matches, not three overlapping occurrences.
seqwordcount('GCTATAACGTATATATAT','TATA') ans = 3
The following example reports two matches (
the ambiguous code for
R is an ambiguous
seqwordcount('GCTAGTAACGTATATATAAT','BART') ans = 2
Introduced before R2006a