Skip to content

Using graph neural networks for predicting drug drug interactions

Notifications You must be signed in to change notification settings

horacepan/DrugInteractions

Repository files navigation

DrugInteractions

Directory Structure

├── data
│   ├── ddi_pairs.txt
├── dataloaders.py
├── main.py
├── models.py
├── utils.py
└── .gitignore

Requirements

  • Python3
  • pandas
  • numpy
  • torch
  • tensorboardX

Running the training script

If the DDI pairs data lives in ./data/ddi_pairs.txt, then you might run something like this:

python main.py --data_fn './data/ddi_pairs.txt' --hid_dim 256 --epochs 300 --savedir './results/'  --exp_name 'baseline_256h'  --test_epoch 1  --batch_size 1024  --cuda --save

To run the training script with graph structure, you might run something like this:

python main_graph.py --data_fn './data/ddi_pairs.txt' --struc_fn './data/3d_struc.csv' --batch_size 1024 --test_epoch 1 --hid_dim 512 --model GCNEntPair --save  --exp_name 'gcnentpair_512h' --cuda

To run the training script that uses Morgan Fingerprints, run:

python main_fp.py --data_fn './data/ddi_pairs.txt' --pkl_fn './data/db_smiles.pkl' --batch_size 256 --hid_dim 256 --save --exp_name 'morgan_fingerprints_256h'

Modify the savedir and exp_name to wherever you'd like your results to be stored. If the directory specified by savedir does not currently exist, utils.setup_experiment_log will create it.

About

Using graph neural networks for predicting drug drug interactions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published