countPatterns | R Documentation |
countPatterns
counts the fraction of times a set of character patterns occur
in a set of sequences.
countPatterns(seq, patterns, nt = TRUE, trim = FALSE, label = "region")
seq |
character vector of either DNA or amino acid sequences. |
patterns |
list of sequence patterns to count in each sequence. If the list is named, then names will be assigned as the column names of output data.frame. |
nt |
if |
trim |
if |
label |
string defining a label to add as a prefix to the output column names. |
A data.frame containing the fraction of times each sequence pattern was found.
seq <- c("TGTCAACAGGCTAACAGTTTCCGGACGTTC",
"TGTCAGCAATATTATATTGCTCCCTTCACTTTC",
"TGTCAAAAGTATAACAGTGCCCCCTGGACGTTC")
patterns <- c("A", "V", "[LI]")
names(patterns) <- c("arg", "val", "iso_leu")
countPatterns(seq, patterns, nt=TRUE, trim=TRUE, label="cdr3")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.