Skip to content
Prev 6297 / 21312 Next

[Bioc-devel] GenomicFiles: chunking

I should also have compared to just using coverage(BigWigFileViews)

approach3 <- function(ranges, files) {
    bwViews <- BigWigFileViews(fileRange = ranges, fileList = files)
    cov <- coverage(bwViews)
    vec <- sapply(assay(cov), function(xx) mean(xx[[1]]))
    out <- matrix(vec, ncol = length(files), nrow = length(ranges))
    out
}

system.time({
mat3 <- approach3(all.grs[1:10], all.files[1:5])
})

  ##  user  system elapsed
  ## 9.705   1.531   2.646

system.time({
mat3 <- approach3(all.grs[1:100], all.files[1:5])
})

 ##   user  system elapsed
 ## 66.454   1.587  18.151


On Sun, Sep 28, 2014 at 10:49 PM, Kasper Daniel Hansen <
kasperdanielhansen at gmail.com> wrote: