getPeaks {chromVAR} | R Documentation

## getPeaks

### Description

Read in peaks from a bed file.

### Usage

    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

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

[Package chromVAR version 1.14.0 Index]