Description Usage Arguments Value Examples
Counts how often a regular expression (or vector of regular expressions) occurs in each element of a character vector.
1 | regexCounts(regex, seqs, overlap = FALSE)
|
regex |
character vector of regular expressions to search for |
seqs |
character vector or XStringSet of sequences in which to search for and count occurrences of regex |
overlap |
logical value: should overlapping occurrences of regex be counted as multiple hits? |
if length(regex) is one, returns integer vector of counts; if length(regex) is more than one, returns matrix of counts: one row per sequence in seqs, one column per expression in regex
1 2 3 | data(simulatedSeqs)
reCounts1 <- regexCounts('AAAAA|TTTTT', simulatedSeqs)
reCounts2 <- regexCounts(c('AAAAA|TTTTT', 'CG'), simulatedSeqs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.