Batch-aware SVD-based pathway-activity inference and a ground-truth simulation framework for single-cell transcriptomics
Project description
scROMA
Batch-aware, SVD-based pathway-activity inference for single-cell transcriptomics, natively integrated with the Scanpy/AnnData ecosystem. scROMA is a Python implementation of ROMA (Representation and Quantification Of Module Activity) that scores each gene set from the coordinated variation among its member genes, with per-cell activity scores, per-gene contributions, and permutation-based significance. Its batch-aware extension corrects technical variation inside the gene-set subspace rather than across the whole transcriptome, and it ships with a generative simulation framework that produces data with fully specified ground-truth pathway activity.
Install
pip install scroma
# or with uv:
uv pip install scroma # into the active environment
uv add scroma # into a uv project
Requires Python ≥ 3.10 and anndata ≥ 0.12. Tutorial datasets download on first use (via pooch).
Quick start
import scroma
# --- core pathway-activity scoring ---
adata = scroma.datasets.pbmc3k() # downloaded + cached on first use
roma = scroma.ROMA()
roma.adata = adata
roma.gmt = scroma.use_hallmarks() # bundled MSigDB Hallmark gene sets
roma.compute()
roma.summary() # significantly active pathways
# --- batch-aware scoring (correction within the gene-set subspace) ---
broma = scroma.BatchAwareROMA()
broma.adata = adata
broma.gmt = scroma.use_hallmarks()
broma.compute(batch_key="batch", batch_method="harmonylike")
# --- simulation with ground-truth pathway activity ---
sim = scroma.simulate(n_batches=3, seed=42) # AnnData + ground truth in .obsm/.uns
reps = scroma.load_benchmark("multi") # 10 default benchmark replicates
Features
- Two complementary scores per gene set: an L1 overdispersion score and a median-expression shift score, plus per-cell activity scores and per-gene contribution weights.
- Permutation significance with Benjamini–Hochberg correction.
- Batch-aware correction within each gene set (
residualized,contrastive,weighted,centered,ComBat,MNN,harmonylike). - Ground-truth simulator (
scroma.simulate/scroma.load_benchmark) for quantitative benchmarking. - Bundled gene sets (
use_hallmarks,use_reactome,use_progeny) and one-call tutorial datasets (datasets.pbmc3k,datasets.pbmc_ifnb).
Documentation
Full docs and tutorials: https://scroma.readthedocs.io
- Getting started — scoring pathway activity on PBMCs
- Simulated data — visualising ground truth and computing AUROC
- Gene-set weights — which genes drive a pathway
- Pathway-activity clustermap
Citing scROMA
If you use scROMA, please cite the paper (see CITATION.cff).
License
scROMA is released under the GNU GPL v3.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scroma-0.3.0.tar.gz.
File metadata
- Download URL: scroma-0.3.0.tar.gz
- Upload date:
- Size: 369.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
972999056c27c4d1ccdd37c1f7bbe441cc3357dc2de21aea079261b557f003ff
|
|
| MD5 |
8ebea4ed50a84301ddf75835dcaf4d0c
|
|
| BLAKE2b-256 |
ae0d541b5f988a541dae8e14e19d1e28c472f58f552fbc1702976f2207ca27d2
|
Provenance
The following attestation bundles were made for scroma-0.3.0.tar.gz:
Publisher:
release.yml on altyn-bulmers/scroma
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scroma-0.3.0.tar.gz -
Subject digest:
972999056c27c4d1ccdd37c1f7bbe441cc3357dc2de21aea079261b557f003ff - Sigstore transparency entry: 2222589546
- Sigstore integration time:
-
Permalink:
altyn-bulmers/scroma@a178fd85b6325af6ebbf09cd2f7677d3a06df2c8 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/altyn-bulmers
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a178fd85b6325af6ebbf09cd2f7677d3a06df2c8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file scroma-0.3.0-py3-none-any.whl.
File metadata
- Download URL: scroma-0.3.0-py3-none-any.whl
- Upload date:
- Size: 373.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e907abe97b8abef036ca53b2d7fe75f1b1501e22e8a4dc480acce2616bc2ad0
|
|
| MD5 |
64982beb095e8cc3027a9fcfdc0a48cf
|
|
| BLAKE2b-256 |
020c876d7b3cd82feb76b1ce0cd3d0726b56bd9136d9f4f8dd8de84386cd6b86
|
Provenance
The following attestation bundles were made for scroma-0.3.0-py3-none-any.whl:
Publisher:
release.yml on altyn-bulmers/scroma
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scroma-0.3.0-py3-none-any.whl -
Subject digest:
2e907abe97b8abef036ca53b2d7fe75f1b1501e22e8a4dc480acce2616bc2ad0 - Sigstore transparency entry: 2222590358
- Sigstore integration time:
-
Permalink:
altyn-bulmers/scroma@a178fd85b6325af6ebbf09cd2f7677d3a06df2c8 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/altyn-bulmers
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a178fd85b6325af6ebbf09cd2f7677d3a06df2c8 -
Trigger Event:
push
-
Statement type: