Python Toolkit for Transcription Factor Activity Inference and Clustering of scRNA-seq Data
Project description
scRegulate
Single-Cell Regulatory-Embedded Variational Inference of Transcription Factor Activity from Gene Expression
Introduction
scRegulate is a powerful tool designed for the inference of transcription factor activity from single cell/nucleus RNA data using advanced generative modeling techniques. It leverages a unified learning framework to optimize the modeling of cellular regulatory networks, providing researchers with accurate insights into transcriptional regulation. With its efficient clustering capabilities, scRegulate facilitates the analysis of complex biological data, making it an essential resource for studies in genomics and molecular biology.
For further information and example tutorials, please check our documentation.
If you have any questions or concerns, feel free to open an issue.
Requirements
scRegulate is implemented in the PyTorch framework. Running scRegulate on CUDA is highly recommended if available.
Before installing and running scRegulate, ensure you have the following libraries installed:
- PyTorch (version 2.0 or higher)
Install with the exact command from the PyTorch “Get Started” page for your OS, Python version and (optionally) CUDA toolkit. - NumPy (version 1.23 or higher)
- Scanpy (version 1.9 or higher)
- Anndata (version 0.8 or higher)
You can install these dependencies using pip:
pip install torch numpy scanpy anndata
Installation
Option 1:
You can install scRegulate via pip for a lightweight installation:
pip install scregulate
Option 2:
Alternatively, if you want the latest, unreleased version, you can install it directly from the source on GitHub:
pip install git+https://github.com/YDaiLab/scRegulate.git
Option 3:
For users who prefer Conda or Mamba for environment management, you can install scRegulate along with extra dependencies:
Conda:
conda install -c zandigohar scregulate
Mamba:
mamba create -n scRegulate -c zandigohar scregulate
FAQ
Q1: Do I need a GPU to run scRegulate?
No, a GPU is not required. However, using a CUDA-enabled GPU is strongly recommended for faster training and inference, especially with large datasets.
Q2: How do I know if I can use a GPU with scRegulate?
There are two quick checks:
-
System check
In your terminal, runnvidia-smi. If you see your GPU listed (model, memory, driver version), your machine has an NVIDIA GPU with the driver installed. -
Python check
In a Python shell, run:import torch print(torch.cuda.is_available()) # True means PyTorch can see your GPU print(torch.cuda.device_count()) # How many GPUs are usable
Q3: Can I use scRegulate with Seurat or R-based tools?
scRegulate is written in Python and works directly with AnnData objects (e.g., from Scanpy). You can convert Seurat objects to AnnData using tools like SeuratDisk.
Q4: How can I visualize inferred TF activities?
TF activities inferred by scRegulate are stored in the obsm slot of the AnnData object. You can use scanpy.pl.embedding, scanpy.pl.heatmap, or export the matrix for custom plots.
Q5: What kind of prior networks does scRegulate accept?
scRegulate supports user-provided gene regulatory networks (GRNs) in CSV or matrix format. These can be curated from public databases or inferred from ATAC-seq or motif analysis.
Q6: Can I use scRegulate for multi-omics integration?
Not directly. While scRegulate focuses on TF activity from RNA, you can incorporate priors derived from other omics (e.g., ATAC) to guide the model.
Q7: What file formats are supported?
scRegulate works with .h5ad files (AnnData format). Input files should contain gene expression matrices with proper normalization.
Q8: How do I cite scRegulate?
See the Citation section below for the latest reference and preprint link.
Q9: How can I reproduce the paper’s results?
See our Reproducibility Guide for step-by-step instructions. Then run scregulate.
Citation
scRegulate manuscript is currently under peer review.
If you use scRegulate in your research, please cite:
Mehrdad Zandigohar, Jalees Rehman and Yang Dai (2025). scRegulate: Single-Cell Regulatory-Embedded Variational Inference of Transcription Factor Activity from Gene Expression, Bioinformatics Journal (under review).
📄 Read the preprint on bioRxiv: 10.1101/2025.04.17.649372
License
The code in scRegulate is licensed under the MIT License, which permits academic and commercial use, modification, and distribution.
Please note that any third-party dependencies bundled with scRegulate may have their own respective licenses.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scregulate-0.1.24.tar.gz.
File metadata
- Download URL: scregulate-0.1.24.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d64247c154c1805970118900b42f32b536840b64a198d84f46f57145705cfa9
|
|
| MD5 |
3c71001dc25422ad208f922ab79a42dd
|
|
| BLAKE2b-256 |
817aaf7b10cb1e9f00bb20178d78a5769a2d0e285f761954a59262216a053502
|
Provenance
The following attestation bundles were made for scregulate-0.1.24.tar.gz:
Publisher:
python-publish.yml on YDaiLab/scRegulate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scregulate-0.1.24.tar.gz -
Subject digest:
6d64247c154c1805970118900b42f32b536840b64a198d84f46f57145705cfa9 - Sigstore transparency entry: 211745743
- Sigstore integration time:
-
Permalink:
YDaiLab/scRegulate@64fc46ea28ddb6fcb4e863a515e9c259cc047cbe -
Branch / Tag:
refs/tags/v0.1.24 - Owner: https://github.com/YDaiLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@64fc46ea28ddb6fcb4e863a515e9c259cc047cbe -
Trigger Event:
release
-
Statement type:
File details
Details for the file scregulate-0.1.24-py3-none-any.whl.
File metadata
- Download URL: scregulate-0.1.24-py3-none-any.whl
- Upload date:
- Size: 28.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e02decff799560d8445acbfcb0da7418c866de3e5a2cd67695da46977d5745c2
|
|
| MD5 |
829cf9993f414bce346697dcb9d54a30
|
|
| BLAKE2b-256 |
401c3b23a87e3aa71650b325469564052ebd79a4d70c61b2e7d5663169a6986e
|
Provenance
The following attestation bundles were made for scregulate-0.1.24-py3-none-any.whl:
Publisher:
python-publish.yml on YDaiLab/scRegulate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scregulate-0.1.24-py3-none-any.whl -
Subject digest:
e02decff799560d8445acbfcb0da7418c866de3e5a2cd67695da46977d5745c2 - Sigstore transparency entry: 211745745
- Sigstore integration time:
-
Permalink:
YDaiLab/scRegulate@64fc46ea28ddb6fcb4e863a515e9c259cc047cbe -
Branch / Tag:
refs/tags/v0.1.24 - Owner: https://github.com/YDaiLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@64fc46ea28ddb6fcb4e863a515e9c259cc047cbe -
Trigger Event:
release
-
Statement type: