View source: R/count_seq_pattern.R
count_seq_pattern | R Documentation |
This function counts the frequency of a specific character or pattern in a given sequence.
count_seq_pattern(seq, pattern)
seq |
A character vector representing the sequence to count the pattern in. |
pattern |
A character string representing the pattern to count in the sequence. |
An integer representing the count of the pattern in the sequence.
seq <- "ATGGTGCTCCGTGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCTACGTAG"
count_seq_pattern(seq, "CG")
# [1] 31
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.