countPatternInSeqs {ChIPpeakAnno} | R Documentation

## 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

### Author(s)

Lihua Julie Zhu

### See Also

summarizePatternInPeaks, translatePattern

### Examples

      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)

[Package ChIPpeakAnno version 3.22.4 Index]