deepSCENIC
Deep learning for single-cell Gene Regulatory Networks
deepSCENIC learns hierarchical TF→region→gene regulatory cascades by integrating scRNA-seq, scATAC-seq, and DNA sequence data. It combines a VAE-based multimodal framework with Enformer-derived sequence embeddings to infer cell-type-specific gene regulatory networks.
Key Features
- Multimodal integration: Jointly models RNA expression and chromatin accessibility
- Sequence-informed: Uses Enformer to learn TF binding patterns from DNA sequence
- Perturbation prediction: Simulates TF knockdown/overexpression effects
- scverse compatible: Works with AnnData, MuData, and scanpy workflows
Installation
pip install deepscenic
If you want to use the enformer model as the sequence model (this is the default):
pip install deepscenic[enformer]
Requirements: Python ≥3.12, PyTorch ≥2.6
Documentation
Full documentation including tutorials and API reference: deepscenic.readthedocs.io
Quick Start
deepSCENIC follows the scanpy-style API with modules for preprocessing (ds.pp), tools (ds.tl), and plotting (ds.pl).
Data Preparation
import deepscenic as ds
# Annotate transcription factors on the RNA data
tfs = ds.fetch_tf_collection(species="human")
ds.pp.mark_tfs(adata_rna, tf_list=tfs)
# Add gene annotations (for chromosome-based splitting)
annot, chromsizes = ds.fetch_gene_annotation(species="hsapiens")
ds.pp.add_gene_annotation(adata_rna, gene_annotation=annot)
mdata = ds.pp.create_mudata(rna=adata_rna, atac=adata_atac)
# Compute region-to-gene search space (regions within 1Mb of gene TSS)
ds.pp.compute_r2g_penalty(mdata)
# Split cells and features for training/evaluation
ds.pp.split_cells(mdata, test_fraction=0.2, stratify_key="cell_type")
ds.pp.split_features_by_chromosome(mdata, test_chromosomes=["chr7", "chr11"])
Model Training
# Register genome for sequence extraction
ds.register_genome("/path/to/hg38.fa")
# Phase 1: Train full model (VAE + MotifNet + Enformer)
model = ds.tl.train(mdata, epochs=100, device="cuda")
# Phase 2: Recompute tf2r and finetune all r2g links
model = ds.tl.finetune_r2g(
model,
mdata,
epochs=500,
)
# Save trained model
model.save("my_model.pt")
GRN Extraction & Analysis
# Extract gene regulatory network
grn = ds.tl.extract_grn(model)
# Get targets of a specific TF
targets = ds.tl.get_tf_targets(model, tf_name="SOX10", top_k=100)
# Visualize GRN heatmap
ds.pl.heatmap_grn(model, tfs=["SOX10", "MITF", "PAX3"])
Perturbation Simulation
# Simulate TF knockdown (level=0) or overexpression (level=2)
perturbed, logFC = ds.tl.simulate_perturbation(
model,
mdata,
tf_name="SOX10",
level=0, # knockdown
)
# Summarize and visualize perturbation effects
results = ds.tl.process_perturbation_results(logFC, mdata, tf_name="SOX10")
ds.pl.waterfall_perturbation(results)
For complete workflows, see the tutorials.
Citation
If you use deepSCENIC in your research, please cite:
Partel G, et al. DeepSCENIC: transfer learning from sequence-to-function models enables causal gene regulatory network inference. bioRxiv (2026). doi:10.64898/2026.09.18.752607
@article{partel2026deepscenic,
title={DeepSCENIC: transfer learning from sequence-to-function models enables causal gene regulatory network inference},
author={Partel, Gabriele and De Winter, Seppe and Konstantakos, Vasileios and Blaauw, Casper H. and Aerts, Stein},
journal={bioRxiv},
year={2026},
doi={10.64898/2026.09.18.752607}
}
Links
- Documentation
- GitHub Repository
- Issue Tracker
- Enformer PyTorch - Sequence model implementation
Metadata
Release files for deepscenic 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| deepscenic-0.1.0.tar.gz | 1.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deepscenic-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / deepscenic-0.1.0.tar.gz
| Download URL | deepscenic-0.1.0.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11da8f792321ad63a55fa01b6fdf4524edac945fa6c193402425908055dc1f34
|
|
BLAKE2b-256 checksum How to use checksums |
b437bdab8617acc1aac7a9fca14df0149bc344cd2f7c75ff61a9004bf3c995be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 7, 2026.
Transparency logRelease files / deepscenic-0.1.0-py3-none-any.whl
| Download URL | deepscenic-0.1.0-py3-none-any.whl |
|---|---|
| Size | 125.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa7a8bb2d7bfd37f7de0078bc60d08bf731369d8ef9686110d308795e67e8ac9
|
|
BLAKE2b-256 checksum How to use checksums |
7be866bc2c78ae4484fc80f546096ef59ed9ba5ff8c0e4d0fd3ec90856238b70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 7, 2026.
Transparency log