coverageFromBedGraph {InPAS} | R Documentation

## read coverage from bedGraph files

### Description

read coverage from bedGraph files and save as a list.

### Usage

        coverageFromBedGraph(bedgraphs, tags, genome,
                            hugeData=FALSE, BPPARAM=NULL, ...)

### Arguments

`bedgraphs` | The file names of bedgraphs generated by bedtools. eg: bedtools genomecov -bg -split -ibam $bam -g mm10.size.txt > $bedgraph
`tags` | the names for each input bedgraphs
`genome` | an object of BSgenome
`hugeData` | is this dataset consume too much memory? if it is TRUE, the coverage will be saved into tempfiles.
`BPPARAM` | An optional `BiocParallelParam` instance determining the parallel back-end to be used during evaluation, or a list of BiocParallelParam instances, to be applied in sequence for nested calls to bplapply.
`...` | parameters can be passed into tempfile. This is useful when you submit huge dataset to cluster.

### Value

return a list of coverage for each bedgraph files. For each item in the list, it is a list of coverage for each chromosome. And the chromosome must start from "chr".

### Author(s)

Jianhong Ou

### Examples

        if(interactive()){
            library(BSgenome.Mmusculus.UCSC.mm10)
            path <- file.path(find.package("InPAS"), "extdata")
            bedgraphs <- file.path(path, "Baf3.extract.bedgraph")
            data(utr3.mm10)
            tags <- "Baf3"
            genome <- BSgenome.Mmusculus.UCSC.mm10
            coverage <-
                coverageFromBedGraph(bedgraphs, tags, genome, hugeData=FALSE)
        }

[Package InPAS version 1.18.0 Index]