descopex 0.0.1__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.
Files changed (51) hide show
  1. descopex-0.0.1/.gitattributes +2 -0
  2. descopex-0.0.1/.gitignore +1 -0
  3. descopex-0.0.1/.readthedocs.yaml +19 -0
  4. descopex-0.0.1/LICENSE +21 -0
  5. descopex-0.0.1/PKG-INFO +163 -0
  6. descopex-0.0.1/README.md +145 -0
  7. descopex-0.0.1/assets/descope_logo.png +0 -0
  8. descopex-0.0.1/assets/main.png +0 -0
  9. descopex-0.0.1/docs/Makefile +20 -0
  10. descopex-0.0.1/docs/make.bat +35 -0
  11. descopex-0.0.1/docs/requirements.txt +4 -0
  12. descopex-0.0.1/docs/source/API.rst +58 -0
  13. descopex-0.0.1/docs/source/Acknowledgements.md +15 -0
  14. descopex-0.0.1/docs/source/Datasets.md +19 -0
  15. descopex-0.0.1/docs/source/Installation.md +65 -0
  16. descopex-0.0.1/docs/source/Tutorials.md +174 -0
  17. descopex-0.0.1/docs/source/_static/css/custom.css +40 -0
  18. descopex-0.0.1/docs/source/_static/logo.png +0 -0
  19. descopex-0.0.1/docs/source/conf.py +53 -0
  20. descopex-0.0.1/docs/source/descope.arguments.rst +8 -0
  21. descopex-0.0.1/docs/source/descope.dataset.rst +8 -0
  22. descopex-0.0.1/docs/source/descope.inference.rst +9 -0
  23. descopex-0.0.1/docs/source/descope.logging.rst +13 -0
  24. descopex-0.0.1/docs/source/descope.tokenizer.rst +10 -0
  25. descopex-0.0.1/docs/source/descope.trainer.rst +8 -0
  26. descopex-0.0.1/docs/source/descope.utils.rst +8 -0
  27. descopex-0.0.1/docs/source/index.rst +16 -0
  28. descopex-0.0.1/pyproject.toml +35 -0
  29. descopex-0.0.1/src/descope/__init__.py +70 -0
  30. descopex-0.0.1/src/descope/arguments.py +85 -0
  31. descopex-0.0.1/src/descope/dataset.py +291 -0
  32. descopex-0.0.1/src/descope/inference.py +416 -0
  33. descopex-0.0.1/src/descope/logging.py +144 -0
  34. descopex-0.0.1/src/descope/models/configuration_descope.py +28 -0
  35. descopex-0.0.1/src/descope/models/modeling_descope.py +270 -0
  36. descopex-0.0.1/src/descope/models/utils.py +225 -0
  37. descopex-0.0.1/src/descope/tokenizer.py +566 -0
  38. descopex-0.0.1/src/descope/trainer.py +222 -0
  39. descopex-0.0.1/src/descope/utils.py +974 -0
  40. descopex-0.0.1/tutorials/ATAC/accelerate_config.yaml +3 -0
  41. descopex-0.0.1/tutorials/ATAC/test.ipynb +251 -0
  42. descopex-0.0.1/tutorials/ATAC/tokenize.ipynb +104 -0
  43. descopex-0.0.1/tutorials/ATAC/train.py +90 -0
  44. descopex-0.0.1/tutorials/ATAC/train_descope.sh +58 -0
  45. descopex-0.0.1/tutorials/ATAC/train_descope_loo.sh +98 -0
  46. descopex-0.0.1/tutorials/RNA/accelerate_config.yaml +3 -0
  47. descopex-0.0.1/tutorials/RNA/test.ipynb +253 -0
  48. descopex-0.0.1/tutorials/RNA/tokenize.ipynb +115 -0
  49. descopex-0.0.1/tutorials/RNA/train.py +90 -0
  50. descopex-0.0.1/tutorials/RNA/train_descope.sh +58 -0
  51. descopex-0.0.1/tutorials/RNA/train_descope_loo.sh +98 -0
@@ -0,0 +1,2 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -0,0 +1 @@
1
+ docs/build
@@ -0,0 +1,19 @@
1
+ # Read the Docs configuration file
2
+
3
+ # Required
4
+ version: "2"
5
+
6
+ # Set the OS, Python version and other tools you might need
7
+ build:
8
+ os: "ubuntu-22.04"
9
+ tools:
10
+ python: "3.10"
11
+
12
+ # Python requirements required build your documentation
13
+ python:
14
+ install:
15
+ - requirements: docs/requirements.txt
16
+
17
+ # Build documentation in the "docs/" directory with Sphinx
18
+ sphinx:
19
+ configuration: docs/source/conf.py
descopex-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pengpeng Wu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,163 @@
1
+ Metadata-Version: 2.4
2
+ Name: descopex
3
+ Version: 0.0.1
4
+ Summary: Decoding Single-Cell Observations of Perturbed Expression.
5
+ Project-URL: Homepage, https://github.com/Peg-Wu/DeSCOPE
6
+ Project-URL: Issues, https://github.com/Peg-Wu/DeSCOPE/issues
7
+ Author-email: Pengpeng Wu <peg2_wu@163.com>, Hailin Wei <hailinwei98@gmail.com>, Yazi Li <liyazi23811@gmail.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: descope,descopex
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Requires-Python: >=3.10
14
+ Requires-Dist: cell-eval
15
+ Requires-Dist: torch
16
+ Requires-Dist: wppkg==0.1.2
17
+ Description-Content-Type: text/markdown
18
+
19
+ <p align="center">
20
+ <img src="assets/descope_logo.png" alt="descope logo" width="300">
21
+ </p>
22
+
23
+ <p align="center">
24
+ <a href="https://pypi.org/project/descopex/"><img alt="PyPI version" src="https://img.shields.io/pypi/v/descopex.svg?color=purple"></a>
25
+ <a href="https://pepy.tech/project/descopex"><img alt="PyPI total downloads" src="https://pepy.tech/badge/descopex"></a>
26
+ <a href="https://github.com/Peg-Wu/DeSCOPE/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/Peg-Wu/DeSCOPE.svg?color=orange"></a>
27
+ </p>
28
+
29
+ <h3 align="center">
30
+ <p>
31
+ DeSCOPE: Decoding Single-Cell Observations of Perturbed Expression
32
+ </p>
33
+ </h3>
34
+
35
+ <p align="center">
36
+ <img src="assets/main.png" alt="main" width="2048">
37
+ </p>
38
+
39
+ DeSCOPE is a single-cell perturbation prediction framework designed for scRNA-seq, scATAC-seq, and general single-cell–level perturbation modeling. It is built on a conditional Variational Autoencoder (cVAE) architecture, in which perturbed genes are represented by embeddings derived from the ESM2 protein language model and used as conditioning information to model cellular responses to genetic perturbations. Through this design, DeSCOPE delivers strong predictive performance in challenging scenarios, including unseen genes and unseen cell types.
40
+
41
+ ---
42
+
43
+ ## Installation
44
+
45
+ ### Environment Setup
46
+
47
+ ### Step 1: Set up a python environment
48
+
49
+ We recommend creating a virtual Python environment with [Anaconda](https://docs.anaconda.com/free/anaconda/install/linux/):
50
+
51
+ - Required version: `python >= 3.10`
52
+
53
+ ```bash
54
+ conda create -n descope python=3.10
55
+ conda activate descope
56
+ ```
57
+
58
+ ### Step 2: Install pytorch
59
+
60
+ Install `PyTorch` based on your system configuration. Refer to [PyTorch installation instructions](https://pytorch.org/get-started/previous-versions/).
61
+
62
+ For the exact command, for example:
63
+
64
+ - You may choose any version to install, but make sure the PyTorch version is not too old.
65
+ - We recommend `torch ≥ 2.6`.
66
+
67
+ ```bash
68
+ # Installation Example: torch v2.7.1
69
+ # CUDA 11.8
70
+ pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu118
71
+ # CUDA 12.6
72
+ pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu126
73
+ # CUDA 12.8
74
+ pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu128
75
+ ```
76
+
77
+ ### Step 3: Install deepspeed (optional)
78
+
79
+ Install `DeepSpeed` based on your system configuration. Refer to [DeepSpeed installation instructions](https://www.deepspeed.ai/tutorials/advanced-install/).
80
+
81
+ For the exact command, for example:
82
+
83
+ ```bash
84
+ pip install deepspeed
85
+ ```
86
+
87
+ ### Step 4: Install descope and dependencies
88
+
89
+ To install `descope`, run:
90
+
91
+ ```bash
92
+ pip install descopex
93
+ ```
94
+
95
+ Or install from `github`:
96
+
97
+ ```bash
98
+ git clone https://github.com/Peg-Wu/DeSCOPE.git
99
+ cd DeSCOPE
100
+ pip install [-e] .
101
+ ```
102
+
103
+ Check if installation was successful:
104
+
105
+ ```python
106
+ import descope
107
+ descope.welcome()
108
+ ```
109
+
110
+ ## Datasets Zoo
111
+
112
+ ### scRNA-seq
113
+
114
+ | Paper | Dataset | Download Link |
115
+ | :----------------------------------------------------------: | :--------------------: | :----------------------------------------------------------: |
116
+ | [Replogle et al., 2022](https://www.cell.com/cell/fulltext/S0092-8674(22)00597-9) | K562_GWPS (61.3GB) | [download](https://plus.figshare.com/ndownloader/files/35775507) |
117
+ | [Replogle et al., 2022](https://www.cell.com/cell/fulltext/S0092-8674(22)00597-9) | K562_ESSENTIAL (9.9GB) | [download](https://plus.figshare.com/ndownloader/files/35773219) |
118
+ | [Replogle et al., 2022](https://www.cell.com/cell/fulltext/S0092-8674(22)00597-9) | RPE1 (8.1GB) | [download](https://plus.figshare.com/ndownloader/files/35775606) |
119
+ | [Nadig et al., 2025](https://www.nature.com/articles/s41588-025-02169-3) | HEPG2 (5.2GB) | [download](https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE264667&format=file&file=GSE264667%5Fhepg2%5Fraw%5Fsinglecell%5F01%2Eh5ad) |
120
+ | [Nadig et al., 2025](https://www.nature.com/articles/s41588-025-02169-3) | JURKAT (8.7GB) | [download](https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE264667&format=file&file=GSE264667%5Fjurkat%5Fraw%5Fsinglecell%5F01%2Eh5ad) |
121
+
122
+ - The H1 dataset was obtained from the [Virtual Cell Challenge 2025](https://virtualcellchallenge.org/). ([download](https://storage.googleapis.com/vcc_data_prod/datasets/state/competition_support_set.zip))
123
+ - NOTE: ESM2 gene embeddings can also be obtained from here.
124
+
125
+
126
+ ### scATAC-seq
127
+
128
+ - Cell-by-cCRE / Cell-by-peak: [Human-scATAC-Corpus](https://health.tsinghua.edu.cn/human-scatac-corpus/download.php)
129
+
130
+ ## Acknowledgements
131
+
132
+ We sincerely thank the authors of following open-source projects:
133
+
134
+ <details>
135
+ <summary>Click to expand</summary>
136
+
137
+ - [PyTorch](https://github.com/pytorch/pytorch)
138
+ - [Transformers](https://github.com/huggingface/transformers)
139
+ - [Datasets](https://github.com/huggingface/datasets)
140
+ - [Accelerate](https://github.com/huggingface/accelerate)
141
+ - [Scanpy](https://github.com/scverse/scanpy)
142
+ - [cell-eval](https://github.com/ArcInstitute/cell-eval)
143
+ - [STATE](https://github.com/ArcInstitute/state)
144
+ - [scGPT](https://github.com/bowang-lab/scGPT/tree/main)
145
+ - [EpiAgent](https://github.com/xy-chen16/EpiAgent)
146
+ - [GEARS](https://github.com/snap-stanford/GEARS)
147
+ - [wppkg](https://github.com/Peg-Wu/wppkg)
148
+
149
+ </details>
150
+
151
+ ---
152
+
153
+ ## Star History
154
+
155
+ <p align="center">
156
+ <a href="https://star-history.com/#Peg-Wu/DeSCOPE&Date">
157
+ <img
158
+ src="https://api.star-history.com/svg?repos=Peg-Wu/DeSCOPE&type=Date"
159
+ width="600"
160
+ alt="Star History Chart"
161
+ />
162
+ </a>
163
+ </p>
@@ -0,0 +1,145 @@
1
+ <p align="center">
2
+ <img src="assets/descope_logo.png" alt="descope logo" width="300">
3
+ </p>
4
+
5
+ <p align="center">
6
+ <a href="https://pypi.org/project/descopex/"><img alt="PyPI version" src="https://img.shields.io/pypi/v/descopex.svg?color=purple"></a>
7
+ <a href="https://pepy.tech/project/descopex"><img alt="PyPI total downloads" src="https://pepy.tech/badge/descopex"></a>
8
+ <a href="https://github.com/Peg-Wu/DeSCOPE/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/Peg-Wu/DeSCOPE.svg?color=orange"></a>
9
+ </p>
10
+
11
+ <h3 align="center">
12
+ <p>
13
+ DeSCOPE: Decoding Single-Cell Observations of Perturbed Expression
14
+ </p>
15
+ </h3>
16
+
17
+ <p align="center">
18
+ <img src="assets/main.png" alt="main" width="2048">
19
+ </p>
20
+
21
+ DeSCOPE is a single-cell perturbation prediction framework designed for scRNA-seq, scATAC-seq, and general single-cell–level perturbation modeling. It is built on a conditional Variational Autoencoder (cVAE) architecture, in which perturbed genes are represented by embeddings derived from the ESM2 protein language model and used as conditioning information to model cellular responses to genetic perturbations. Through this design, DeSCOPE delivers strong predictive performance in challenging scenarios, including unseen genes and unseen cell types.
22
+
23
+ ---
24
+
25
+ ## Installation
26
+
27
+ ### Environment Setup
28
+
29
+ ### Step 1: Set up a python environment
30
+
31
+ We recommend creating a virtual Python environment with [Anaconda](https://docs.anaconda.com/free/anaconda/install/linux/):
32
+
33
+ - Required version: `python >= 3.10`
34
+
35
+ ```bash
36
+ conda create -n descope python=3.10
37
+ conda activate descope
38
+ ```
39
+
40
+ ### Step 2: Install pytorch
41
+
42
+ Install `PyTorch` based on your system configuration. Refer to [PyTorch installation instructions](https://pytorch.org/get-started/previous-versions/).
43
+
44
+ For the exact command, for example:
45
+
46
+ - You may choose any version to install, but make sure the PyTorch version is not too old.
47
+ - We recommend `torch ≥ 2.6`.
48
+
49
+ ```bash
50
+ # Installation Example: torch v2.7.1
51
+ # CUDA 11.8
52
+ pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu118
53
+ # CUDA 12.6
54
+ pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu126
55
+ # CUDA 12.8
56
+ pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu128
57
+ ```
58
+
59
+ ### Step 3: Install deepspeed (optional)
60
+
61
+ Install `DeepSpeed` based on your system configuration. Refer to [DeepSpeed installation instructions](https://www.deepspeed.ai/tutorials/advanced-install/).
62
+
63
+ For the exact command, for example:
64
+
65
+ ```bash
66
+ pip install deepspeed
67
+ ```
68
+
69
+ ### Step 4: Install descope and dependencies
70
+
71
+ To install `descope`, run:
72
+
73
+ ```bash
74
+ pip install descopex
75
+ ```
76
+
77
+ Or install from `github`:
78
+
79
+ ```bash
80
+ git clone https://github.com/Peg-Wu/DeSCOPE.git
81
+ cd DeSCOPE
82
+ pip install [-e] .
83
+ ```
84
+
85
+ Check if installation was successful:
86
+
87
+ ```python
88
+ import descope
89
+ descope.welcome()
90
+ ```
91
+
92
+ ## Datasets Zoo
93
+
94
+ ### scRNA-seq
95
+
96
+ | Paper | Dataset | Download Link |
97
+ | :----------------------------------------------------------: | :--------------------: | :----------------------------------------------------------: |
98
+ | [Replogle et al., 2022](https://www.cell.com/cell/fulltext/S0092-8674(22)00597-9) | K562_GWPS (61.3GB) | [download](https://plus.figshare.com/ndownloader/files/35775507) |
99
+ | [Replogle et al., 2022](https://www.cell.com/cell/fulltext/S0092-8674(22)00597-9) | K562_ESSENTIAL (9.9GB) | [download](https://plus.figshare.com/ndownloader/files/35773219) |
100
+ | [Replogle et al., 2022](https://www.cell.com/cell/fulltext/S0092-8674(22)00597-9) | RPE1 (8.1GB) | [download](https://plus.figshare.com/ndownloader/files/35775606) |
101
+ | [Nadig et al., 2025](https://www.nature.com/articles/s41588-025-02169-3) | HEPG2 (5.2GB) | [download](https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE264667&format=file&file=GSE264667%5Fhepg2%5Fraw%5Fsinglecell%5F01%2Eh5ad) |
102
+ | [Nadig et al., 2025](https://www.nature.com/articles/s41588-025-02169-3) | JURKAT (8.7GB) | [download](https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE264667&format=file&file=GSE264667%5Fjurkat%5Fraw%5Fsinglecell%5F01%2Eh5ad) |
103
+
104
+ - The H1 dataset was obtained from the [Virtual Cell Challenge 2025](https://virtualcellchallenge.org/). ([download](https://storage.googleapis.com/vcc_data_prod/datasets/state/competition_support_set.zip))
105
+ - NOTE: ESM2 gene embeddings can also be obtained from here.
106
+
107
+
108
+ ### scATAC-seq
109
+
110
+ - Cell-by-cCRE / Cell-by-peak: [Human-scATAC-Corpus](https://health.tsinghua.edu.cn/human-scatac-corpus/download.php)
111
+
112
+ ## Acknowledgements
113
+
114
+ We sincerely thank the authors of following open-source projects:
115
+
116
+ <details>
117
+ <summary>Click to expand</summary>
118
+
119
+ - [PyTorch](https://github.com/pytorch/pytorch)
120
+ - [Transformers](https://github.com/huggingface/transformers)
121
+ - [Datasets](https://github.com/huggingface/datasets)
122
+ - [Accelerate](https://github.com/huggingface/accelerate)
123
+ - [Scanpy](https://github.com/scverse/scanpy)
124
+ - [cell-eval](https://github.com/ArcInstitute/cell-eval)
125
+ - [STATE](https://github.com/ArcInstitute/state)
126
+ - [scGPT](https://github.com/bowang-lab/scGPT/tree/main)
127
+ - [EpiAgent](https://github.com/xy-chen16/EpiAgent)
128
+ - [GEARS](https://github.com/snap-stanford/GEARS)
129
+ - [wppkg](https://github.com/Peg-Wu/wppkg)
130
+
131
+ </details>
132
+
133
+ ---
134
+
135
+ ## Star History
136
+
137
+ <p align="center">
138
+ <a href="https://star-history.com/#Peg-Wu/DeSCOPE&Date">
139
+ <img
140
+ src="https://api.star-history.com/svg?repos=Peg-Wu/DeSCOPE&type=Date"
141
+ width="600"
142
+ alt="Star History Chart"
143
+ />
144
+ </a>
145
+ </p>
Binary file
Binary file
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = source
9
+ BUILDDIR = build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,35 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=source
11
+ set BUILDDIR=build
12
+
13
+ %SPHINXBUILD% >NUL 2>NUL
14
+ if errorlevel 9009 (
15
+ echo.
16
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17
+ echo.installed, then set the SPHINXBUILD environment variable to point
18
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
19
+ echo.may add the Sphinx directory to PATH.
20
+ echo.
21
+ echo.If you don't have Sphinx installed, grab it from
22
+ echo.https://www.sphinx-doc.org/
23
+ exit /b 1
24
+ )
25
+
26
+ if "%1" == "" goto help
27
+
28
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29
+ goto end
30
+
31
+ :help
32
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33
+
34
+ :end
35
+ popd
@@ -0,0 +1,4 @@
1
+ .
2
+ sphinx_rtd_theme==2.0.0
3
+ myst-parser==5.0.0
4
+ nbsphinx==0.9.3
@@ -0,0 +1,58 @@
1
+ API
2
+ ===
3
+
4
+ Tokenizer
5
+ ---------
6
+
7
+ .. toctree::
8
+ :maxdepth: 1
9
+
10
+ descope.tokenizer
11
+
12
+ Dataset
13
+ --------
14
+
15
+ .. toctree::
16
+ :maxdepth: 1
17
+
18
+ descope.dataset
19
+
20
+ Trainer
21
+ -------
22
+
23
+ .. toctree::
24
+ :maxdepth: 1
25
+
26
+ descope.trainer
27
+
28
+ Inference
29
+ ---------
30
+
31
+ .. toctree::
32
+ :maxdepth: 1
33
+
34
+ descope.inference
35
+
36
+ Utils
37
+ -----
38
+
39
+ .. toctree::
40
+ :maxdepth: 1
41
+
42
+ descope.utils
43
+
44
+ Logging
45
+ -------
46
+
47
+ .. toctree::
48
+ :maxdepth: 1
49
+
50
+ descope.logging
51
+
52
+ Arguments
53
+ ---------
54
+
55
+ .. toctree::
56
+ :maxdepth: 1
57
+
58
+ descope.arguments
@@ -0,0 +1,15 @@
1
+ # Acknowledgements
2
+
3
+ We sincerely thank the authors of following open-source projects:
4
+
5
+ - [PyTorch](https://github.com/pytorch/pytorch)
6
+ - [Transformers](https://github.com/huggingface/transformers)
7
+ - [Datasets](https://github.com/huggingface/datasets)
8
+ - [Accelerate](https://github.com/huggingface/accelerate)
9
+ - [Scanpy](https://github.com/scverse/scanpy)
10
+ - [cell-eval](https://github.com/ArcInstitute/cell-eval)
11
+ - [STATE](https://github.com/ArcInstitute/state)
12
+ - [scGPT](https://github.com/bowang-lab/scGPT/tree/main)
13
+ - [EpiAgent](https://github.com/xy-chen16/EpiAgent)
14
+ - [GEARS](https://github.com/snap-stanford/GEARS)
15
+ - [wppkg](https://github.com/Peg-Wu/wppkg)
@@ -0,0 +1,19 @@
1
+ # Datasets
2
+
3
+ ### scRNA-seq
4
+
5
+ | Paper | Dataset | Download Link |
6
+ | :----------------------------------------------------------: | :--------------------: | :----------------------------------------------------------: |
7
+ | [Replogle et al., 2022](https://www.cell.com/cell/fulltext/S0092-8674(22)00597-9) | K562_GWPS (61.3GB) | [download](https://plus.figshare.com/ndownloader/files/35775507) |
8
+ | [Replogle et al., 2022](https://www.cell.com/cell/fulltext/S0092-8674(22)00597-9) | K562_ESSENTIAL (9.9GB) | [download](https://plus.figshare.com/ndownloader/files/35773219) |
9
+ | [Replogle et al., 2022](https://www.cell.com/cell/fulltext/S0092-8674(22)00597-9) | RPE1 (8.1GB) | [download](https://plus.figshare.com/ndownloader/files/35775606) |
10
+ | [Nadig et al., 2025](https://www.nature.com/articles/s41588-025-02169-3) | HEPG2 (5.2GB) | [download](https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE264667&format=file&file=GSE264667%5Fhepg2%5Fraw%5Fsinglecell%5F01%2Eh5ad) |
11
+ | [Nadig et al., 2025](https://www.nature.com/articles/s41588-025-02169-3) | JURKAT (8.7GB) | [download](https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE264667&format=file&file=GSE264667%5Fjurkat%5Fraw%5Fsinglecell%5F01%2Eh5ad) |
12
+
13
+ - The H1 dataset was obtained from the [Virtual Cell Challenge 2025](https://virtualcellchallenge.org/) ([download](https://storage.googleapis.com/vcc_data_prod/datasets/state/competition_support_set.zip)).
14
+ - NOTE: ESM2 gene embeddings can also be obtained from here.
15
+
16
+
17
+ ### scATAC-seq
18
+
19
+ - Cell-by-cCRE / Cell-by-peak: [Human-scATAC-Corpus](https://health.tsinghua.edu.cn/human-scatac-corpus/download.php)
@@ -0,0 +1,65 @@
1
+ # Installation
2
+
3
+ ## Step 1: Set up a python environment
4
+
5
+ We recommend creating a virtual Python environment with [Anaconda](https://docs.anaconda.com/free/anaconda/install/linux/):
6
+
7
+ - Required version: `python >= 3.10`
8
+
9
+ ```bash
10
+ conda create -n descope python=3.10
11
+ conda activate descope
12
+ ```
13
+
14
+ ## Step 2: Install pytorch
15
+
16
+ Install `PyTorch` based on your system configuration. Refer to [PyTorch installation instructions](https://pytorch.org/get-started/previous-versions/).
17
+
18
+ For the exact command, for example:
19
+
20
+ - You may choose any version to install, but make sure the PyTorch version is not too old.
21
+ - We recommend `torch ≥ 2.6`.
22
+
23
+ ```bash
24
+ # Installation Example: torch v2.7.1
25
+ # CUDA 11.8
26
+ pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu118
27
+ # CUDA 12.6
28
+ pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu126
29
+ # CUDA 12.8
30
+ pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu128
31
+ ```
32
+
33
+ ## Step 3: Install deepspeed (optional)
34
+
35
+ Install `DeepSpeed` based on your system configuration. Refer to [DeepSpeed installation instructions](https://www.deepspeed.ai/tutorials/advanced-install/).
36
+
37
+ For the exact command, for example:
38
+
39
+ ```bash
40
+ pip install deepspeed
41
+ ```
42
+
43
+ ## Step 4: Install descope and dependencies
44
+
45
+ To install `descope`, run:
46
+
47
+ ```bash
48
+ pip install descopex
49
+ ```
50
+
51
+ Or install from `github`:
52
+
53
+ ```bash
54
+ git clone https://github.com/Peg-Wu/DeSCOPE.git
55
+ cd DeSCOPE
56
+ pip install [-e] .
57
+ ```
58
+
59
+ Check if installation was successful:
60
+
61
+ ```python
62
+ import descope
63
+ descope.welcome()
64
+ ```
65
+