Skip to content

922397935/hyperiDPath-master

Repository files navigation

hyperiDPath

This is the PyTorch implementation for our paper: Hypergraph interpretable deep learning-based path-reasoning framework for drug repurposing

Introduction

hyperiDPath is a hypergraph interpretable deep learning-based path-reasoning framework for drug discovery and repurposing. This framework focuses on higher-order interactions among various biomolecules, including transcription factors, genes, proteins, and chemicals.

Environment Requirement

The code has been tested running under Python 3.9.

Installation

  1. To install the required packages for running hyperiDPath, please use the following command first. If you meet any problems when installing pytorch, please refer to pytorch official website
pip install -r requirements.txt
  1. You may need to download the following files to run hyperiDPath

Example to Run the Codes

Train

python train.py --config config/config.json 

Test

When the training is finished, you will get a file that records the parameters for the best model, remember its location (such as saved/models/hyperiDPath/0319_180500/model_best.pth) and use it for testing.

python test.py --config config/config.json --resume saved/models/hyperiDPath/0319_180500/model_best.pth

Inference

  1. Data. To make an inference on the new drug-disease pair, you need to prepare a csv file named test.csv under the folder data/test with the following fields, where the drug(node) is denoted by its drugbank ID and disease(hyperedge) is denoted by its C0XX code. Note that if your input drugs or diseases cannot be found in our dataset, the corresponding pairs will be ignored.
node_1,hyperedge_1
DB00001,C0040038
  1. Pre-trained model. You can use your own pre-trained model or use our prepared one model_best.pth and put the config.json and model_best.pth to the folder data/test.
  2. Run. We provide an argument K in the inference_config.json to control the output of the number of top-k critical paths identified by iDPath. Please use the following command to run the inference.
python inference.py --resume data/test/model_best.pth --config config/inference_config.json
  1. Result. After the inference is done, you will get a file named result.csv under the folder saved/models/hyperiDPath/xxxx_xxxxxx (where xxxx_xxxxxx is your runing time as the runing id). The result.csv contains the predicted probability of therapeutic effect and top-k critical paths of your input drug-disease pairs.

Dataset

Datasets used in the paper:

License

Distributed under the GPL-2.0 License License. See LICENSE for more information.

Acknowledge

Thanks to the author of iDPath for open-sourcing the code.

Contact

Bai Libing - LiBingBai10@gmail.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages