coverageFromBedGraph {InPAS} | R Documentation |
read coverage from bedGraph files and save as a list.
coverageFromBedGraph(bedgraphs, tags, genome, hugeData=FALSE, BPPARAM=NULL, ...)
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 |
... |
parameters can be passed into tempfile. This is useful when you submit huge dataset to cluster. |
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".
Jianhong Ou
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) }