Skip to main content

RustScenic logo

RustScenic

Built to be the simplest, fastest way to run regulatory-network analysis.

Inputs → RustScenic → outputs. RNA expression, a TF list and optional ATAC enter RustScenic, one Python package with a Rust backend. It produces regulatory networks, regulons and per-cell regulon activity scores. Motif data support refinement; optional ATAC and gene coordinates support enhancer links and eRegulons.

A Rust rewrite of core pySCENIC and SCENIC+ analysis stages, with a Python API.
Built and scaled with the Huang Lab at Mount Sinai.

CI PyPI version Software license: Apache-2.0 Software DOI on Zenodo
Docs Nightly real-data validation Python Rust

Install · Documentation · Benchmarks · Validation · Try the example · Download the dataset · Cite the software

  • 14.4× faster, 57% lower measured peak memory than SCENIC+ on 817,740 paired RNA+ATAC cells in our configured workflow benchmark.
  • 4× faster, 96.6% lower measured peak memory than pySCENIC on 1.3 million real RNA cells. Three seeds, 16 CPUs, selected feature panels; algorithms and outputs differ.
  • 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.7.0. Regular CPython 3.10–3.14; 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.7.0. For a clean environment, see Installation.

Prefer Conda packages? Follow the Bioconda install instructions for Linux or Intel macOS.

Run a working example

Run GRN inference and candidate gene-set scoring on PBMC3k in the executable notebook:

Open in Colab

The notebook installs the published package, downloads the public RNA data and saves network edges, per-cell activity scores and run settings. For a local script, follow the PBMC3k walkthrough.

Analyse your own data

For motif-supported networks and cell activity, use the audited RNA or paired RNA+ATAC workflow. It records retained regulators, uses verified seeded scoring and never substitutes unfiltered candidates when motif filtering fails.

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


Performance

Configured RNA+ATAC workflows on 817,740 real cells: RustScenic 102.55 minutes and 149.88 GB peak sampled PSS versus SCENIC+ 1,474.23 minutes and 349.05 GB. 14.4 times faster, 57.1 percent lower measured peak memory. Three seeds, 16 CPUs; algorithms and outputs differ.

14.4× faster analysis and 57% lower measured peak memory than SCENIC+ on 817,740 paired RNA+ATAC cells. Median workflow time: 102.5 vs 1,474.2 minutes; peak measured memory: 149.88 vs 349.05 GB.

4× faster with 96.6% lower measured peak memory than pySCENIC on 1.3 million real RNA cells: 42.3 vs 168.4 minutes.

Medians of three matched seeds on 16 CPUs. Prepared-input loading through export; raw-data preparation excluded. RNA: 3,000 genes; paired: 5,000 genes and 20,000 regions; both use 256 TFs. Memory is sampled process-tree PSS. Measured with v0.5.0 and the documented workflow adapter; method-specific linking, pruning and assembly produce different networks.

Biological utility: separate activity directions closed the average external macro-F1 gap: 0.7123 vs 0.7113 for SCENIC+ networks on 12,315 cells from eight donors. This reused-cohort confirmation retains a 1.5-point recall gap. Results, controls and conditions · Run the audited workflow

RNA workflow: 1.3 million cells versus pySCENIC Configured RNA workflow: 3.98 times faster and 96.6 percent lower measured peak memory than pySCENIC at 1,306,127 cells, using 3,000 genes, 256 TFs and 16 CPUs.

Peak PSS: 4.56 vs 134.88 GB. Three matched seeds; algorithms and outputs differ. Individual runs and all seven dataset sizes.

Core network inference: 1.3 million cells versus arboreto

RustScenic on 1.3 million real cells: 3.06 times faster gene-network analysis and 78.7 percent lower measured memory than arboreto Dask. Versus arboreto multiprocessing: 2.94 times faster and 54.5 percent lower memory. Medians of three matched seeds on 16 CPUs.

3.06× faster analysis and 78.7% lower peak measured memory than arboreto (Dask, sparse), using ratios of medians across three matched seeds on 1,306,127 real mouse-brain cells. Median analysis took 31m20s versus 96m00s, using 2.97 versus 13.93 GB peak sampled process-tree PSS.

Measured with RustScenic v0.5.0, 2,095 selected genes, 256 transcription factors and 16 CPU cores on matched inputs and hardware. This measures core GRN analysis, excluding input preparation and loading. Network rankings differ; biological equivalence is not claimed. Against sparse multiprocessing arboreto, the separate result is 2.94× faster with 54.5% lower PSS.

Measurements, seeds and conditions · SCENIC+ comparisons and output agreement

Earlier 20,000-cell benchmark and real-RNA scaling
  • 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.

RustScenic real-RNA scaling and matched arboreto comparisons

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.

Commands and output agreement · Recorded measurements


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.

ETS1 predicted targets in the endothelial-cell example

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.


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.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rustscenic 0.7.0
File Size Uploaded Provenance Actions
rustscenic-0.7.0.tar.gz 242.7 kB With provenance Details for rustscenic-0.7.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for rustscenic 0.7.0
File Actions
rustscenic-0.7.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for rustscenic-0.7.0-cp310-abi3-win_amd64.whl
rustscenic-0.7.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for rustscenic-0.7.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
rustscenic-0.7.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for rustscenic-0.7.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
rustscenic-0.7.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for rustscenic-0.7.0-cp310-abi3-macosx_11_0_arm64.whl
rustscenic-0.7.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for rustscenic-0.7.0-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 6.3 MB

Release files / rustscenic-0.7.0.tar.gz

Download URL rustscenic-0.7.0.tar.gz
Size 242.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7a10768f318089c67545ddca2c1f2e00a046f7318b9cb1b81f0cd16ee72c00c3
BLAKE2b-256 checksum
How to use checksums
9b16e3264eed548efb72bf085a2c90a099d32bc9c8517175da3c0224178f34b5
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 Nov 19, 2026.

Transparency log

Release files / rustscenic-0.7.0-cp310-abi3-win_amd64.whl

Download URL rustscenic-0.7.0-cp310-abi3-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a0607dc91aab6a6b521a36271da8d72ade534cf0ee8ddef244c32a4f49842961
BLAKE2b-256 checksum
How to use checksums
88a1b5df60d5b3709abf977085ca5f671bc1f3f8ab35012b5351a3fefa3ddbdd
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 Nov 19, 2026.

Transparency log

Release files / rustscenic-0.7.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL rustscenic-0.7.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.3 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
2ae7f5bbd2e92e664100d5a375e33da4b8f938bcfac6f6edf4fb8a2204096eb8
BLAKE2b-256 checksum
How to use checksums
5fc67b730534c2266ba2001c76c93ef4da5fe241419e064067cda133efc94676
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 Nov 19, 2026.

Transparency log

Release files / rustscenic-0.7.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL rustscenic-0.7.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.2 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
37fc94b63541b66b2a4ac72cdbcdbf688aea4b4379164ce4a6d26592c927c670
BLAKE2b-256 checksum
How to use checksums
df402c96dcfc0bdbaf599528736932486c79651b638a742e7ff87fc5db5dd34f
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 Nov 19, 2026.

Transparency log

Release files / rustscenic-0.7.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL rustscenic-0.7.0-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
7a1498a5332a5e928ffd9d3f6a5bd175f2482f8ddf3477919f4c059e34a03054
BLAKE2b-256 checksum
How to use checksums
dbaacf7983d7be5a29659693dc7b7a98688fed9edf541204aaf07859b9d38e01
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 Nov 19, 2026.

Transparency log

Release files / rustscenic-0.7.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL rustscenic-0.7.0-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
3bae93e0c68aa624f9accd74279658db438cf9ee58720087c2eaf5f47cc730bc
BLAKE2b-256 checksum
How to use checksums
146ed44dec38721630253b368c04f1a3959334e98625854660fcb72faad160db
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 Nov 19, 2026.

Transparency log

Security for rustscenic 0.7.0

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.

Select from 6 files

Attestation for rustscenic-0.7.0.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 Nov 19, 2026.

Transparency log

A 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.

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