Learn R Programming

ChIPpeakAnno (version 3.6.5)

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

Description

Output total number of patterns found in the input sequences

Usage

countPatternInSeqs(pattern, sequences)

Arguments

pattern
DNAstringSet object
sequences
a vector of sequences

Value

Total number of occurrence of the pattern in the sequences

See Also

summarizePatternInPeaks, translatePattern

Examples

Run this code
  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)

Run the code above in your browser using DataLab