summarizePatternInPeaks: Output a summary of the occurrence of each pattern in the...

Description Usage Arguments Value Author(s) Examples

Description

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

Usage

1
2
3
4
5
6
7
8
9
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

1
2
3
4
5
6
7
8
    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)

LihuaJulieZhu/ChIPpeakAnno documentation built on Aug. 5, 2020, 12:02 a.m.