microbiome / mia

Microbiome analysis
https://microbiome.github.io/mia/
Artistic License 2.0
50 stars 27 forks source link

Agglomeration methods #399

Closed antagomir closed 3 months ago

antagomir commented 1 year ago

Consider feature / sample agglomeration methods as useful dimension reduction methods.

First issue to consider is whether it is necessary to have separate functions for Features vs. Samples, or could there by just one merge function with a margin argument. In the latter case we could drop "Features" out from the function names.

These are closely related to:

Then we could have added:

See https://rdrr.io/github/mikemc/speedyseq/man/tree_glom.html

Naming could follow the one suggested in #392 . Note that the TreeSummarizedExperiment package sometimes refers to the finest level features as (tree) leaves. Consider the naming on the same go.

TuomasBorman commented 3 months ago

From those 3 suggestions, "mergeFeaturesByCluster" is already supported in a level that we want to support this "standardization", i.e., creating wrapper for this might not give extra value.

tse <- addCluster(tse, ...)
tse <- agglomerateByVariable(tse, by = "rows", f = "cluster")
antagomir commented 3 months ago

The others, no immediate need now I assume.