summarizePatternInPeaks {ChIPpeakAnno} | R Documentation

## Output a summary of the occurrence of each pattern in the sequences.

### Description

Output a summary of the occurrence of each pattern in the sequences.

### Usage

    summarizePatternInPeaks(patternFilePath, format = "fasta",skip=0L,
                            BSgenomeName, peaks, outfile, append = FALSE)

### Arguments

`patternFilePath` | A character vector containing the path to the file to read the patterns from.
`format` | Either "fasta" (the default) or "fastq"
`skip` | Single non-negative integer. The number of records of the pattern file to skip before beginning to read in records.
`BSgenomeName` | BSgenome object. Please refer to available.genomes in BSgenome package for details
`peaks` | GRanges containing the peaks
`outfile` | A character vector containing the path to the file to write the summary output.
`append` | TRUE or FALSE, default FALSE

### Value

A data frame with 3 columns as n.peaksWithPattern (number of peaks with the pattern), n.totalPeaks (total number of peaks in the input) and Pattern (the corresponding pattern). The summary will consider both strand (including reverse complement).

### Author(s)

Lihua Julie Zhu

### Examples

        peaks = GRanges(seqnames=c("NC_008253", "NC_010468"),
                        IRanges(start=c(100, 500), end=c(300, 600),
                                   names=c("peak1", "peak2")))
        filepath =system.file("extdata", "examplePattern.fa",
                              package="ChIPpeakAnno")
        library(BSgenome.Ecoli.NCBI.20080805)
        summarizePatternInPeaks(patternFilePath=filepath, format="fasta",
                                skip=0L, BSgenomeName=Ecoli, peaks=peaks)

[Package ChIPpeakAnno version 3.22.4 Index]