mofaplus-multi-omics
БесплатноБез исполняемых скриптовНе проверенMulti-Omics Factor Analysis v2 (MOFA+) with mofapy2. Jointly decompose omics layers (scRNA, ATAC, proteomics, methylation) into latent factors capturing major…
от FridrichMethod★ 17 звёзд на GitHubОб этом скилле
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
Prerequisites
- Python packages:
mofapy2>=0.7,anndata>=0.10,numpy>=1.24,pandas>=2.0,scipy>=1.11,matplotlib>=3.7,seaborn>=0.13,muon(optional, for MuData integration) - 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
MOFA2Bioconductor package
pip install mofapy2 anndata muon matplotlib seaborn
Pre-flight Interview
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
- id: D2
param: likelihoods
kind: required
source: data
depends_on: [D1]
ask: "For each layer, is the data continuous and normalized, binary, or raw counts?"
default: null
- id: D3
param: scaleViews
kind: required
source: user
depends_on: [D1]
ask: "Should layers be rescaled so the one with the largest variance does not dominate every factor?"
default: "rescaled"
- id: D4
param: numFactors
kind: required
source: user
ask: "How many latent factors should the model start from? Unused ones are pruned automatically."
default: 15
- id: D5
param: groups
kind: optional
source: data
ask: "Should samples be split into groups so the model can compare variance across them?"
default: "one group"
- id: D6
param: convergence
kind: optional
source: user
ask: "Stop early for a quick look, or run to a tight tolerance for the final model?"
default: "medium tolerance, up to 1000 iterations"
- id: D7
param: factorDropThreshold
kind: optional
source: user
ask: "Drop factors that explain almost no variance in any layer?"
default: "drop below 1% variance explained"
- id: D8
param: sparsityPriors
kind: optional
source: user
ask: "Should MOFA retain spike-and-slab weights and per-view relevance priors for sparse, interpretable factors?"
default: "both enabled"
D2 hangs on D1 and is the decision that breaks models quietly: handing raw counts to a layer declared gaussian fits the model to sequencing depth, and the factors that come back are depth, not biology.
Quick Start
import numpy as np
import pandas as pd
import anndata as ad
from mofapy2.run.entry_point import entry_point
# Simulate two omics views, 200 cells, 500 RNA genes, 300 ATAC peaks
np.random.seed(42)
n_cells, n_rna, n_atac = 200, 500, 300
adata_rna = ad.AnnData(np.abs(np.random.randn(n_cells, n_rna)),
obs=pd.DataFrame(index=[f"cell_{i}" for i in range(n_cells)]))
adata_atac = ad.AnnData(np.abs(np.random.randn(n_cells, n_atac)),
obs=adata_rna.obs.copy())
ent = entry_point()
ent.set_data_options(scale_groups=False, scale_views=True)
ent.set_data_matrix(adata_rna.X, adata_atac.X,
likelihoods=["gaus
Установить mofaplus-multi-omics в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл 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.
Как установить скилл mofaplus-multi-omics?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mofaplus-multi-omics запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic