This project tries to predict the kind of effect that occurs when two drugs are taken in conjunction, purely from their molecular structure.
DrIP can be used in multiple ways. Please use as suited to your needs.
The web application can be accessed at DrIP. This is good for one-off predictions and using a graphical interface.
Use the molecular editor on the left to draw the candidate drug molecule. Use the dropdown list on the right to choose an existing drug from the DrugBank database. Clicking on the predict button then gives the top five predicted interactions and the probabilities predicted by the model.
To run bulk predictions, DrIP can be used locally.
To setup a conda environment and run predictions follow the instructions below. Clone the repository
git clone https://github.com/AshwinHegde/DrIP
Create a conda environment from the environment.yml file and activate the environment
cd DrIP
conda env create -n DrIP -f environment.yml
source activate DrIP
Next download the pre-trained model
bash download_model.sh
Now you are good to go. See instructions below to run inference.
To exit (deactivate) the conda environment run
conda deactivate
Predictions from the command line are made using the predict_cli.py
file.
python Drug-Interaction-Predictor/predict_cli.py --candidates_file [candidates.txt] --drugs_file [drugs.txt] --target_file [output.csv] --model [model_file]
candidates_file
- path to the file of candidate drug SMILES strings. This file should be a.txt
file. It must contain one SMILES string per line.drugs_file
- path to the file of existing drug SMILES strings. This file should also be a.txt
file and contain one SMILES string per line.target_file
- path to the output file which will contain interactions for each pair of drugs fromcandidates_file
anddrugs_file
. This file should be a.csv
file.model
(optional) - path to the model file used for predictions. By default uses the model downloaded. Change this if you want to use your own model.
To test the CLI, you can use the sample data provided. Simply run
python Drug-Interaction-Predictor/predict_cli.py -c data/sample/candidates.txt -d data/sample/drugs.txt -t interactions.csv
Data is obtained from DrugBank, a comprehensive drug database. The data is available for free for academic and non-commercial purposes. If you are interested, data can be requested from DrugBank on their website. The data obtained is in XML format.
More information on the project can be found in my slides
Special thanks to Shristi Pandey whose project Diction got me interested originally in this subject. I have built on her codebase.
One of the models was trained on feature embeddings generated by the Mol2Vec package :
@article{doi:10.1021/acs.jcim.7b00616,
author = {Jaeger, Sabrina and Fulle, Simone and Turk, Samo},
title = {Mol2vec: Unsupervised Machine Learning Approach with Chemical Intuition},
journal = {Journal of Chemical Information and Modeling},
volume = {0},
number = {ja},
pages = {null},
year = {0},
doi = {10.1021/acs.jcim.7b00616},
URL = {http://dx.doi.org/10.1021/acs.jcim.7b00616},
eprint = {http://dx.doi.org/10.1021/acs.jcim.7b00616}
}