[Bioc-devel] [BioC] readGappedAlignments and param argument
You can use summarizeOverlaps with a 'BamFileList' created by something like
myFiles = dir("/some/dir", pattern="bam$")
bfl = BamFileList(myFiles, yieldSize=1000000)
olaps = summarizeOverlaps(features, bfl)
see the example on the help page
method?"summarizeOverlaps,GRanges,BamFileList"
I see, thanks. Right now I was looking for a solution "prior" to summarizeOverlaps due to the structure that I've given to my package - but I will re-think about it and check if in this way it works (I only have 20 unittest or so to rewrite, no worries for me :) ). Right now I've found a way to define the single chromosome GRanges that works with "which=..." and I would like to offer flexibility for people with small RAM...therefore running the whole analysis on one chr at a time seems a reasonable option all the same.
one small thing that came out of that thread was that
as(seqinfo(BamFile("/some/file")), "GRanges")
gives a GRanges of all the sequence lengths.
I saw that but I wanted to avoid having to do that for every bam and merge the results afterwards - working at the "annotation" level seemed more sensible to me. I guess that I should have asked my boss to have 1 month to scavenge around mans and vignettes before starting to write my first bioconductor-R package :) E.