getPeaks {chromVAR} | R Documentation |
Read in peaks from a bed file.
getPeaks(filename, extra_cols = c(), sort_peaks = FALSE)
filename |
filename of bed file |
extra_cols |
extra columns to read in beyond first three |
sort_peaks |
sort the peaks? |
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.
GenomicRanges
containing peaks from file
getCounts
, filterPeaks
,
readNarrowpeaks
peaks_file <- system.file("extdata", "test_bed.txt", package = "chromVAR") peaks <- getPeaks(peaks_file, sort = TRUE)