Skip to main content

deepSCENIC

Deep learning for single-cell Gene Regulatory Networks

Documentation PyPI

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}
}

Metadata

Release files for deepscenic 0.2.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 deepscenic 0.2.0
File Size Uploaded
deepscenic-0.2.0.tar.gz 2.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for deepscenic 0.2.0
File Interpreter ABI Platform
deepscenic-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.2 MB

Release files / deepscenic-0.2.0.tar.gz

Download URL deepscenic-0.2.0.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
503e18bdcd1789854b7ee767fd628ae92bf3ac06225ec1db6db1b1d82c300db0
BLAKE2b-256 checksum
How to use checksums
4122a03053b6ede2e06d6f05631f75b644054124bc77e3db0f7db0d4101d0503
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 13, 2026.

Transparency log

Release files / deepscenic-0.2.0-py3-none-any.whl

Download URL deepscenic-0.2.0-py3-none-any.whl
Size 130.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14755e7bbd7b6712de768baec0980bc675f53dc576a7ca65ad6b9644f34219bb
BLAKE2b-256 checksum
How to use checksums
ff836cb624bb8626e0a4b2caacc043e950abc4f48d8ee8c78676e8bcb05f295a
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 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release 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