bio-multi-omics-mofa-integration
Version Compatibility
Reference examples tested with: MOFA2 1.12+ (Bioconductor), mofapy2 0.7+, muon 0.1+.
Before using code patterns, verify installed versions match. If versions differ:
- R:
packageVersion('MOFA2')then?function_nameto verify parameters - Python:
pip show mofapy2 muonthenhelp(module.function)to check signatures
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
MOFA2 is R/Bioconductor and trains through the Python mofapy2 backend via basilisk/reticulate; the trained model serializes to an .hdf5 file whose schema is version-coupled. The R defaults differ from the muon Python defaults (spikeslab_weights, ard_factors, seed 42 vs 1) - confirm per ecosystem.
MOFA2 Integration
"Find shared variation across my omics layers" -> Learn unsupervised latent factors that decompose variation into shared and view-specific axes - because the factors are found WITHOUT the phenotype, so a factor need not separate the groups of interest, and the variance-explained table is the read-out.
- R:
create_mofa(data_list)->prepare_mofa()->run_mofa() - Python:
mofapy2for training,muon/mofaxfor downstream