Skip to main content
scROMA

PyPI Docs CI License: GPL v3 Python

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scroma-0.3.2.tar.gz (376.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scroma-0.3.2-py3-none-any.whl (375.7 kB view details)

Uploaded Python 3

File details

Details for the file scroma-0.3.2.tar.gz.

File metadata

  • Download URL: scroma-0.3.2.tar.gz
  • Upload date:
  • Size: 376.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for scroma-0.3.2.tar.gz
Algorithm Hash digest
SHA256 58cc4f2b9a5d11860e9b157bb7eac9a9026b126c7c9a4b268a754b62e352a162
MD5 438263230f3393a31b6afc7c7faa9668
BLAKE2b-256 4c15fceed062def29162b6125942ff2675560dc4ace8cb85a2a86d37ccea5abc

See more details on using hashes here.

Provenance

The following attestation bundles were made for scroma-0.3.2.tar.gz:

Publisher: release.yml on altyn-bulmers/scroma

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scroma-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: scroma-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 375.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for scroma-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9be2f450683310f2d70c8896cd40543e547daba34de37a1fef65fa1192c5b8f5
MD5 cab8689872e332f6fe48dedd20aab35e
BLAKE2b-256 327df4216e36af5282eee211335d5c6f2a0c35b6deebb82e7e9b73c2a020c4e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for scroma-0.3.2-py3-none-any.whl:

Publisher: release.yml on altyn-bulmers/scroma

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.3

2 files

This release

0.3.2 This release

2 files

0.3.1

2 files

0.3.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page