getPeaks: getPeaks

Description Usage Arguments Details Value See Also Examples

View source: R/get_inputs.R

Description

Read in peaks from a bed file.

Usage

1
getPeaks(filename, extra_cols = c(), sort_peaks = FALSE)

Arguments

filename

filename of bed file

extra_cols

extra columns to read in beyond first three

sort_peaks

sort the peaks?

Details

As in standard definition of bed file, first column is assumed to be chromosome, second is assumed to be start of peak (0-based), and third is assumed to be end of peak (1-based). Note that in output GenomicRanges output, start and end indices are both 1-based. Extra columns can be added as metadata or strand information if provided, but the user must indicate column index and name using named vector for extra_cols.

Value

GenomicRanges containing peaks from file

See Also

getCounts, filterPeaks, readNarrowpeaks

Examples

1
2
peaks_file <- system.file("extdata", "test_bed.txt", package = "chromVAR")
peaks <- getPeaks(peaks_file, sort = TRUE)

GreenleafLab/chromVAR documentation built on Aug. 20, 2019, 11:39 a.m.