[BioC] subsetting SummarizedExperiments - a proposal (or a hack?)
Martin Morgan
mtmorgan at fhcrc.org
Thu Feb 6 02:51:15 CET 2014
On 02/05/2014 02:25 PM, Steve Lianoglou wrote:
> Hi,
>
> I think these ideas are pretty cool, as I often find myself doing both
> of the things you mention:
>
> * rather verbose subsetting/slicing/dicing of SEs
actually, for Malcolm's example there's just 1 more character
se1[start(se1) == 697568, se1$Treatment == 'ChIP']
subset(se1, start == 697568, Treatment == 'ChIP')
but I get the point.
> * casting my SEs into data.tables to do "stuff" (not just plotting)
>
> I dig the idea of defining `subset` on SEs (and even GRanges alone),
> but I suspect there will be an issue with the semantics, ie.
> considering a SE (or whatever) as a 2d object, and what the "rows" and
> "columns" of them actually mean (I recall a "subset GRanges mojo"
> thread I might have raised that kicked the same bees nest some time (a
> few years(?)) ago) ...
As the SummarizedExperiment author I do think of it as matrix-like, e.g., with
dim(), dimnames(), and two-dimensional sub-setting. And SummarizedExperiment
supports the more list-like GRanges functions such as subsetByOverlaps, %over%,
etc. that transparently use the rowData().
Martin
>
> Anyway -- yeah, would be curious to see what your cast* functions look like ;-)
>
> -steve
>
--
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109
Location: Arnold Building M1 B861
Phone: (206) 667-2793
More information about the Bioconductor
mailing list