countPatternInSeqs: Output total number of patterns found in the input sequences

Description Usage Arguments Value Author(s) See Also Examples

View source: R/countPatternInSeqs.R

Description

Output total number of patterns found in the input sequences

Usage

1

Arguments

pattern

DNAstringSet object

sequences

a vector of sequences

Value

Total number of occurrence of the pattern in the sequences

Author(s)

Lihua Julie Zhu

See Also

summarizePatternInPeaks, translatePattern

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  library(Biostrings)
  filepath = 
    system.file("extdata", "examplePattern.fa", package="ChIPpeakAnno")
  dict = readDNAStringSet(filepath = filepath, format="fasta", 
                          use.names=TRUE)
  sequences = c("ACTGGGGGGGGCCTGGGCCCCCAAAT", 
                "AAAAAACCCCTTTTGGCCATCCCGGGACGGGCCCAT", 
                "ATCGAAAATTTCC")
  countPatternInSeqs(pattern=dict[1], sequences=sequences)
  countPatternInSeqs(pattern=dict[2], sequences=sequences)
  pattern = DNAStringSet("ATNGMAA")
  countPatternInSeqs(pattern=pattern, sequences=sequences)

ChIPpeakAnno documentation built on April 1, 2021, 6:01 p.m.