Read a bigWig file and return it as a data frame
readBigwig(
file,
chrom = NULL,
chromstart = 1,
chromend = .Machine$integer.max,
strand = "*",
params = NULL
)
A character value specifying the path to the bigwig file.
Chromosome of data as a string, if data for a specific chromosome is desired.
Integer start position on chromosome.
Integer end position on chromosome.
A character value specifying strand.
Default value is strand = "*"
. Options are:
"+"
: Plus strand.
"-"
: Minus strand.
"*"
: Plus and minus strands.
An optional pgParams object containing relevant function parameters.
Returns a 6-column dataframe of bigwig information.
This function does not work on Windows.
if (.Platform$OS.type != "windows"){
bwFile <- system.file("extdata/test.bw", package="plotgardenerData")
## Read in entire file
bwData <- readBigwig(file = bwFile)
## Read in specified region
bwRegion <- readBigwig(file = bwFile,
chrom = "chr2",
chromstart = 1,
chromend = 1500)
}