Learn R Programming

ChIPpeakAnno (version 3.6.5)

summarizePatternInPeaks: 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 or RangedData 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).

Examples

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

Run the code above in your browser using DataLab