Read a bigWig file and return it as a data frame

readBigwig(
    file,
    chrom = NULL,
    chromstart = 1,
    chromend = .Machine$integer.max,
    strand = "*",
    params = NULL
)

Arguments

file

A character value specifying the path to the bigwig file.

chrom

Chromosome of data as a string, if data for a specific chromosome is desired.

chromstart

Integer start position on chromosome.

chromend

Integer end position on chromosome.

strand

A character value specifying strand. Default value is strand = "*". Options are:

  • "+": Plus strand.

  • "-": Minus strand.

  • "*": Plus and minus strands.

params

An optional pgParams object containing relevant function parameters.

Value

Returns a 6-column dataframe of bigwig information.

Details

This function does not work on Windows.

See also

Examples

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)
}