count_seq_pattern {baseq} | R Documentation |
Count frequency of a pattern in a sequence
Description
This function counts the frequency of a specific character or pattern in a given sequence.
Usage
count_seq_pattern(seq, pattern)
Arguments
seq |
A character vector representing the sequence to count the pattern in. |
pattern |
A character string representing the pattern to count in the sequence. |
Value
An integer representing the count of the pattern in the sequence.
Examples
seq <- "ATGGTGCTCCGTGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGCTACGTAG"
count_seq_pattern(seq, "CG")
# [1] 31
[Package baseq version 0.1.4 Index]