Bioconductor / RaggedExperiment

Matrix-like representations of mutation and CN data
https://bioconductor.org/packages/RaggedExperiment
4 stars 3 forks source link

rowRanges with extra columns #8

Closed lgeistlinger closed 7 years ago

lgeistlinger commented 7 years ago

LGeistlinger:

(2) rowRanges(ra) currently strips of extra columns, that are provided when e.g. creating ra from a GRangesList. Would it be possible to provide them (as rowRanges for SummarizedExperiment does)?

MMorgan:

yes, something like as(ra, "GRangesList") should work

setAs("RaggedExperiment", "GRangesList", function(from) from@assays)

(I think GRangesList(ra) might then work 'out of the box').

mtmorgan commented 7 years ago

Seems like there are two things to implement setAs("RaggedExperiment", "GRangesList", ...) and rowData(re), returning mcols(re@assays) or similar. Hmm, but the elements of the GRangesList are individual samples, and mcols() are the colData (i.e., metadata about the samples). Also, unlist(re@assays) are approximately the rowRanges(), but mcols(unlist(re@assays)) are the assays, not metadata on rows.

So in the end: only implement setAs()