bioFAM / MOFA2

Multi-Omics Factor Analysis
https://biofam.github.io/MOFA2/
GNU Lesser General Public License v3.0
305 stars 52 forks source link

Using multiple metadata as groups? #87

Closed nicolaromano closed 2 years ago

nicolaromano commented 2 years ago

Does MOFA2 support multiple factors as groups?

So, for instance, if I have a Seurat object where I have cells from two different lines and with or without treatment. These are stored in two metadata CellLine and Treatment.

I tried to do:

mofa <- create_mofa_from_Seurat(seuratobject, 
                                groups = c("Treatment", "CellLine"),
                                 ...)

But this only takes the first two samples and assigns those two strings as groups.

I can obviously create a new metadata which is, for example

interaction(seuratobject$CellLine, seuratobject$Treatment)

This works, but I would like the ability to look at the effect of the two factors separately and, in a perfect world, at the effect of their interaction. Is that something at all possible, or in the pipeline?

rargelaguet commented 2 years ago

Hi Nicola, unfortunately we do not support multiple factors as groups. You need to create a new metadata column just like you've done :) Interactions between groups are tricky to analyse in the context of unsupervised dimensionality reduction methods. We do not have this functionality (and honestly, I don't know any method that would allow you to explore this)