txoptimus 0.1.0__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.
- txoptimus-0.1.0/MANIFEST.in +7 -0
- txoptimus-0.1.0/PKG-INFO +156 -0
- txoptimus-0.1.0/README.md +117 -0
- txoptimus-0.1.0/environment.yml +111 -0
- txoptimus-0.1.0/requirements.txt +20 -0
- txoptimus-0.1.0/setup.cfg +4 -0
- txoptimus-0.1.0/setup.py +107 -0
- txoptimus-0.1.0/txoptimus/__init__.py +8 -0
- txoptimus-0.1.0/txoptimus/core/TxData.py +160 -0
- txoptimus-0.1.0/txoptimus/core/TxEval.py +42 -0
- txoptimus-0.1.0/txoptimus/core/TxGNN.py +764 -0
- txoptimus-0.1.0/txoptimus/core/__init__.py +3 -0
- txoptimus-0.1.0/txoptimus/core/data_splits/HumanDO.obo +144082 -0
- txoptimus-0.1.0/txoptimus/core/data_splits/__init__.py +0 -0
- txoptimus-0.1.0/txoptimus/core/data_splits/datasplit.py +204 -0
- txoptimus-0.1.0/txoptimus/core/data_splits/do_obo_parser.py +631 -0
- txoptimus-0.1.0/txoptimus/core/data_splits/kg_grouped_diseases.csv +22206 -0
- txoptimus-0.1.0/txoptimus/core/data_splits/kg_grouped_diseases_bert_map.csv +6393 -0
- txoptimus-0.1.0/txoptimus/core/data_splits/mondo_references.csv +117273 -0
- txoptimus-0.1.0/txoptimus/core/graphmask/__init__.py +0 -0
- txoptimus-0.1.0/txoptimus/core/graphmask/abstract_torch_module.py +21 -0
- txoptimus-0.1.0/txoptimus/core/graphmask/hard_concrete.py +48 -0
- txoptimus-0.1.0/txoptimus/core/graphmask/lagrangian_optimization.py +59 -0
- txoptimus-0.1.0/txoptimus/core/graphmask/moving_average.py +40 -0
- txoptimus-0.1.0/txoptimus/core/graphmask/multiple_inputs_layernorm_linear.py +68 -0
- txoptimus-0.1.0/txoptimus/core/graphmask/sigmoid_penalty.py +53 -0
- txoptimus-0.1.0/txoptimus/core/graphmask/squeezer.py +6 -0
- txoptimus-0.1.0/txoptimus/core/model.py +642 -0
- txoptimus-0.1.0/txoptimus/core/utils.py +1772 -0
- txoptimus-0.1.0/txoptimus/core/version.py +22 -0
- txoptimus-0.1.0/txoptimus/data_manager.py +166 -0
- txoptimus-0.1.0/txoptimus/disease_matcher.py +177 -0
- txoptimus-0.1.0/txoptimus/engines/__init__.py +2 -0
- txoptimus-0.1.0/txoptimus/engines/optimus.py +293 -0
- txoptimus-0.1.0/txoptimus/engines/prime.py +294 -0
- txoptimus-0.1.0/txoptimus/txoptimus.py +263 -0
- txoptimus-0.1.0/txoptimus.egg-info/PKG-INFO +156 -0
- txoptimus-0.1.0/txoptimus.egg-info/SOURCES.txt +40 -0
- txoptimus-0.1.0/txoptimus.egg-info/dependency_links.txt +1 -0
- txoptimus-0.1.0/txoptimus.egg-info/entry_points.txt +2 -0
- txoptimus-0.1.0/txoptimus.egg-info/requires.txt +20 -0
- txoptimus-0.1.0/txoptimus.egg-info/top_level.txt +1 -0
txoptimus-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: txoptimus
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Zero-shot drug repurposing via TxGNN on PrimeKG and OptimusKG
|
|
5
|
+
Home-page: https://github.com/arsalanriaz/txoptimus
|
|
6
|
+
Author: arsalanriaz
|
|
7
|
+
Keywords: drug-repurposing zero-shot graph-neural-network knowledge-graph biomedical txgnn primekg optimuskg
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
11
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Requires-Python: >=3.8
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Requires-Dist: torch==2.4.0
|
|
20
|
+
Requires-Dist: dgl==2.4.0
|
|
21
|
+
Requires-Dist: torch-geometric==2.6.1
|
|
22
|
+
Requires-Dist: numpy==1.24.4
|
|
23
|
+
Requires-Dist: pandas==2.0.3
|
|
24
|
+
Requires-Dist: scikit-learn==1.3.2
|
|
25
|
+
Requires-Dist: scipy==1.10.1
|
|
26
|
+
Requires-Dist: matplotlib==3.7.5
|
|
27
|
+
Requires-Dist: tqdm==4.70.0
|
|
28
|
+
Requires-Dist: requests==2.32.4
|
|
29
|
+
Requires-Dist: transformers
|
|
30
|
+
Requires-Dist: networkx==3.1
|
|
31
|
+
Requires-Dist: pydantic==2.10.6
|
|
32
|
+
Requires-Dist: PyYAML==6.0.3
|
|
33
|
+
Requires-Dist: openpyxl==3.1.5
|
|
34
|
+
Requires-Dist: xlsxwriter==3.2.9
|
|
35
|
+
Requires-Dist: goatools==1.6.5
|
|
36
|
+
Requires-Dist: statsmodels==0.14.1
|
|
37
|
+
Requires-Dist: rich==14.3.4
|
|
38
|
+
Requires-Dist: pillow==10.4.0
|
|
39
|
+
|
|
40
|
+
# TxOptimus
|
|
41
|
+
|
|
42
|
+
**Zero-shot drug repurposing via TxGNN on PrimeKG and OptimusKG.**
|
|
43
|
+
|
|
44
|
+
TxOptimus is a unified Python package that wraps [TxGNN](https://github.com/mims-harvard/TxGNN) (Huang et al., *Nature Medicine*, 2024) with two knowledge graph backends:
|
|
45
|
+
|
|
46
|
+
- **TxGNN Prime** — the original baseline trained on Harvard [PrimeKG](https://github.com/mims-harvard/PrimeKG)
|
|
47
|
+
- **TxGNN Optimus** — an enriched model trained on the Zitnik Lab's [OptimusKG](https://zitniklab.hms.harvard.edu/projects/OptimusKG/), a multimodal knowledge graph validated by LLM extraction (PaperQA3)
|
|
48
|
+
|
|
49
|
+
OptimusKG achieves a **~34% improvement in Macro AUROC** over PrimeKG in zero-shot drug repurposing for oncology under the `cell_proliferation` split.
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Create a dedicated environment (recommended)
|
|
55
|
+
conda create -n txoptimus python=3.8
|
|
56
|
+
conda activate txoptimus
|
|
57
|
+
|
|
58
|
+
# Install
|
|
59
|
+
pip install txoptimus
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
> **⚠ System Requirements:**
|
|
63
|
+
> - RAM: ≥32 GB (OptimusKG loads a 21.8M-edge graph)
|
|
64
|
+
> - Storage: ≥8 GB free disk space
|
|
65
|
+
> - Python: 3.8+ (tested on 3.8.20)
|
|
66
|
+
> - GPU: Optional (CPU inference supported)
|
|
67
|
+
|
|
68
|
+
## Quick Start
|
|
69
|
+
|
|
70
|
+
### 1. Download data files
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
txoptimus --setup # downloads both PrimeKG and OptimusKG data
|
|
74
|
+
txoptimus --setup prime # only PrimeKG
|
|
75
|
+
txoptimus --setup optimus # only OptimusKG
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 2. Run zero-shot drug repurposing
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Using OptimusKG (recommended)
|
|
82
|
+
txoptimus --engine optimus --diseases "oral cavity cancer" "glioblastoma"
|
|
83
|
+
|
|
84
|
+
# Using PrimeKG baseline
|
|
85
|
+
txoptimus --engine prime --diseases "oral cavity cancer"
|
|
86
|
+
|
|
87
|
+
# Benchmark mode — runs both and generates a comparison report
|
|
88
|
+
txoptimus --engine benchmark --diseases "oral cavity cancer"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 3. Fuzzy disease matching
|
|
92
|
+
|
|
93
|
+
TxOptimus uses **PubMedBERT embeddings** to fuzzy-match your disease terms against the knowledge graph vocabulary. If your input doesn't match exactly, the tool will show the top-10 closest matches and let you pick:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
Disease term: "breast cancer"
|
|
97
|
+
|
|
98
|
+
Matched terms in OPTIMUS:
|
|
99
|
+
[1] invasive breast carcinoma (similarity: 0.94)
|
|
100
|
+
[2] breast carcinoma (similarity: 0.91)
|
|
101
|
+
[3] triple-negative breast cancer (similarity: 0.89)
|
|
102
|
+
|
|
103
|
+
Select terms (e.g., '1 3' or 'all'): 1 3
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 4. Enable explainability
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# Add --graphmask to enable GraphMask pathway attribution
|
|
110
|
+
txoptimus --engine optimus --diseases "oral cavity cancer" --graphmask
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
> **Note:** GraphMask requires ≥30 GB RAM and takes 2-4 hours on CPU.
|
|
114
|
+
|
|
115
|
+
## Full CLI Reference
|
|
116
|
+
|
|
117
|
+
| Argument | Type | Default | Description |
|
|
118
|
+
|:---|:---|:---|:---|
|
|
119
|
+
| `--engine` | str | `optimus` | `prime`, `optimus`, or `benchmark` |
|
|
120
|
+
| `--diseases` | str[] | *(required)* | Disease terms (fuzzy matched) |
|
|
121
|
+
| `--graphmask` | flag | `False` | Enable GraphMask explainability |
|
|
122
|
+
| `--output_dir` | str | `./txoptimus_output` | Output directory |
|
|
123
|
+
| `--prefix` | str | `txoptimus` | File prefix |
|
|
124
|
+
| `--threads` | int | `18` | CPU threads |
|
|
125
|
+
| `--top_k` | int | `100` | Drug candidates per disease |
|
|
126
|
+
| `--setup` | str? | — | Download data (`prime`/`optimus`/both) |
|
|
127
|
+
| `--data_dir` | str | `~/.txoptimus` | Data directory override |
|
|
128
|
+
|
|
129
|
+
## Output Files
|
|
130
|
+
|
|
131
|
+
| File | Description |
|
|
132
|
+
|:---|:---|
|
|
133
|
+
| `{prefix}_{engine}_results.json` | Full metrics (AUROC, AUPRC, per-relation, graph profile) |
|
|
134
|
+
| `{prefix}_{engine}_candidates.csv` | Top-K drug candidates ranked by score |
|
|
135
|
+
| `{prefix}_comparison_report.md` | Side-by-side comparison (benchmark mode only) |
|
|
136
|
+
|
|
137
|
+
## Citation
|
|
138
|
+
|
|
139
|
+
If you use TxOptimus in your research, please cite the original TxGNN paper:
|
|
140
|
+
|
|
141
|
+
```bibtex
|
|
142
|
+
@article{huang2024txgnn,
|
|
143
|
+
title={Zero-shot prediction of therapeutic use with geometric deep learning and clinician centered design},
|
|
144
|
+
author={Huang, Kexin and Chandak, Payal and Wang, Qianwen and Haber, Shreyas and Zitnik, Marinka},
|
|
145
|
+
journal={Nature Medicine},
|
|
146
|
+
year={2024}
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## License
|
|
151
|
+
|
|
152
|
+
MIT License — see [LICENSE](LICENSE) for details.
|
|
153
|
+
|
|
154
|
+
## Author
|
|
155
|
+
|
|
156
|
+
**arsalanriaz**
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# TxOptimus
|
|
2
|
+
|
|
3
|
+
**Zero-shot drug repurposing via TxGNN on PrimeKG and OptimusKG.**
|
|
4
|
+
|
|
5
|
+
TxOptimus is a unified Python package that wraps [TxGNN](https://github.com/mims-harvard/TxGNN) (Huang et al., *Nature Medicine*, 2024) with two knowledge graph backends:
|
|
6
|
+
|
|
7
|
+
- **TxGNN Prime** — the original baseline trained on Harvard [PrimeKG](https://github.com/mims-harvard/PrimeKG)
|
|
8
|
+
- **TxGNN Optimus** — an enriched model trained on the Zitnik Lab's [OptimusKG](https://zitniklab.hms.harvard.edu/projects/OptimusKG/), a multimodal knowledge graph validated by LLM extraction (PaperQA3)
|
|
9
|
+
|
|
10
|
+
OptimusKG achieves a **~34% improvement in Macro AUROC** over PrimeKG in zero-shot drug repurposing for oncology under the `cell_proliferation` split.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Create a dedicated environment (recommended)
|
|
16
|
+
conda create -n txoptimus python=3.8
|
|
17
|
+
conda activate txoptimus
|
|
18
|
+
|
|
19
|
+
# Install
|
|
20
|
+
pip install txoptimus
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
> **⚠ System Requirements:**
|
|
24
|
+
> - RAM: ≥32 GB (OptimusKG loads a 21.8M-edge graph)
|
|
25
|
+
> - Storage: ≥8 GB free disk space
|
|
26
|
+
> - Python: 3.8+ (tested on 3.8.20)
|
|
27
|
+
> - GPU: Optional (CPU inference supported)
|
|
28
|
+
|
|
29
|
+
## Quick Start
|
|
30
|
+
|
|
31
|
+
### 1. Download data files
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
txoptimus --setup # downloads both PrimeKG and OptimusKG data
|
|
35
|
+
txoptimus --setup prime # only PrimeKG
|
|
36
|
+
txoptimus --setup optimus # only OptimusKG
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 2. Run zero-shot drug repurposing
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Using OptimusKG (recommended)
|
|
43
|
+
txoptimus --engine optimus --diseases "oral cavity cancer" "glioblastoma"
|
|
44
|
+
|
|
45
|
+
# Using PrimeKG baseline
|
|
46
|
+
txoptimus --engine prime --diseases "oral cavity cancer"
|
|
47
|
+
|
|
48
|
+
# Benchmark mode — runs both and generates a comparison report
|
|
49
|
+
txoptimus --engine benchmark --diseases "oral cavity cancer"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 3. Fuzzy disease matching
|
|
53
|
+
|
|
54
|
+
TxOptimus uses **PubMedBERT embeddings** to fuzzy-match your disease terms against the knowledge graph vocabulary. If your input doesn't match exactly, the tool will show the top-10 closest matches and let you pick:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Disease term: "breast cancer"
|
|
58
|
+
|
|
59
|
+
Matched terms in OPTIMUS:
|
|
60
|
+
[1] invasive breast carcinoma (similarity: 0.94)
|
|
61
|
+
[2] breast carcinoma (similarity: 0.91)
|
|
62
|
+
[3] triple-negative breast cancer (similarity: 0.89)
|
|
63
|
+
|
|
64
|
+
Select terms (e.g., '1 3' or 'all'): 1 3
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 4. Enable explainability
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Add --graphmask to enable GraphMask pathway attribution
|
|
71
|
+
txoptimus --engine optimus --diseases "oral cavity cancer" --graphmask
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
> **Note:** GraphMask requires ≥30 GB RAM and takes 2-4 hours on CPU.
|
|
75
|
+
|
|
76
|
+
## Full CLI Reference
|
|
77
|
+
|
|
78
|
+
| Argument | Type | Default | Description |
|
|
79
|
+
|:---|:---|:---|:---|
|
|
80
|
+
| `--engine` | str | `optimus` | `prime`, `optimus`, or `benchmark` |
|
|
81
|
+
| `--diseases` | str[] | *(required)* | Disease terms (fuzzy matched) |
|
|
82
|
+
| `--graphmask` | flag | `False` | Enable GraphMask explainability |
|
|
83
|
+
| `--output_dir` | str | `./txoptimus_output` | Output directory |
|
|
84
|
+
| `--prefix` | str | `txoptimus` | File prefix |
|
|
85
|
+
| `--threads` | int | `18` | CPU threads |
|
|
86
|
+
| `--top_k` | int | `100` | Drug candidates per disease |
|
|
87
|
+
| `--setup` | str? | — | Download data (`prime`/`optimus`/both) |
|
|
88
|
+
| `--data_dir` | str | `~/.txoptimus` | Data directory override |
|
|
89
|
+
|
|
90
|
+
## Output Files
|
|
91
|
+
|
|
92
|
+
| File | Description |
|
|
93
|
+
|:---|:---|
|
|
94
|
+
| `{prefix}_{engine}_results.json` | Full metrics (AUROC, AUPRC, per-relation, graph profile) |
|
|
95
|
+
| `{prefix}_{engine}_candidates.csv` | Top-K drug candidates ranked by score |
|
|
96
|
+
| `{prefix}_comparison_report.md` | Side-by-side comparison (benchmark mode only) |
|
|
97
|
+
|
|
98
|
+
## Citation
|
|
99
|
+
|
|
100
|
+
If you use TxOptimus in your research, please cite the original TxGNN paper:
|
|
101
|
+
|
|
102
|
+
```bibtex
|
|
103
|
+
@article{huang2024txgnn,
|
|
104
|
+
title={Zero-shot prediction of therapeutic use with geometric deep learning and clinician centered design},
|
|
105
|
+
author={Huang, Kexin and Chandak, Payal and Wang, Qianwen and Haber, Shreyas and Zitnik, Marinka},
|
|
106
|
+
journal={Nature Medicine},
|
|
107
|
+
year={2024}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## License
|
|
112
|
+
|
|
113
|
+
MIT License — see [LICENSE](LICENSE) for details.
|
|
114
|
+
|
|
115
|
+
## Author
|
|
116
|
+
|
|
117
|
+
**arsalanriaz**
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
name: /media/pmlab/c2dd36be-37c8-481e-ac15-95767a75f66e/Tools_DB/txgnn/txgnn_env
|
|
2
|
+
channels:
|
|
3
|
+
- defaults
|
|
4
|
+
dependencies:
|
|
5
|
+
- _libgcc_mutex=0.1
|
|
6
|
+
- _openmp_mutex=5.1
|
|
7
|
+
- ca-certificates=2026.8.13
|
|
8
|
+
- ld_impl_linux-64=2.44
|
|
9
|
+
- libffi=3.4.8
|
|
10
|
+
- libgcc=15.2.0
|
|
11
|
+
- libgcc-ng=15.2.0
|
|
12
|
+
- libstdcxx=15.2.0
|
|
13
|
+
- libstdcxx-ng=15.2.0
|
|
14
|
+
- libxcb=1.17.0
|
|
15
|
+
- libzlib=1.3.2
|
|
16
|
+
- ncurses=6.6
|
|
17
|
+
- openssl=3.5.7
|
|
18
|
+
- pip=24.2
|
|
19
|
+
- pthread-stubs=0.3
|
|
20
|
+
- python=3.8.20
|
|
21
|
+
- readline=8.3
|
|
22
|
+
- setuptools=75.1.0
|
|
23
|
+
- sqlite=3.53.2
|
|
24
|
+
- tk=8.6.15
|
|
25
|
+
- wheel=0.44.0
|
|
26
|
+
- xorg-libx11=1.8.13
|
|
27
|
+
- xorg-libxau=1.0.12
|
|
28
|
+
- xorg-libxdmcp=1.1.5
|
|
29
|
+
- xorg-xorgproto=2025.1
|
|
30
|
+
- xz=5.8.2
|
|
31
|
+
- zlib=1.3.2
|
|
32
|
+
- pip:
|
|
33
|
+
- aiohappyeyeballs==2.4.4
|
|
34
|
+
- aiohttp==3.10.11
|
|
35
|
+
- aiosignal==1.3.1
|
|
36
|
+
- annotated-types==0.7.0
|
|
37
|
+
- async-timeout==5.0.1
|
|
38
|
+
- attrs==25.3.0
|
|
39
|
+
- certifi==2026.7.22
|
|
40
|
+
- charset-normalizer==3.5.1
|
|
41
|
+
- contourpy==1.1.1
|
|
42
|
+
- cycler==0.12.1
|
|
43
|
+
- dgl==2.4.0+cu121
|
|
44
|
+
- et-xmlfile==2.0.0
|
|
45
|
+
- filelock==3.16.1
|
|
46
|
+
- fonttools==4.57.0
|
|
47
|
+
- frozenlist==1.5.0
|
|
48
|
+
- fsspec==2025.3.0
|
|
49
|
+
- ftpretty==0.4.0
|
|
50
|
+
- goatools==1.6.5
|
|
51
|
+
- idna==3.15
|
|
52
|
+
- importlib-resources==6.4.5
|
|
53
|
+
- jinja2==3.1.6
|
|
54
|
+
- joblib==1.4.2
|
|
55
|
+
- kiwisolver==1.4.7
|
|
56
|
+
- markdown-it-py==3.0.0
|
|
57
|
+
- markupsafe==2.1.5
|
|
58
|
+
- matplotlib==3.7.5
|
|
59
|
+
- mdurl==0.1.2
|
|
60
|
+
- mpmath==1.3.0
|
|
61
|
+
- multidict==6.1.0
|
|
62
|
+
- networkx==3.1
|
|
63
|
+
- numpy==1.24.4
|
|
64
|
+
- nvidia-cublas-cu12==12.1.3.1
|
|
65
|
+
- nvidia-cuda-cupti-cu12==12.1.105
|
|
66
|
+
- nvidia-cuda-nvrtc-cu12==12.1.105
|
|
67
|
+
- nvidia-cuda-runtime-cu12==12.1.105
|
|
68
|
+
- nvidia-cudnn-cu12==9.1.0.70
|
|
69
|
+
- nvidia-cufft-cu12==11.0.2.54
|
|
70
|
+
- nvidia-curand-cu12==10.3.2.106
|
|
71
|
+
- nvidia-cusolver-cu12==11.4.5.107
|
|
72
|
+
- nvidia-cusparse-cu12==12.1.0.106
|
|
73
|
+
- nvidia-nccl-cu12==2.20.5
|
|
74
|
+
- nvidia-nvjitlink-cu12==12.9.86
|
|
75
|
+
- nvidia-nvtx-cu12==12.1.105
|
|
76
|
+
- openpyxl==3.1.5
|
|
77
|
+
- packaging==26.2
|
|
78
|
+
- pandas==2.0.3
|
|
79
|
+
- patsy==1.0.2
|
|
80
|
+
- pillow==10.4.0
|
|
81
|
+
- propcache==0.2.0
|
|
82
|
+
- psutil==7.2.2
|
|
83
|
+
- pydantic==2.10.6
|
|
84
|
+
- pydantic-core==2.27.2
|
|
85
|
+
- pydot==4.0.1
|
|
86
|
+
- pygments==2.19.2
|
|
87
|
+
- pyparsing==3.1.4
|
|
88
|
+
- python-dateutil==2.9.0.post0
|
|
89
|
+
- pytz==2026.3.post1
|
|
90
|
+
- pyyaml==6.0.3
|
|
91
|
+
- requests==2.32.4
|
|
92
|
+
- rich==14.3.4
|
|
93
|
+
- scikit-learn==1.3.2
|
|
94
|
+
- scipy==1.10.1
|
|
95
|
+
- six==1.17.0
|
|
96
|
+
- statsmodels==0.14.1
|
|
97
|
+
- sympy==1.13.3
|
|
98
|
+
- threadpoolctl==3.5.0
|
|
99
|
+
- torch==2.4.0
|
|
100
|
+
- torch-geometric==2.6.1
|
|
101
|
+
- tqdm==4.70.0
|
|
102
|
+
- triton==3.0.0
|
|
103
|
+
- txgnn==0.0.3
|
|
104
|
+
- typing-extensions==4.13.2
|
|
105
|
+
- tzdata==2026.3
|
|
106
|
+
- urllib3==2.2.3
|
|
107
|
+
- xlsxwriter==3.2.9
|
|
108
|
+
- yarl==1.15.2
|
|
109
|
+
- zipp==3.20.2
|
|
110
|
+
prefix:
|
|
111
|
+
/media/pmlab/c2dd36be-37c8-481e-ac15-95767a75f66e/Tools_DB/txgnn/txgnn_env
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
torch==2.4.0
|
|
2
|
+
dgl==2.4.0
|
|
3
|
+
torch-geometric==2.6.1
|
|
4
|
+
numpy==1.24.4
|
|
5
|
+
pandas==2.0.3
|
|
6
|
+
scikit-learn==1.3.2
|
|
7
|
+
scipy==1.10.1
|
|
8
|
+
matplotlib==3.7.5
|
|
9
|
+
tqdm==4.70.0
|
|
10
|
+
requests==2.32.4
|
|
11
|
+
transformers
|
|
12
|
+
networkx==3.1
|
|
13
|
+
pydantic==2.10.6
|
|
14
|
+
PyYAML==6.0.3
|
|
15
|
+
openpyxl==3.1.5
|
|
16
|
+
xlsxwriter==3.2.9
|
|
17
|
+
goatools==1.6.5
|
|
18
|
+
statsmodels==0.14.1
|
|
19
|
+
rich==14.3.4
|
|
20
|
+
pillow==10.4.0
|
txoptimus-0.1.0/setup.py
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
from setuptools.command.install import install
|
|
3
|
+
import sys
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class PostInstallCommand(install):
|
|
7
|
+
"""Post-installation: display requirements banner and environment warning."""
|
|
8
|
+
|
|
9
|
+
def run(self):
|
|
10
|
+
install.run(self)
|
|
11
|
+
# Environment warning
|
|
12
|
+
if hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix):
|
|
13
|
+
env_type = "virtual environment"
|
|
14
|
+
else:
|
|
15
|
+
env_type = "system Python"
|
|
16
|
+
|
|
17
|
+
print("\n" + "=" * 60)
|
|
18
|
+
print(" TxOptimus v0.1.0 installed successfully!")
|
|
19
|
+
print("=" * 60)
|
|
20
|
+
|
|
21
|
+
if env_type == "system Python":
|
|
22
|
+
print("\n ⚠ WARNING: You are installing into your SYSTEM Python.")
|
|
23
|
+
print(" It is strongly recommended to install TxOptimus in a")
|
|
24
|
+
print(" separate virtual or conda environment to avoid")
|
|
25
|
+
print(" overwriting existing dependencies.")
|
|
26
|
+
print("\n Create a dedicated environment:")
|
|
27
|
+
print(" conda create -n txoptimus python=3.8")
|
|
28
|
+
print(" conda activate txoptimus")
|
|
29
|
+
print(" pip install txoptimus")
|
|
30
|
+
|
|
31
|
+
print(f"\n Detected environment: {env_type}")
|
|
32
|
+
print(f" Python: {sys.version}")
|
|
33
|
+
|
|
34
|
+
print("""
|
|
35
|
+
REQUIREMENTS:
|
|
36
|
+
• RAM: ≥32 GB (OptimusKG loads a 21.8M-edge graph)
|
|
37
|
+
• Storage: ≥8 GB free disk space for data files
|
|
38
|
+
• Python: 3.8+ (tested on 3.8.20)
|
|
39
|
+
• GPU: Optional (CPU inference supported)
|
|
40
|
+
|
|
41
|
+
QUICK START:
|
|
42
|
+
1. Download data: txoptimus --setup
|
|
43
|
+
2. Run inference: txoptimus --engine optimus --diseases "oral cavity cancer"
|
|
44
|
+
3. Benchmark: txoptimus --engine benchmark --diseases "oral cavity cancer"
|
|
45
|
+
|
|
46
|
+
For more details: txoptimus --help
|
|
47
|
+
""")
|
|
48
|
+
print("=" * 60 + "\n")
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
with open("README.md", "r", encoding="utf-8") as f:
|
|
52
|
+
long_description = f.read()
|
|
53
|
+
|
|
54
|
+
setup(
|
|
55
|
+
name='txoptimus',
|
|
56
|
+
version='0.1.0',
|
|
57
|
+
description='Zero-shot drug repurposing via TxGNN on PrimeKG and OptimusKG',
|
|
58
|
+
long_description=long_description,
|
|
59
|
+
long_description_content_type='text/markdown',
|
|
60
|
+
author='arsalanriaz',
|
|
61
|
+
url='https://github.com/arsalanriaz/txoptimus',
|
|
62
|
+
python_requires='>=3.8',
|
|
63
|
+
packages=find_packages(),
|
|
64
|
+
include_package_data=True,
|
|
65
|
+
install_requires=[
|
|
66
|
+
'torch==2.4.0',
|
|
67
|
+
'dgl==2.4.0',
|
|
68
|
+
'torch-geometric==2.6.1',
|
|
69
|
+
'numpy==1.24.4',
|
|
70
|
+
'pandas==2.0.3',
|
|
71
|
+
'scikit-learn==1.3.2',
|
|
72
|
+
'scipy==1.10.1',
|
|
73
|
+
'matplotlib==3.7.5',
|
|
74
|
+
'tqdm==4.70.0',
|
|
75
|
+
'requests==2.32.4',
|
|
76
|
+
'transformers',
|
|
77
|
+
'networkx==3.1',
|
|
78
|
+
'pydantic==2.10.6',
|
|
79
|
+
'PyYAML==6.0.3',
|
|
80
|
+
'openpyxl==3.1.5',
|
|
81
|
+
'xlsxwriter==3.2.9',
|
|
82
|
+
'goatools==1.6.5',
|
|
83
|
+
'statsmodels==0.14.1',
|
|
84
|
+
'rich==14.3.4',
|
|
85
|
+
'pillow==10.4.0',
|
|
86
|
+
],
|
|
87
|
+
entry_points={
|
|
88
|
+
'console_scripts': [
|
|
89
|
+
'txoptimus=txoptimus.txoptimus:main',
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
cmdclass={
|
|
93
|
+
'install': PostInstallCommand,
|
|
94
|
+
},
|
|
95
|
+
classifiers=[
|
|
96
|
+
'Development Status :: 3 - Alpha',
|
|
97
|
+
'Intended Audience :: Science/Research',
|
|
98
|
+
'Topic :: Scientific/Engineering :: Bio-Informatics',
|
|
99
|
+
'Topic :: Scientific/Engineering :: Artificial Intelligence',
|
|
100
|
+
'Programming Language :: Python :: 3.8',
|
|
101
|
+
'Programming Language :: Python :: 3.9',
|
|
102
|
+
'Programming Language :: Python :: 3.10',
|
|
103
|
+
'License :: OSI Approved :: MIT License',
|
|
104
|
+
'Operating System :: OS Independent',
|
|
105
|
+
],
|
|
106
|
+
keywords='drug-repurposing zero-shot graph-neural-network knowledge-graph biomedical txgnn primekg optimuskg',
|
|
107
|
+
)
|