createBw {derfinder} | R Documentation

## Export coverage to BigWig files

### Description

Using output from fullCoverage, export the coverage from all the samples to BigWig files using createBwSample.

### Usage

    createBw(fullCov, path = ".", keepGR = TRUE, ...)

### Arguments

`fullCov` | A list where each element is the result from loadCoverage used with `returnCoverage = TRUE`. Can be generated using fullCoverage.
`path` | The path where the BigWig files will be created.
`keepGR` | If `TRUE`, the GRanges objects created by coerceGR grouped into a GRangesList are returned. Otherwise they are discarded.
`...` | Arguments passed to createBwSample.

### Details

Use at most one core per chromosome.

### Value

If `keepGR = TRUE`, then a GRangesList with the output for coerceGR for each of the samples.

### Author(s)

Leonardo Collado-Torres

### See Also

GRangesList, export, createBwSample, coerceGR

### Examples

    ## Create a small fullCov object with data only for chr21
    fullCov <- list("chr21" = genomeDataRaw)

    ## Keep only 2 samples
    fullCov$chr21$coverage <- fullCov$chr21$coverage[c(1, 31)]

    ## Create the BigWig files for all samples in a test dir
    dir.create("createBw-example")
    bws <- createBw(fullCov, "createBw-example")

    ## Explore the output
    bws

    ## First sample
    bws[[1]]

    ## Note that if a sample has no bases with coverage > 0, the GRanges object
    ## is empty and no BigWig file is created for that sample.
    bws[[2]]

    ## Exports fullCoverage() output to BigWig files

[Package derfinder version 1.24.2 Index]