regdiffusion 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/.github/workflows/documentation.yml +11 -12
- regdiffusion-0.2.4/CITATION.cff +32 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/NEWS.md +22 -2
- regdiffusion-0.2.4/PKG-INFO +111 -0
- regdiffusion-0.2.3/PKG-INFO → regdiffusion-0.2.4/README.md +20 -27
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/BUILD.md +21 -1
- regdiffusion-0.2.4/docs/_static/grn_mono_full.html +2488 -0
- regdiffusion-0.2.4/docs/_static/grn_pbmc_bcell.html +2488 -0
- regdiffusion-0.2.4/docs/_static/grn_pbmc_full.html +2488 -0
- regdiffusion-0.2.4/docs/_templates/layout.html +18 -0
- regdiffusion-0.2.4/docs/conf.py +106 -0
- regdiffusion-0.2.4/docs/faq.md +71 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/index.rst +37 -16
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/quick_tour.md +19 -4
- regdiffusion-0.2.4/docs/requirements.txt +6 -0
- regdiffusion-0.2.4/docs/visualizing_grn.md +628 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/example.ipynb +10 -10
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/pyproject.toml +8 -3
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/grn.py +38 -23
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/plot/__init__.py +2 -2
- regdiffusion-0.2.4/regdiffusion/plot/interactive.py +104 -0
- regdiffusion-0.2.3/README.md +0 -74
- regdiffusion-0.2.3/docs/conf.py +0 -53
- regdiffusion-0.2.3/regdiffusion/plot/pyvis.py +0 -108
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/.gitignore +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/LICENSE +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/.gitignore +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/Makefile +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/REG_PySCENIC.ipynb +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/_static/rd_logo_horizontal.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/_static/rd_logo_horizontal@2x.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/_static/regdiffusion.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/_static/regdiffusion@2x.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/_templates/autosummary/class.rst +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/_templates/autosummary/classnoinheritance.rst +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/data_module.rst +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/downstream_with_pyscenic.md +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/large_networks.md +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/main_api.rst +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/make.bat +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/models.rst +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/supplements/googled258341a97f33073.html +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/supplements/rd_hammond_Cx3cr1.html +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/supplements/rd_hammond_Fcrls.html +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/supplements/rd_hammond_Hexb.html +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/supplements/rd_hammond_Mertk.html +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/supplements/rd_hammond_P2ry12.html +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/supplements/rd_hammond_Pros1.html +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/supplements/rd_hammond_Sall1.html +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/supplements/rd_hammond_Siglech.html +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/supplements/rd_hammond_Tmem119.html +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/supplements/rd_hammond_Trem2.html +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/docs/supplements.rst +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/__init__.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/cli.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/data/__init__.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/data/beeline.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/data/microglia.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/data/utils.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/evaluator.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/logger.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/models/__init__.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/models/regdiffusion.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/models/regdiffusion_me.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/plot/static.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/regdiffusion/trainer.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/resources/apoe_net.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/resources/aucell_mtx.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/resources/aucell_umap.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/resources/biomarkers.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/resources/cellnames.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/resources/edgelist.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/resources/heatmap.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/resources/mecs.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/resources/mecs_cluster.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/resources/regdiffusion_structure.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/resources/regulon_scores.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/resources/shinygo.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/resources/umap_comparison.png +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/test_scripts/test_beeline_benchmark.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/test_scripts/test_beeline_worker.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/test_scripts/test_memory_benchmark.py +0 -0
- {regdiffusion-0.2.3 → regdiffusion-0.2.4}/test_scripts/test_sparse_support.py +0 -0
|
@@ -13,27 +13,25 @@ jobs:
|
|
|
13
13
|
runs-on: ubuntu-latest
|
|
14
14
|
|
|
15
15
|
steps:
|
|
16
|
-
- uses: actions/checkout@
|
|
16
|
+
- uses: actions/checkout@v5
|
|
17
17
|
with:
|
|
18
|
-
persist-credentials: false
|
|
18
|
+
persist-credentials: false
|
|
19
19
|
|
|
20
20
|
- name: Set up Python
|
|
21
|
-
uses: actions/setup-python@
|
|
21
|
+
uses: actions/setup-python@v6
|
|
22
22
|
with:
|
|
23
23
|
python-version: '3.10'
|
|
24
24
|
|
|
25
25
|
- name: Install dependencies
|
|
26
26
|
run: |
|
|
27
27
|
python -m pip install --upgrade pip
|
|
28
|
-
pip install
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
pip install -r docs/requirements.txt
|
|
29
|
+
# Install the CPU build of torch first so the package install below
|
|
30
|
+
# does not pull the much larger CUDA wheels.
|
|
31
31
|
pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
pip install
|
|
35
|
-
pip install h5py
|
|
36
|
-
pip install pyvis
|
|
32
|
+
# Install regdiffusion itself so autodoc can import it and so runtime
|
|
33
|
+
# dependencies stay in sync with pyproject.toml.
|
|
34
|
+
pip install .
|
|
37
35
|
|
|
38
36
|
- name: Build documentation
|
|
39
37
|
run: |
|
|
@@ -41,7 +39,8 @@ jobs:
|
|
|
41
39
|
make html
|
|
42
40
|
|
|
43
41
|
- name: Deploy to GitHub Pages
|
|
44
|
-
|
|
42
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
43
|
+
uses: peaceiris/actions-gh-pages@v4
|
|
45
44
|
with:
|
|
46
45
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
47
46
|
publish_dir: ./docs/_build/html
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use RegDiffusion, please cite the paper listed below."
|
|
3
|
+
type: software
|
|
4
|
+
title: RegDiffusion
|
|
5
|
+
abstract: "Gene regulatory network inference from single-cell RNA-seq using probabilistic diffusion models."
|
|
6
|
+
authors:
|
|
7
|
+
- family-names: Zhu
|
|
8
|
+
given-names: Hao
|
|
9
|
+
- family-names: Slonim
|
|
10
|
+
given-names: Donna
|
|
11
|
+
repository-code: "https://github.com/TuftsBCB/RegDiffusion"
|
|
12
|
+
url: "https://tuftsbcb.github.io/RegDiffusion/"
|
|
13
|
+
license: Apache-2.0
|
|
14
|
+
keywords:
|
|
15
|
+
- gene regulatory network
|
|
16
|
+
- single-cell RNA-seq
|
|
17
|
+
- diffusion model
|
|
18
|
+
preferred-citation:
|
|
19
|
+
type: article
|
|
20
|
+
title: "From Noise to Knowledge: Diffusion Probabilistic Model-Based Neural Inference of Gene Regulatory Networks"
|
|
21
|
+
authors:
|
|
22
|
+
- family-names: Zhu
|
|
23
|
+
given-names: Hao
|
|
24
|
+
- family-names: Slonim
|
|
25
|
+
given-names: Donna
|
|
26
|
+
journal: Journal of Computational Biology
|
|
27
|
+
year: 2024
|
|
28
|
+
volume: 31
|
|
29
|
+
issue: 11
|
|
30
|
+
start: 1087
|
|
31
|
+
end: 1103
|
|
32
|
+
doi: "10.1089/cmb.2024.0607"
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
# RegDiffusion News / Changelog
|
|
2
2
|
|
|
3
|
-
## 0.2.
|
|
3
|
+
## 0.2.4 [unreleased]
|
|
4
|
+
|
|
5
|
+
### New Features
|
|
6
|
+
- Replaced the `pyvis` visualization backend and dependency with `lightgraph>=1.2.0`. `GRN.visualize_local_neighborhood()` now uses `lightgraph`, and `regdiffusion.plot.plot_lightgraph()` supports notebook display and standalone HTML export via `.save(path)`.
|
|
7
|
+
- Added automatic community grouping, node-size mapping from metrics, force and circular layouts, and edge-width or opacity scaling by absolute regulatory strength. Duplicate edges in visualizations are collapsed to the strongest copy.
|
|
8
|
+
|
|
9
|
+
### API Changes
|
|
10
|
+
- Removed `plot_pyvis()` and support for `plot_engine='pyvis'`. Use `plot_lightgraph()` or the default `GRN.visualize_local_neighborhood()` instead; plotting calls now return a `lightgraph.NetworkVisualization` object.
|
|
11
|
+
- Deprecated `edge_widths` in `GRN.visualize_local_neighborhood()`. It is ignored with a deprecation warning; edge widths now reflect absolute regulatory strength rather than hop level.
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
- Excluded zero-weight edges from `GRN.extract_edgelist()`, preventing removed edges from reappearing during top-k extraction.
|
|
15
|
+
- Fixed sparse HDF5 export of float16 adjacency matrices by converting to float32 before constructing the SciPy sparse matrix.
|
|
16
|
+
- Decoded gene and transcription-factor names as strings when reading HDF5 files, so they can be matched directly to annotations.
|
|
17
|
+
|
|
18
|
+
### Documentation
|
|
19
|
+
- Added a human PBMC network visualization tutorial with Reactome pathway annotations and interactive whole-network and local views, and updated the quick tour for `lightgraph`.
|
|
20
|
+
- Added an FAQ and citation metadata, improved package and documentation metadata, and made the documentation version follow `pyproject.toml`.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## 0.2.3
|
|
4
24
|
|
|
5
25
|
### New Features
|
|
6
26
|
- Added a `seed` argument to `RegDiffusionTrainer` for fully reproducible runs. When set, Python, NumPy, and PyTorch RNGs are seeded and cuDNN is put in deterministic mode. Two runs with the same seed now produce bit-identical adjacency matrices, verified across separate processes and under AMP, `torch.compile`, gradient accumulation, and `train_split < 1.0`. Without a seed (the default), runs remain non-deterministic.
|
|
@@ -40,4 +60,4 @@
|
|
|
40
60
|
- Fixed missing `self` parameter in `GRN.remove_weak_edges()`
|
|
41
61
|
- Fixed `GRN.get_edgelist()` incorrectly passing `self` to `extract_edgelist()`
|
|
42
62
|
- Fixed external logger not being assigned in `RegDiffusionTrainer.__init__()`
|
|
43
|
-
- Fixed `forward()` crash when `n_celltype=None` by adding conditional cell type embedding
|
|
63
|
+
- Fixed `forward()` crash when `n_celltype=None` by adding conditional cell type embedding
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: regdiffusion
|
|
3
|
+
Version: 0.2.4
|
|
4
|
+
Summary: Gene regulatory network inference from single-cell RNA-seq using diffusion models
|
|
5
|
+
Keywords: gene regulatory network,GRN inference,single-cell RNA-seq,diffusion model,bioinformatics
|
|
6
|
+
Author-email: Hao Zhu <haozhu233@gmail.com>, Donna Slonim <donna.slonim@tufts.edu>
|
|
7
|
+
Maintainer-email: Hao Zhu <haozhu233@gmail.com>
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: numpy>=1.16.5
|
|
12
|
+
Requires-Dist: pandas>=1.1.1
|
|
13
|
+
Requires-Dist: torch
|
|
14
|
+
Requires-Dist: tqdm
|
|
15
|
+
Requires-Dist: scanpy
|
|
16
|
+
Requires-Dist: scikit-learn
|
|
17
|
+
Requires-Dist: h5py
|
|
18
|
+
Requires-Dist: lightgraph>=1.2.0
|
|
19
|
+
Project-URL: Documentation, https://tuftsbcb.github.io/RegDiffusion/
|
|
20
|
+
Project-URL: Home, https://github.com/TuftsBCB/RegDiffusion
|
|
21
|
+
Project-URL: Issues, https://github.com/TuftsBCB/RegDiffusion/issues
|
|
22
|
+
Project-URL: Publication, https://doi.org/10.1089/cmb.2024.0607
|
|
23
|
+
Project-URL: Source, https://github.com/TuftsBCB/RegDiffusion
|
|
24
|
+
|
|
25
|
+
# RegDiffusion <a href="https://tuftsbcb.github.io/RegDiffusion/"><img src="https://raw.githubusercontent.com/TuftsBCB/RegDiffusion/master/docs/_static/rd_logo_horizontal.png" align="right" alt="logo" width="200" height = "56" style = "border: none; float: right;"></a>
|
|
26
|
+
|
|
27
|
+
[](https://pepy.tech/project/regdiffusion)
|
|
28
|
+
[](https://pepy.tech/project/regdiffusion)
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
RegDiffusion is an open-source Python package for **gene regulatory network (GRN) inference from single-cell RNA-seq data** using probabilistic diffusion models. It learns candidate regulatory relationships from gene expression data without requiring a ground-truth network for training, and includes tools to evaluate, export, and visualize inferred networks.
|
|
32
|
+
|
|
33
|
+
[Documentation](https://tuftsbcb.github.io/RegDiffusion/) · [Quick start](https://tuftsbcb.github.io/RegDiffusion/quick_tour.html) · [FAQ](https://tuftsbcb.github.io/RegDiffusion/faq.html) · [PyPI](https://pypi.org/project/regdiffusion/) · [Paper](https://doi.org/10.1089/cmb.2024.0607)
|
|
34
|
+
|
|
35
|
+
## What can RegDiffusion do?
|
|
36
|
+
|
|
37
|
+
- Infer GRNs from a cells-by-genes expression matrix with GPU acceleration or on CPU.
|
|
38
|
+
- Accept log-transformed NumPy arrays or SciPy sparse matrices through the Python API. The CLI accepts raw counts in CSV or H5AD files and performs the log transformation.
|
|
39
|
+
- Work with large gene sets using [memory-efficient training](https://tuftsbcb.github.io/RegDiffusion/large_networks.html).
|
|
40
|
+
- Export inferred edges for [downstream pySCENIC analysis](https://tuftsbcb.github.io/RegDiffusion/downstream_with_pyscenic.html).
|
|
41
|
+
|
|
42
|
+
The project reports inference on a 15,000-gene network in under five minutes on an NVIDIA A100 GPU. Runtime and memory use depend on dataset size, hardware, and training settings; see the [large-network guide](https://tuftsbcb.github.io/RegDiffusion/large_networks.html) for memory benchmarks. Inferred edges are hypotheses for follow-up analysis, not experimental proof of regulation.
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
Zhu H, Slonim D. From Noise to Knowledge: Diffusion Probabilistic Model-Based Neural Inference of Gene Regulatory Networks. J Comput Biol. 2024 Nov;31(11):1087-1103. doi: 10.1089/cmb.2024.0607. Epub 2024 Oct 10. PMID: 39387266; PMCID: PMC11698671.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
49
|
+
|
|
50
|
+
RegDiffusion is on pypi.
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
pip install regdiffusion
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Check out [this tutorial](https://tuftsbcb.github.io/RegDiffusion/quick_tour.html) for a quick tour of how to use RegDiffusion! If you would like to integrate results from RegDiffusion into the SCENIC pipeline, checkout [this tutorial](https://tuftsbcb.github.io/RegDiffusion/downstream_with_pyscenic.html).
|
|
57
|
+
|
|
58
|
+
## New in v0.2
|
|
59
|
+
- **Memory-efficient mode**: Set `memory_efficient=True` in `RegDiffusionTrainer` to reduce peak GPU memory by ~45%, making it easier to work with large gene sets on consumer GPUs (You can now fit 20k genes on a 16GB GPU).
|
|
60
|
+
- **Sparse matrix support**: `RegDiffusionTrainer` now accepts scipy sparse matrices directly (e.g., `adata.X`), enabling training on datasets with 1M+ cells without excessive memory usage.
|
|
61
|
+
|
|
62
|
+
## Inferred Networks from RegDiffusion
|
|
63
|
+
Here are two examples of inferred networks from regdiffusion. The networks are coherent with existing literature and across datasets.
|
|
64
|
+
|
|
65
|
+

|
|
66
|
+
|
|
67
|
+
## Inference Speed
|
|
68
|
+
The project reports inference on a 15,000-gene network in under five minutes on
|
|
69
|
+
an NVIDIA A100 GPU, or roughly three hours on a 12-core CPU. These timings depend
|
|
70
|
+
on the dataset and training settings. See the [paper](https://doi.org/10.1089/cmb.2024.0607)
|
|
71
|
+
for the method's evaluation and the [large-network guide](https://tuftsbcb.github.io/RegDiffusion/large_networks.html)
|
|
72
|
+
for memory benchmarks.
|
|
73
|
+
|
|
74
|
+
## CLI tool
|
|
75
|
+
regdiffusion has a CLI tool now! It takes a count matrix as the input (different from the main API, which needs the data to be log transformed) and returns a table of inferred edges.
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
usage: regdiffusion [-h] [--output OUTPUT] [--top_gene_percentile TOP_GENE_PERCENTILE] [--k K] [--workers WORKERS] input
|
|
79
|
+
|
|
80
|
+
Infer a gene regulatory network (GRN) from a single-cell count dataset.
|
|
81
|
+
|
|
82
|
+
positional arguments:
|
|
83
|
+
input Input single-cell count dataset file (CSV or H5AD format).
|
|
84
|
+
|
|
85
|
+
options:
|
|
86
|
+
-h, --help show this help message and exit
|
|
87
|
+
--output OUTPUT Output file path for the edgelist (CSV). Default: rd_grn.csv
|
|
88
|
+
--top_gene_percentile TOP_GENE_PERCENTILE
|
|
89
|
+
Percentile cutoff to filter weak edges (e.g., 50 for the top 50%). Default: 50
|
|
90
|
+
--k K Number of edges per gene to extract (-1 for all edges). Default: -1
|
|
91
|
+
--workers WORKERS Number of workers to use for edgelist extraction. Default: 4
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Citation
|
|
95
|
+
|
|
96
|
+
If you find our package useful, consider citing our paper! =)
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
@article{zhu2024noise,
|
|
100
|
+
title={From Noise to Knowledge: Diffusion Probabilistic Model-Based Neural Inference of Gene Regulatory Networks},
|
|
101
|
+
author={Zhu, Hao and Slonim, Donna},
|
|
102
|
+
journal={Journal of Computational Biology},
|
|
103
|
+
volume={31},
|
|
104
|
+
number={11},
|
|
105
|
+
pages={1087--1103},
|
|
106
|
+
year={2024},
|
|
107
|
+
doi={10.1089/cmb.2024.0607},
|
|
108
|
+
url={https://doi.org/10.1089/cmb.2024.0607}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
@@ -1,29 +1,21 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: regdiffusion
|
|
3
|
-
Version: 0.2.3
|
|
4
|
-
Summary: Gene Regulatory Networks Inference using diffusion model
|
|
5
|
-
Author-email: Hao Zhu <haozhu233@gmail.com>, Donna Slonim <donna.slonim@tufts.edu>
|
|
6
|
-
Maintainer-email: Hao Zhu <haozhu233@gmail.com>
|
|
7
|
-
Description-Content-Type: text/markdown
|
|
8
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
9
|
-
License-File: LICENSE
|
|
10
|
-
Requires-Dist: numpy>=1.16.5
|
|
11
|
-
Requires-Dist: pandas>=1.1.1
|
|
12
|
-
Requires-Dist: torch
|
|
13
|
-
Requires-Dist: tqdm
|
|
14
|
-
Requires-Dist: scanpy
|
|
15
|
-
Requires-Dist: scikit-learn
|
|
16
|
-
Requires-Dist: h5py
|
|
17
|
-
Requires-Dist: pyvis
|
|
18
|
-
Project-URL: Home, https://github.com/TuftsBCB/RegDiffusion
|
|
19
|
-
|
|
20
1
|
# RegDiffusion <a href="https://tuftsbcb.github.io/RegDiffusion/"><img src="https://raw.githubusercontent.com/TuftsBCB/RegDiffusion/master/docs/_static/rd_logo_horizontal.png" align="right" alt="logo" width="200" height = "56" style = "border: none; float: right;"></a>
|
|
21
2
|
|
|
22
3
|
[](https://pepy.tech/project/regdiffusion)
|
|
23
4
|
[](https://pepy.tech/project/regdiffusion)
|
|
24
5
|

|
|
25
6
|
|
|
26
|
-
RegDiffusion is
|
|
7
|
+
RegDiffusion is an open-source Python package for **gene regulatory network (GRN) inference from single-cell RNA-seq data** using probabilistic diffusion models. It learns candidate regulatory relationships from gene expression data without requiring a ground-truth network for training, and includes tools to evaluate, export, and visualize inferred networks.
|
|
8
|
+
|
|
9
|
+
[Documentation](https://tuftsbcb.github.io/RegDiffusion/) · [Quick start](https://tuftsbcb.github.io/RegDiffusion/quick_tour.html) · [FAQ](https://tuftsbcb.github.io/RegDiffusion/faq.html) · [PyPI](https://pypi.org/project/regdiffusion/) · [Paper](https://doi.org/10.1089/cmb.2024.0607)
|
|
10
|
+
|
|
11
|
+
## What can RegDiffusion do?
|
|
12
|
+
|
|
13
|
+
- Infer GRNs from a cells-by-genes expression matrix with GPU acceleration or on CPU.
|
|
14
|
+
- Accept log-transformed NumPy arrays or SciPy sparse matrices through the Python API. The CLI accepts raw counts in CSV or H5AD files and performs the log transformation.
|
|
15
|
+
- Work with large gene sets using [memory-efficient training](https://tuftsbcb.github.io/RegDiffusion/large_networks.html).
|
|
16
|
+
- Export inferred edges for [downstream pySCENIC analysis](https://tuftsbcb.github.io/RegDiffusion/downstream_with_pyscenic.html).
|
|
17
|
+
|
|
18
|
+
The project reports inference on a 15,000-gene network in under five minutes on an NVIDIA A100 GPU. Runtime and memory use depend on dataset size, hardware, and training settings; see the [large-network guide](https://tuftsbcb.github.io/RegDiffusion/large_networks.html) for memory benchmarks. Inferred edges are hypotheses for follow-up analysis, not experimental proof of regulation.
|
|
27
19
|
|
|
28
20
|
```
|
|
29
21
|
Zhu H, Slonim D. From Noise to Knowledge: Diffusion Probabilistic Model-Based Neural Inference of Gene Regulatory Networks. J Comput Biol. 2024 Nov;31(11):1087-1103. doi: 10.1089/cmb.2024.0607. Epub 2024 Oct 10. PMID: 39387266; PMCID: PMC11698671.
|
|
@@ -46,14 +38,14 @@ Check out [this tutorial](https://tuftsbcb.github.io/RegDiffusion/quick_tour.htm
|
|
|
46
38
|
## Inferred Networks from RegDiffusion
|
|
47
39
|
Here are two examples of inferred networks from regdiffusion. The networks are coherent with existing literature and across datasets.
|
|
48
40
|
|
|
49
|
-

|
|
41
|
+

|
|
50
42
|
|
|
51
43
|
## Inference Speed
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
44
|
+
The project reports inference on a 15,000-gene network in under five minutes on
|
|
45
|
+
an NVIDIA A100 GPU, or roughly three hours on a 12-core CPU. These timings depend
|
|
46
|
+
on the dataset and training settings. See the [paper](https://doi.org/10.1089/cmb.2024.0607)
|
|
47
|
+
for the method's evaluation and the [large-network guide](https://tuftsbcb.github.io/RegDiffusion/large_networks.html)
|
|
48
|
+
for memory benchmarks.
|
|
57
49
|
|
|
58
50
|
## CLI tool
|
|
59
51
|
regdiffusion has a CLI tool now! It takes a count matrix as the input (different from the main API, which needs the data to be log transformed) and returns a table of inferred edges.
|
|
@@ -88,6 +80,7 @@ If you find our package useful, consider citing our paper! =)
|
|
|
88
80
|
number={11},
|
|
89
81
|
pages={1087--1103},
|
|
90
82
|
year={2024},
|
|
91
|
-
|
|
83
|
+
doi={10.1089/cmb.2024.0607},
|
|
84
|
+
url={https://doi.org/10.1089/cmb.2024.0607}
|
|
92
85
|
}
|
|
93
86
|
```
|
|
@@ -46,7 +46,7 @@ python -m sphinx -b html . _build/html
|
|
|
46
46
|
### If dependencies are missing:
|
|
47
47
|
Install required packages:
|
|
48
48
|
```bash
|
|
49
|
-
pip install
|
|
49
|
+
pip install -r requirements.txt
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
### If autodoc fails to import modules:
|
|
@@ -64,3 +64,23 @@ pip install -e ..
|
|
|
64
64
|
- `_build/` - Build output directory (generated)
|
|
65
65
|
- `_static/` - Static assets (images, CSS, etc.)
|
|
66
66
|
- `_templates/` - Custom templates
|
|
67
|
+
|
|
68
|
+
## Search and discovery
|
|
69
|
+
|
|
70
|
+
The HTML build generates page descriptions, Open Graph metadata, canonical URLs,
|
|
71
|
+
a `sitemap.xml`, and software structured data on the homepage. The documentation
|
|
72
|
+
version is read from `pyproject.toml`. Update `page_descriptions` in `conf.py` when
|
|
73
|
+
adding a landing page, and keep structured data consistent with visible content.
|
|
74
|
+
|
|
75
|
+
After deployment, submit `https://tuftsbcb.github.io/RegDiffusion/sitemap.xml` in
|
|
76
|
+
Google Search Console and Bing Webmaster Tools. Inspect the homepage and FAQ to
|
|
77
|
+
confirm that the deployed pages can be indexed. Track non-brand queries such as
|
|
78
|
+
"single-cell gene regulatory network inference" and referrals from AI search,
|
|
79
|
+
alongside branded RegDiffusion queries. Record dates and cited URLs when manually
|
|
80
|
+
checking AI answers; one answer is not a reliable ranking measurement.
|
|
81
|
+
|
|
82
|
+
This project is hosted under `/RegDiffusion/`. A robots.txt in this repository's
|
|
83
|
+
published directory would not control crawling: robots.txt must be served from
|
|
84
|
+
the origin root (`https://tuftsbcb.github.io/robots.txt`), managed by the organization
|
|
85
|
+
site. Review that root file if crawling is blocked. Special AI files or metadata
|
|
86
|
+
do not guarantee indexing or AI citations.
|