readNarrowPeakFile {consensusSeekeR} | R Documentation |
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.
readNarrowPeakFile(file_path, extractRegions = TRUE, extractPeaks = TRUE)
file_path |
the name of the file. |
extractRegions |
a |
extractPeaks |
a |
a list
containing 2 entries:
narrowPeak a GRanges
containing
the narrow regions extracted from the file. NULL
when
not needed by user.
peak a GRanges
containing
the peaks extracted from the file. NULL
when not
Astrid Deschenes
## 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)