Coverage {h5vc} | R Documentation |
Functions to do analyses based on coverage
binnedCoverage( data, sampledata, gccount = FALSE )
data |
A |
sampledata |
A |
gccount |
Boolean flag to specify whether the gc count of the bin should be reported as well, |
Explanations:
This computes the per sample coverage in a given bin (determined by
the width of data
).
This feature is not implemented yet!
Returns a data.frame
with columns containing the coverage with
the current bin for all samples provided in sampledata
.
The binsize is determined by the blocksize
argument given to
h5dapply
when this function is run directly on a tally file.
Paul Pyl
# loading library and example data library(h5vc) tallyFile <- system.file( "extdata", "example.tally.hfs5", package = "h5vcData" ) sampleData <- getSampleData( tallyFile, "/ExampleStudy/22" ) data <- h5dapply( # extractting coverage binned at 1000 bases filename = tallyFile, group = "/ExampleStudy/22", blocksize = 1000, FUN = binnedCoverage, sampledata = sampleData, gccount = TRUE, names = c( "Coverages", "Reference" ), range = c(38900000,39000000) ) data <- do.call(rbind, data) rownames(data) <- NULL head(data)