summarizePeaks: summarizePeaks

Description Usage Arguments Value Examples

View source: R/summary_matrix.R

Description

Given peaks for a set of samples in a query region, construct a sample-by- feature matrix where each row is a vector of summary statistics computed from peaks in the region.

Usage

1
summarizePeaks(localpeaks, mark, cols, fraction = TRUE, n = FALSE)

Arguments

localpeaks

LocalPeaks object

mark

String specifying the name of the mark for which the LocalPeaks object is given

cols

Character vector of column names on which to compute summary statistics

fraction

Loogical: compute the fraction of the region overlapped by peaks?

n

Logical: compute the number of peaks in the region?

Value

A matrix where rows are samples and columns are features

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
samples <- c("E068", "E071", "E074", "E101", "E102", "E110")
bedfiles <- system.file("extdata", paste0(samples, ".H3K4me3.bed"),
package = "chromswitch")

metadata <- data.frame(Sample = samples,
    H3K4me3 = bedfiles,
    stringsAsFactors = FALSE)

lpk <- retrievePeaks(H3K4me3,
    metadata = metadata,
    region = GRanges(seqnames = "chr19",
    ranges = IRanges(start = 54924104, end = 54929104)))

summarizePeaks(lpk, mark = "H3K4me3", cols = c("qValue", "signalValue"))

chromswitch documentation built on Nov. 8, 2020, 5:24 p.m.