Open csdaw opened 1 year ago
Hi Charlotte.
Thank you for the feature request - I indeed see some utility in the request, even though I am not sure that the current suggestion/implementation is adapted to QFeatures
instances:
aggregateFeatures()
function and the whole QFeatures
class is that the link between features are recorded. aggregateFeatures()
, we still have features (precursors, peptides, proteins), and don't fundamentally change the nature of these rows.Both of these rules would be broken with your request:
AssayLink
)The second point is merely a change in semantics (that would need some reflection), but the former seems essential to comply with the spirit of the package. It would be possible to implement (but probably not trivial), but we don't have the time at the moment and given point 2, I am not convinced it is advised (without more motivated use cases, at least).
However, in the light of the discussion above, I think it would make sense to add your request to the packge and to return a SummarizedExperiment
, and leave it to the user to decide what to do with it, i.e. either continue with the SE, or start a new QFeatures
object with a new set of columns/(aggregated) samples.
-> added to the TODO list.
Thank you for taking a look! On your points:
I agree it would be more time/trouble than its worth to extend AssayLink
to work on columns as well.
I just wasn't sure there is a standard way to refer to 'columns in an assay' so I defaulted to 'sample' which seems to be what is used in MultiAssayExperiment docs.
I hope to have some time to submit a PR once I've wrapped up experiments.
Hello @csdaw,
Thanks a lot for this concrete suggestion and implementation. I wanted you to know that I couldn't find the time to look into it yet, but this request is very relevant and I did not forget it.
To complement the discussion, here are two additional use cases where aggregating samples would come very handy:
I'll be working on a project to evaluate the performance 1., so I plan to have a look at this issue soon.
Thanks @cvanderaa, good to hear there are other applications this could facilitate. I'm happy to test anything you come up with if that helps.
Hi there,
I'm not sure if this functionality already exists, but I'd like to propose a function
aggregateSamples()
which is companion toaggregateFeatures()
, and would do essentially the same thing but would combine columns instead of rows. I'm currently using this to calculate log2 SILAC ratios, but it would have other general uses such as calculating row means.Thanks!
Functions
Usage example