waldronlab / MultiAssayExperiment

Bioconductor package for management of multi-assay data
https://waldronlab.io/MultiAssayExperiment/
69 stars 32 forks source link

translating ID <-> ID, and ID <-> ranges #196

Closed lwaldron closed 4 years ago

lwaldron commented 7 years ago

Along the lines of #195, metadata(experiments(mae)) could contain another list element optionally providing functions through which any vector for row-based subsetting is passed. This would allow, for example:

@LiNk-NY @mtmorgan @vjcitn or others?

mtmorgan commented 7 years ago

As with https://github.com/waldronlab/MultiAssayExperiment/issues/195#issuecomment-288826032 it seems like this associates a function with an object, rather than creating a function that can be used across objects. I guess you're concerned that somehow it will be too hard to remember that function x is meant to be used to subset object y, but you have to remember that when creating object y, so...

lwaldron commented 7 years ago

I'm concerned that an MAE object has multiple objects which should be acted on simultaneously by a single assay() call, some of which require a special function to produce the desired behavior. So how does remembering that function x is meant to be used to coerce object y to a matrix help, if that memory isn't somehow formalized when I act on the MAE object as a whole?

mtmorgan commented 7 years ago

I think you're looking for something other than the simple contract provided by assay(), which is fine -- write another function with a different name that does the highly specialized actions on very specifically formatted MAE.

lwaldron commented 7 years ago

Do you mean replace the current assay() method for MultiAssayExperiment with a generic of a new name? It guess assays() would be more consistent with the SummarizedExperiment contract, but we can't currently guarantee that the list elements will be matrices.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

lwaldron commented 4 years ago

I think this is asking for too much specificity in a very heterogeneous MAE. In cases where specialized subsetting is required, it will be better to create a derivative class and methods for those uses.