Skip to content
Prev 5465 / 21307 Next

[Bioc-devel] Subsetting Lists by Lists

Hi all,

The following is tangentially related, but hopefully the answer will be useful to others (both directly and via my package, which prompts this)...

Suppose I do this:

dat <- GRangesList( 
lapply( bigWigFileNames, import, 
            selection=someRanges ) )

Now I have a GRangesList of values, some of which have 0 ranges, some of which may have hundreds or thousands. I would like to aggregate and smooth over various subgroups of these for Gviz/trackViewer plots, so I was thinking of getting an RleList or similar out of the mcols() from each of the GRangesList atoms. 

However,

1) What is the "right" (fast, idiomatic, future-safe) way to extract and combine these ranges into columns of Rles might be.  I found something not-dissimilar in SpliceGraphs (or was it spliceGrapher?) but I imagine this is a common operation with some efficient "one true way" to do it. 

2) should I be sucking these into a genoset or SummarizedExperiment instead?  I'll take the hit if I have to, once, but I don't want it to eat up all available RAM since I eventually wish to make the plotting process at least somewhat interactive (even if that means calling IGV or interactiveDisplay to do it). 

Thanks for any guidance you may have to offer,

--t