Agent skill

mofaplus-multi-omics

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.

BioTender-maxgithub.com/BioTender-maxGitHub ↗
claude-codeNOASSERTION
Install
npx skills add BioTender-max/awesome-bio-agent-skills --skill mofaplus-multi-omics --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 24 KB
Bundled scripts: none
Path: skills/sciagent/mofaplus-multi-omics/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 144
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

The skill guides an agent to set up and run a MOFA+ model using mofapy2 to jointly decompose multiple omics views (RNA, ATAC, etc.) into latent factors. It covers loading and aligning AnnData views, configuring data, building and training an EM-based model, saving the trained HDF5 model, and post-hoc analyses such as inspecting variance explained per factor per view, extracting factor scores, correlating with metadata, visualizing factor relationships, and deriving top-weighted features for enrichment. It also includes downstream steps like clustering samples by factor scores and preparing inputs for enrichment analyses.

How it works

  • Load and prepare data: represent each omics layer as an AnnData object, align cell indices across modalities, and normalize as appropriate.
  • Create the MOFA+ model object: instantiate entry_point, configure data options (e.g., scale groups, scale views), provide data as a list-of-lists [groups][views], and name views and groups. Set data options before data and register data matrices, with per-view likelihoods and per-group samples.
  • Set model and training options: specify number of factors, spike-slab prior, automatic relevance determination for factors and weights, and training hyperparameters (iterations, convergence, ELBO tracking, pruning thresholds, seed).
  • Build and train: execute ent.build() then ent.run() and save the model to an HDF5 file via ent.save(output_path).
  • Inspect variance explained: load the MOFA+ HDF5 to compute variance explained per factor per view, averaging across groups, and display as a table/heatmap.
  • Extract factor scores and correlate with metadata: load Z matrices (factor scores) per sample, join with sample metadata, and perform simple ANOVA-style comparisons between groups.
  • Visualize factors: create scatter plots of factor scores colored by metadata; generate heatmaps of top feature weights per factor for a given view.
  • Downstream clustering and enrichment: cluster samples by standardized factor scores (e.g., KMeans), and prepare top-weighted genes per factor for downstream enrichment analyses.
  • Provide key parameters: list defaults and options for factors, likelihoods, and scale_views.

When to use it

  • When integrating two or more omics layers from the same cells/samples (e.g., RNA with ATAC, RNA with proteomics, methylation with RNA).
  • To identify shared and view-specific sources of variation without supervised labels.
  • To compare latent factors across patient groups, treatments, or timepoints in multi-group analyses.
  • To reduce multi-omics dimensionality before clustering, trajectory inference, or survival modeling.
  • To highlight which features drive each factor via weight loadings and to annotate factors via correlation with metadata.

What it can touch

  • Data inputs: AnnData objects for RNA and ATAC views, with aligned cell/sample indices.
  • Model components: HDF5 MOFA+ model file saved as an output, loaded for downstream inspection.
  • Outputs: variance explained data (per factor per view), factor scores (Z), feature weights (W) per view, clustering labels, and CSV/plots.

Caveats

  • Requires Python 3.9+ and specific packages: mofapy2, anndata, muon, matplotlib, seaborn, numpy, pandas, scipy. Model storage is HDF5.
  • The approach relies on proper data preprocessing and alignment across views; mismatches in sample indices can invalidate results.
  • The heuristic for pruning and the interpretation of factors depend on model options (e.g., factors count, ARD settings) and may vary with data complexity.
  • The workflow includes optional steps for enrichment that require external tools or libraries (e.g., gseapy) installed separately.
From the SKILL.md

# 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 (g

What's inside
Steps it walks through
  1. Overview
  2. When to Use
  3. Prerequisites
  4. Quick Start
  5. Workflow
  6. Step 1: Load and Prepare Multi-Omics Data
  7. Step 2: Create the MOFA+ Model Object
  8. Step 3: Set Model and Training Options
  9. Step 4: Build and Train the Model
  10. Step 5: Load Trained Model and Inspect Variance Explained
  11. Step 6: Extract Factor Scores and Correlate with Metadata
  12. Step 7: Visualize Factors — Scatter Plots and Feature Heatmaps
  13. Step 8: Downstream — Cluster Cells by Factor Scores and Enrichment
  14. Key Parameters
Commands it runs
pip install mofapy2 anndata muon matplotlib seaborn
More from awesome-bio-agent-skills
All skills →
About this skill
What does the mofaplus-multi-omics skill do?

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.

How do I install it?

Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill mofaplus-multi-omics --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From BioTender-max/awesome-bio-agent-skills, a repository with 144 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going