This is the official implementation for drGAT: Attention-Guided Gene Assessment for Drug Response in Drug-Cell-Gene Heterogeneous Network.
This model is created to understand how genes influence Drug Response using Graph Attention Networks (GAT) on heterogeneous networks of drugs, cells, and genes. It predicts Drug Response based on the attention coefficients generated during this process. This has been implemented in Python.
This quick start guide demonstrates how to run drGAT predictions on both CPU and GPU, completing the process within seconds.
git clone git@github.com:inoue0426/drGAT.git
cd drGAT
docker build -t drgat:latest .
docker run -it -p 9999:9999 inoue0426/drgat
Then access http://localhost:9999/notebooks/Tutorial.ipynb and run all cells.
* This might require you to increase the memory usage on docker. If so, please follow this:
- Open Docker Desktop Dashboard
- Click on the Settings icon
- Navigate to Resources > Advanced
- Adjust the Memory slider to increase the limit
- Click "Apply & Restart" to save changes
The model takes the following data structure (please refer to the notebook for detailed information):
data = [
drug, # Drug similarity matrix
cell, # Cell line similarity matrix
gene, # Gene similarity matrix
edge_index, # Graph edge indices
train_drug, # Training set drug indices
train_cell, # Training set cell line indices
val_drug, # Validation set drug indices
val_cell, # Validation set cell line indices
train_labels, # Training set binary labels
val_labels # Validation set binary labels
]
predict, res = drGAT.eval(model, test) # Probability of sensitivity and Metrics.
res # Metrics
| Accuracy | Precision | Recall | F1 Score | True Positive | True Negative | False Positive | False Negative |
|-----------|-----------|---------|-----------|----------------|---------------|----------------|-----------------|
| 0.771375 | 0.740881 | 0.783245 | 0.761474 | 1178 | 1312 | 412 | 326 |
predict # Probability
tensor([0.7653, 0.3292, 0.3037, ..., 0.9121, 0.4277, 0.2037])
predict, _ = drGAT.eval(model, test)
predict
# Probability of sensitivity.
tensor(0.7653)
Refer to model_training.ipynb to retrain the model. If you want to use your dataset, create_dataset.ipynb might be useful.
"torch==2.0.1",
"torch-geometric==2.3.1",
"numpy==1.26.4",
"matplotlib",
"pandas==2.2.2",
"jupyter",
"ipykernel"
** NOTE: Please ensure the version matches exactly with your GPU/CPU specifications.
Our experiment was conducted on Ubuntu with an NVIDIA A100 Tensor Core GPU.
If you want to re-train the model, we recommend using GPUs.
uv venv --python 3.10
uv pip install -r pyproject.toml
jupyter notebook --port 9999
Then access to http://localhost:9999/notebooks/Tutorial.ipynb
** NOTE: Please ensure the version matches exactly with your GPU/CPU specifications.
Data for this project came from CellMinerCDB and is in the data direcotry as well as the preprocessing code here.
@article{inoue2024drgat,
title={drGAT: Attention-Guided Gene Assessment of Drug Response Utilizing a Drug-Cell-Gene Heterogeneous Network},
author={Inoue, Yoshitaka and Lee, Hunmin and Fu, Tianfan and Luna, Augustin},
journal={ArXiv},
year={2024},
publisher={arXiv}
}