readNarrowPeakFile: Extract narrow regions and peaks from a narrrowPeak file

Description Usage Arguments Value Author(s) Examples

View source: R/readNarrowPeak.R

Description

Read a narrowPeak file and extract the narrow regions and/or the peaks, as specified by used. The narrowPeak file must fit the UCSC specifications. See https://genome.ucsc.edu/FAQ/FAQformat.html#format12 for more details. The file can have one or many header lines. However, the total number of header lines must be inferior to 250 lines.

Usage

1
readNarrowPeakFile(file_path, extractRegions = TRUE, extractPeaks = TRUE)

Arguments

file_path

the name of the file.

extractRegions

a logical indicating if the narrow regions must be extracted. If TRUE, a GRanges containing the narrow regions will be returned. Otherwise, NULL is returned. Default = TRUE.

extractPeaks

a logical indicating if the peaks must be extracted. If TRUE, a GRanges containing the peaks will be returned. Otherwise, NULL is returned. Default = TRUE.

Value

a list containing 2 entries:

Author(s)

Astrid Deschenes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Set file information
test_narrowPeak <- system.file("extdata",
            "A549_FOSL2_ENCSR000BQO_MZW_part_chr_1_and_12.narrowPeak",
            package = "consensusSeekeR")

## Read file to extract peaks and regions
data <- readNarrowPeakFile(test_narrowPeak, extractRegions = TRUE,
            extractPeaks = TRUE)

## To access peak data (GRanges format)
head(data$peak)

## To access region data (GRanges format)
head(data$narrowPeak)

ArnaudDroitLab/consensusSeekeR documentation built on Feb. 6, 2020, 6:45 p.m.