Open martinrohbeck opened 1 year ago
Hey @martinrohbeck,
The explanation is rather that the axis interface of MuData objects is newer than most muon interfaces, and the latter still need to be upgraded to handle non-standard axes. For multi-group MOFA (this issue) this is going to be rather straightforward but in general custom axes are undefined behaviour for muon so far.
Hi there,
I am trying to run MOFA on a MuData object with a single view and multiple groups, i.e. all feature dimensions are shared across the groups. However, muon is throwing some error complaining about dimensions.
ValueError: Value passed for key 'LFs' is of incorrect shape. Values of varm must match dimensions (1,) of parent. Value had shape (2000, 15) while it should have had (1000,).
To reproduce the error, run:
I never used Muon/MuData before, so my
mdata
object might already be incorrectly constructed. Sorry, if this is the case. However, assuming themdata
object is as expected, the error might begin here: https://github.com/scverse/muon/blob/31a45d76f7a1d97eee34866e525788f960e7d504/muon/_core/tools.py#L178 where the value ofM
is set to 2, although it should likely be 1 - representing a single modality?If you agree that this is indeed a bug, I'm happy to dig into it and open a PR.
I installed the latest version of muon from master, including muon 0.1.5 mudata 0.2.3 python 3.11.4