retrievePeaks: retrievePeaks

Description Usage Arguments Value Examples

View source: R/local_processing.R

Description

Given a peak calls for a set of samples, for each sample, get the peaks which overlap a specified genomic region of interest. Typically, this corresponds to the region for which we will construct a feature matrix representing peaks in the region in order to call a chromatin state switch.

Usage

1

Arguments

peaks

List of GRanges objects storing peak calls for each sample

metadata

Dataframe with a column "Sample" which stores the sample identifiers, and at least one column, titled by the histone mark or ChIP-seq target, storing paths to the BED files containing peak calls

region

GRanges object specifying one genomic region, the query region

Value

LocalPeaks object as described in LocalPeaks

Examples

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

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

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