Multi-Omics Factor Analysis v2 (MOFA+) with mofapy2. Jointly decompose omics layers (scRNA, ATAC, proteomics, methylation) into latent factors capturing major variation. Multi-group designs. AnnData views → MOFA object → train → variance explained → correlate factors with metadata → visualize/cluster → enrich top loadings.
SkillScore100Maintained
Automatic
◆Data Analyst pack
Last verified 9/3/2026
What it changes
Passed 22 of 22 test cases with the skill, and 11 of 22 without it.
Without skill50%
With skill100%
Checks it passed that the model alone missed
Passes freqELBO=5 to set_train_options.
Passes dropR2=0.01 to set_train_options.
Passes startELBO=10 to set_train_options.
and 15 more in the full report
11 fixed11 passed either way0 still failing0 broke
Pass-rate lift
+50 pp
Tokens
+212%
Agent turns
0%
Response time
-32%
Model gemini-3.6-flashMeasured 9/3/2026v2 · latest is v322 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
This benchmark measured an earlier version of the skill.
See it in action
One of 11 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 11
Prompt
I have called set_data_matrix, set_model_options, and set_train_options on my mofapy2 entry_point instance. What exact method calls must be executed in sequence to build internal structures, run variational inference, and save the fitted model to output.hdf5?
What was checked, without and with the skill
Checked
Without skill
With skill
Calls build() on the entry point instance before running inference.
Missed
Passed
Calls run() on the entry point instance to perform variational EM training.
Passed
Passed
Calls save("output.hdf5") on the entry point instance.
Passed
Passed
case-18 · gemini-3.6-flash · 9/3/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md558 linessingle file
MOFA+ Multi-Omics Factor Analysis
Overview
MOFA+ (Multi-Omics Factor Analysis v2) is an unsupervised statistical framework that jointly decomposes multiple omics datasets into a small set of latent factors. Each factor captures an independent source of variation (e.g., cell cycle, a disease phenotype, a technical batch) and is associated with feature weights (loadings) that reveal which genes, peaks, or proteins drive it. The Python package mofapy2 produces an HDF5 model file compatible with downstream analysis in both Python and R. MOFA+ extends the original MOFA to support multi-group settings where samples belong to distinct cohorts or conditions.
When to Use
Integrating two or more omics layers from the same set of cells or samples (e.g., scRNA-seq + scATAC-seq, RNA + proteomics, methylation + RNA)
Identifying shared and view-specific sources of variation across omics modalities without supervised labels
Comparing how latent factors differ between patient groups, treatment conditions, or time points in a multi-group analysis
Reducing multi-omics dimensionality before clustering, trajectory inference, or survival modeling
Discovering which genomic features (genes, peaks, proteins) drive each factor via sparse loadings
Annotating latent factors by correlating factor scores with sample metadata (age, stage, treatment response)
Use omics-plotting SKILL after training for publication-quality factor scatter and loading heatmaps
Use scVI / MultiVI (scverse) instead when you need deep generative batch correction across modalities with explicit latent space inference and VAE architecture
Use LIGER instead when your primary goal is integrating datasets across technologies (e.g., snRNA-seq + snATAC-seq) with shared and dataset-specific factors via iNMF
Data requirements: One AnnData object per omics view (cells/samples x features). All views must share the same obs (cell/sample) index. Missing samples per group are supported.
Environment: Python 3.9+; trained model is saved as HDF5 and can be analyzed in R via the MOFA2 Bioconductor package
Settle these with the user before writing any analysis code.
decisions:
- id: D1
param: views
kind: required
source: data
ask: "Which omics layers go into the model, and do they share the same samples?"
default: null