/deepdrug

DeepDrug: A general graph-based deep learning framework for drug relation prediction

Primary LanguagePython

model

DeepDrug: A general graph-based deep learning framework
for drug-drug interactions and drug-target interactions prediction


DeepDrug is a deep learning framework, using residual graph convolutional networks (RGCNs) and convolutional networks (CNNs) to learn the comprehensive structural and sequential representations of drugs and proteins in order to boost the drug-drug interactions(DDIs) and drug-target interactions(DTIs) prediction accuracy.

Installation

  • pytorch==1.8.1
  • pytorch-geometric==1.7.1
  • pytorch-lightning==1.3.6

Note: since pytorch-geometric v2.0.0 has modified many underlying interfaces to be compatible with heterogeneous graph, pytorch-geometric with a version < v2.0.0 is recommended.

Usage

python deepdrug.py --configfile ./config/KIBA.regression.yml

parameters in the config file:

dataset: dataset name, such as "KIBA"
task: binary/multilabel/multiclass/regression
category: DDI/DTI
entry1_file/entry2_file: a file contain processed drug/protein graph features
entry1_seq_file/entry2_seq_file: a csv format file contains drug/protein sequence features
pair_file: a file contains all sample (drug-drug or drug-protein) pairs
label_file: a file contains labels corresponding to pair_file, which can be one-column integer (for binary classification task), multi-columns integers (for multi-class/label classification task) and one-column float numbers (for regression task).
save_folder: a directory to save the outputs
gpus: the gpu device ID to use.
num_out_dim: 1 for binary classification and regression task, specific output dimension for multi-class/label classification task, such as 1317 for multi-label classification task for TwoSides dataset.

Data Processing

Processed datasets are avilable in figshare.

For drugs, the structural features can be easily constructed by

from dataset import EntryDataset
drug_df = pd.read_csv('drug.csv') 
save_folder = '/path/to/drug/graph/'
dataset = EntryDataset(save_folder)
dataset.drug_process(drug_df)
# graph features will be processed and saved in the /path/to/drug/graph/processed/data.pt 

For proteins, the structural features are constructed by PAIRPred software.

Cite Us

If you found this package useful, please cite our paper:

@article{DeepDrug,
  title={DeepDrug: A general graph-based deep learning framework for drug-drug interactions and drug-target interactions prediction},
  author={Yin, Qijin and Cao, Xusheng and Fan, Rui and Liu, Qiao and Jiang, Rui and Zeng, Wanwen},
  journal={bioRxiv},
  year={2022}
}