Built to be the simplest, fastest way to run regulatory-network analysis.
A Rust rewrite of core pySCENIC
and SCENIC+ analysis stages, with a Python API.
Developed and scaled with the
Huang Lab at Mount Sinai.
Install · Documentation · Benchmarks · Validation · Try the example · Download the dataset · Cite the software
- 1.3 million real cells: RNA gene regulatory network (GRN) inference in 46m42s on 16 CPU cores, using 2,095 selected genes and 256 transcription factors.
- 2.04–3.33× faster than arboreto in matched 20,000-cell comparisons; 81% lower physical memory in the measured Intel-node comparison.
- 704 human cell labels: precomputed exploratory networks from CELLxGENE Census, openly available on Zenodo. Explore the endothelial-cell example below or download the full collection.
Get started
Current release: v0.5.1. Python 3.10–3.13; Linux, macOS and Windows.
Runs on CPUs; no GPU or Rust setup needed with prebuilt packages.
python -m pip install rustscenic
python -c "import rustscenic; print(rustscenic.__version__)"
Expected version: 0.5.1. For a clean environment, see
Installation.
Run a working example
Run the PBMC3k walkthrough. It downloads a small RNA dataset
and saves network edges (grn.parquet) and per-cell activity scores
(aucell.parquet).
Analyse your own data
Use an RNA AnnData file (rna.h5ad) with cells × genes, log-normalised
expression in adata.X and gene symbols in adata.var_names.
import anndata as ad
from rustscenic import data, grn
adata = ad.read_h5ad("rna.h5ad")
edges = grn.infer(
adata, tf_names=data.tfs("hs"), n_estimators=500,
top_targets_per_tf=50, seed=777,
)
edges.to_parquet("grn.parquet")
print(edges.head())
Input formats and species
The example uses human transcription factors; use data.tfs("mm") for mouse.
For expression layers and Ensembl identifiers, see the
input guide.
For R inputs, see the Seurat / R guide
for explicit RNA layer selection and a sparse matrix round-trip.
Score candidate gene-set activity
Continue with the network above. These candidate sets are not motif-filtered or split by correlation sign.
import rustscenic.aucell
regulons = {
tf: group["target"].tolist()
for tf, group in edges.groupby("TF")
if len(group) >= 10
}
auc = rustscenic.aucell.score(adata, regulons, top_frac=0.05)
auc.to_parquet("aucell.parquet")
For target sets separated by correlation sign, use add_correlation,
build_regulons or the rustscenic add-cor command; see the
API map. A correlation sign is not experimental proof
of activation or repression.
Command-line examples
Run the RNA pipeline on the same prepared rna.h5ad. The hs shortcut uses
the bundled human TF list; use mm for mouse.
rustscenic pipeline --rna rna.h5ad --tfs hs --output out/
Results are written to out/. Motif filtering needs motif rankings and
annotation inputs. See the RNA quickstart for input
guidance and the API map for motif and multiome stages.
API coverage: eight analysis stages
| Stage | Python API | Purpose |
|---|---|---|
| Gene networks | rustscenic.grn.infer |
GRNBoost2-style TF-to-gene inference |
| AUCell | rustscenic.aucell.score |
Per-cell gene-set activity |
| cisTarget | rustscenic.cistarget.enrich |
Motif enrichment and support filtering |
| Topics | rustscenic.topics.fit, fit_gibbs |
scATAC topic modelling |
| ATAC preprocessing | rustscenic.preproc |
Fragment matrix building and QC |
| Enhancer links | rustscenic.enhancer.link_peaks_to_genes |
Peak-to-gene linking |
| eRegulons | rustscenic.eregulon.build_eregulons |
Enhancer-linked regulon assembly |
| Pipeline | rustscenic.pipeline.run |
Staged RNA and multiome workflows |
Upgrading from 0.4.x
v0.5.0 follows arboreto's GRN stopping rule and defaults to separate activator
and repressor regulons in the pipeline. To reproduce older behaviour, use
early_stop_mode="legacy_inbag" for GRN fitting and
grn_regulon_polarities="unsigned" in the pipeline.
See the v0.5.0 release notes for memory improvements and compatibility details. v0.5.0 is Apache-2.0; earlier published 0.4.x releases remain MIT.
Full quickstart · PBMC3k end-to-end example · Tester guide
Try a network
Open the interactive example
to choose a regulator and inspect its predicted targets. No installation or
model fitting is needed. For offline use, download the ZIP,
extract it and open explore.html.
The example includes the complete 184,000-edge network, 85 motif-supported regulons, activity summaries and source-study citations.
Inside the extracted folder, Python users can run:
python3 example.py --tf ETS1
If RustScenic is useful to you, star the repository.
Performance
The million-cell result measures GRN inference on prepared mouse-brain RNA. Separate input preparation took 7m18s and peaked at 71.5 GB, versus 4.28 GB during inference. The arboreto comparisons use matching inputs and worker counts; each is a single observation, not a repeated-run average. These results were measured on the v0.5.0 release candidate and do not describe a complete million-cell spatial workflow.
Exact measurements and conditions · SCENIC+ comparisons and output agreement
Topic-model memory and selected SCENIC+ comparisons
- 21.4% lower topic-model peak memory: 1,668.2 → 1,312.0 MB median across three baseline and three optimised mouse-brain runs, with identical output files. This v0.5.0 candidate audit used five sampling sweeps to test storage efficiency, not model convergence. Memory audit.
- 11–52× faster than SCENIC+ on selected stages using sampled real-data inputs of 1,500–2,000 cells. Enhancer-linking methods differ, and output agreement is incomplete; these timings do not establish equivalent scientific performance.
SCENIC+ timings, input sizes and conditions
| Dataset | Input: cells / genes / peaks / TFs | RustScenic | SCENIC+ | Speedup | Peak RSS: RustScenic / SCENIC+ |
|---|---|---|---|---|---|
| PBMC3k dense | 2,000 / 4,000 / 8,000 / 30 | 4.98 s | 258.9 s | 52× | 1.21 / 1.26 GB |
| PBMC10k dense | 2,000 / 4,000 / 8,000 / 30 | 21.5 s | 241.5 s | 11× | 2.37 / 2.63 GB |
| Mouse brain E18 | 1,500 / 3,000 / 6,000 / 25 | 2.82 s | 90.4 s | 32× | 1.65 / 2.10 GB |
| Human brain GEM-X | 2,000 / 4,000 / 8,000 / 30 | 7.41 s | 146.0 s | 19.7× | 2.18 / 2.19 GB |
Measured on an Apple M5, 16 GB RAM, macOS arm64, four CPU threads and seed 777. Python: 3.13.9 for RustScenic; 3.11.8 for SCENIC+. Shapes are the actual sampled benchmark inputs. Including preparation, the human-brain row totals 11.89 s versus 150.36 s.
The comparison starts with prepared RNA, ATAC and cistromes, and measures GRN inference, enhancer links, eRegulons and gene/region AUCell. It excludes raw-fragment processing, topic modelling, motif-database construction and workflow scheduling. RustScenic uses correlation over a fixed search space for enhancer links; SCENIC+ uses boosted trees plus Pearson scoring.
Validation
The Huang Lab human-brain run recovered 16/17 expected transcription factors in 8,215 post-QC cells with v0.4.6. This is a biological sanity check, not an accuracy estimate. Agreement with reference tools varies by stage; full output parity is not claimed.
Validation results and remaining output differences
| Check | Result |
|---|---|
| Huang Lab human-brain run | 16/17 expected transcription factors recovered in 8,215 post-QC cells with v0.4.6. A biological sanity check, not an accuracy estimate. |
| AUCell vs pySCENIC | Ziegler 2021 airway atlas: mean per-cell Pearson 0.984; 91.7% of cells above 0.95. |
| cisTarget AUC kernel vs ctxcore | Pearson 1.0000; mean absolute difference approximately 2.4e-5. |
| Human brain GEM-X vs SCENIC+ | Region-to-gene edge Jaccard 1.000 under the fixed search space; region AUCell mean Pearson 0.823. |
| Remaining output differences | On the same GEM-X comparison, gene AUCell Pearson is 0.386 and eRegulon edge Jaccard is 0.161. Full output parity is not claimed. |
Validation and limitations · Huang Lab run record · Benchmark output agreement
Explore how genes are regulated in human cells
We used RustScenic to analyse public single-cell data from CELLxGENE Census and predict links between gene regulators and their target genes.
Try the endothelial-cell example · Download the networks
Dataset details and methods
Find a cell label and load results
Version 1.0.0, published on Zenodo under CC BY 4.0. The collection contains 137.8 million retained edges and 51,527 motif-supported regulons across 704 human Cell Ontology labels, drawing on 565 source datasets in CELLxGENE Census 2025-11-08. Each cohort uses up to 5,000 cells balanced by dataset and donor.
Download network tables, motif evidence, regulons and aggregate activity summaries with source citations, methods and checksums. Reuse the results without rerunning inference. Raw expression and cell-level records are excluded.
All outputs passed integrity and content-consistency checks. These are exploratory predictions; motif support and successful execution do not establish biological accuracy. Pooled cohorts span tissues and disease annotations, and activity scores are not directly comparable across cohorts.
The networks are derived from CELLxGENE Census and independently hosted on Zenodo; they are not a CELLxGENE-hosted or endorsed dataset.
The result: networks covering 704 human cell labels and 137.8 million predicted links, freely available for researchers to explore and reuse without rerunning the analysis.
Documentation
Installation · API map · Python API reference · HPC operation · Benchmarks · Validation · Scope · Release notes
Citation and contribution
Cite the exact RustScenic release used; GitHub citation metadata is in CITATION.cff.
When using the CELLxGENE-derived networks, also cite the dataset, CELLxGENE and the contributing studies supplied with the data. See dataset credits and citation.
Software and example code: Apache-2.0. Derived data and resource documentation: CC BY 4.0; see the data-licence notice.
See AUTHORS.md for the project team and contribution roles. Questions, bugs and reproducible examples are welcome in GitHub Issues.
Metadata
Release files for rustscenic 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rustscenic-0.5.1.tar.gz | 222.0 kB | With provenance | Details for rustscenic-0.5.1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| rustscenic-0.5.1-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for rustscenic-0.5.1-cp310-abi3-win_amd64.whl |
| rustscenic-0.5.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details for rustscenic-0.5.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| rustscenic-0.5.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details for rustscenic-0.5.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| rustscenic-0.5.1-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for rustscenic-0.5.1-cp310-abi3-macosx_11_0_arm64.whl |
| rustscenic-0.5.1-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details for rustscenic-0.5.1-cp310-abi3-macosx_10_12_x86_64.whl |
Total release size: 6.1 MB
Release files / rustscenic-0.5.1.tar.gz
| Download URL | rustscenic-0.5.1.tar.gz |
|---|---|
| Size | 222.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dec6166fb1236a313418895c67d2a2bf6a74c0ddaf94004a479c9244202c449f
|
|
BLAKE2b-256 checksum How to use checksums |
c0ad92d204ebffc04f9235521f5cf13ef3c3123009ad678657a6d7844c2e12d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logRelease files / rustscenic-0.5.1-cp310-abi3-win_amd64.whl
| Download URL | rustscenic-0.5.1-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
2af0b404aeb8bb645870fb99be2ea8d796db6db2d3c18278b591bc86de48ffd3
|
|
BLAKE2b-256 checksum How to use checksums |
b303e5dc74c03545e471e4cdfe54726ff466a1850f69b93ac3e8d5cc6754034b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logRelease files / rustscenic-0.5.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | rustscenic-0.5.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
b5f577c7d75fded931a737cee7296b34ce4b154478cc768f4c0ef90623128c5f
|
|
BLAKE2b-256 checksum How to use checksums |
702c0339eb6ef3804b8dd0a828b342a543abe32f380267d0b145116e4c91a1fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logRelease files / rustscenic-0.5.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | rustscenic-0.5.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
bb9125b9b3e0dae47f3a20cd09f65d4ea7dab6a1a1d1e4f9bdb4eb8ba4d43d7a
|
|
BLAKE2b-256 checksum How to use checksums |
5c10d27bbbe714ee3ae0cec2750eb43ff63ba51f563aa6b06221759ff543c423
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logRelease files / rustscenic-0.5.1-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | rustscenic-0.5.1-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
af529e22b409ec56cb5dc82a74ff9cc8914b1c6edab9cacfc2e961d08225a525
|
|
BLAKE2b-256 checksum How to use checksums |
9cf129846105130d6a18f3792d724557fa67a960798385ca3f0d0a7f8b138d51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logRelease files / rustscenic-0.5.1-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | rustscenic-0.5.1-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
400cca04639ea52460a0437202c83db60a426807c309edace7ce6f583351da0d
|
|
BLAKE2b-256 checksum How to use checksums |
604955812a06d26d8a996dc4974fb8b559ed620e7e4eecafd6fcdeb1c84e3734
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logSecurity for rustscenic 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for rustscenic-0.5.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.