Given a path to a bedGraph file, imports data into a GRanges
object.
Note: In the bedGraph format chromosome coordinates are zero-based
and half-open (the first chromosome position is 0, and the last position in a
chromosome of length N is N - 1). Imported data here are always converted to
one-based format, irrespective of the format of the imported file.
import_bedGraph(path, keep_zeros = FALSE, local_copy = TRUE, use_rtracklayer = FALSE)
path | Path to a bedGraph file. No default. |
---|---|
keep_zeros | Logical indicating whether to keep rows with a score of
zero. In bedGraph files generated by our MACS2 FE ChIP-seq data analysis
pipeline these correspond to missing values and should not be kept.
Defaults to |
local_copy | Logical indicating whether to create local copy of target
file before importing data. If |
use_rtracklayer | Logical indicating whether to use
function |
GRanges
object.
# NOT RUN { x <- import_bedGraph('data.bdg', keep_zeros=TRUE, local_copy=FALSE, use_rtracklayer) dot1 <- import_bedGraph('/Volumes/LabShare/HTGenomics/HiSeqOutputs/\ AveReps_SacCer3_MACS2_FE/\ Red1-dot1D-195-16-Reps-SacCer3-B3W3-MACS2/\ Red1-dot1D-195-16-Reps-SacCer3-2mis_B3W3_MACS2_FE.bdg.gz') # }