{"id":13774283,"url":"https://github.com/thinng/GraphDTA","last_synced_at":"2025-05-11T06:32:44.970Z","repository":{"id":201403154,"uuid":"191466400","full_name":"thinng/GraphDTA","owner":"thinng","description":"GraphDTA: Predicting drug-target binding affinity with graph neural networks","archived":false,"fork":false,"pushed_at":"2021-04-13T05:13:35.000Z","size":70683,"stargazers_count":189,"open_issues_count":1,"forks_count":75,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-02-13T10:09:42.242Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://doi.org/10.1093/bioinformatics/btaa921","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thinng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-06-11T23:56:36.000Z","updated_at":"2024-02-02T06:15:27.000Z","dependencies_parsed_at":"2023-10-19T21:44:54.293Z","dependency_job_id":null,"html_url":"https://github.com/thinng/GraphDTA","commit_stats":null,"previous_names":["thinng/graphdta"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinng%2FGraphDTA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinng%2FGraphDTA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinng%2FGraphDTA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinng%2FGraphDTA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinng","download_url":"https://codeload.github.com/thinng/GraphDTA/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225022069,"owners_count":17408548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T17:01:25.345Z","updated_at":"2024-11-17T09:30:41.996Z","avatar_url":"https://github.com/thinng.png","language":"Python","funding_links":[],"categories":["药物-靶标 药物-药物 化合物-蛋白质 相互作用","Deep Learning","Machine Learning Tasks and Models"],"sub_categories":["网络服务_其他","Drug Target Interaction"],"readme":"# Resources:\n\n+ README.md: this file.\n+ data/davis/folds/test_fold_setting1.txt,train_fold_setting1.txt; data/davis/Y,ligands_can.txt,proteins.txt\n  data/kiba/folds/test_fold_setting1.txt,train_fold_setting1.txt; data/kiba/Y,ligands_can.txt,proteins.txt\n  These file were downloaded from https://github.com/hkmztrk/DeepDTA/tree/master/data\n\n###  Source codes:\n+ create_data.py: create data in pytorch format\n+ utils.py: include TestbedDataset used by create_data.py to create data, and performance measures.\n+ training.py: train a GraphDTA model.\n+ models/ginconv.py, gat.py, gat_gcn.py, and gcn.py: proposed models GINConvNet, GATNet, GAT_GCN, and GCNNet receiving graphs as input for drugs.\n\n# Step-by-step running:\n\n## 0. Install Python libraries needed\n+ Install pytorch_geometric following instruction at https://github.com/rusty1s/pytorch_geometric\n+ Install rdkit: conda install -y -c conda-forge rdkit\n+ Or run the following commands to install both pytorch_geometric and rdkit:\n```\nconda create -n geometric python=3\nconda activate geometric\nconda install -y -c conda-forge rdkit\nconda install pytorch torchvision cudatoolkit -c pytorch\npip install torch-scatter==latest+cu101 -f https://pytorch-geometric.com/whl/torch-1.4.0.html\npip install torch-sparse==latest+cu101 -f https://pytorch-geometric.com/whl/torch-1.4.0.html\npip install torch-cluster==latest+cu101 -f https://pytorch-geometric.com/whl/torch-1.4.0.html\npip install torch-spline-conv==latest+cu101 -f https://pytorch-geometric.com/whl/torch-1.4.0.html\npip install torch-geometric\n\n```\n\n## 1. Create data in pytorch format\nRunning\n```sh\nconda activate geometric\npython create_data.py\n```\nThis returns kiba_train.csv, kiba_test.csv, davis_train.csv, and davis_test.csv, saved in data/ folder. These files are in turn input to create data in pytorch format,\nstored at data/processed/, consisting of  kiba_train.pt, kiba_test.pt, davis_train.pt, and davis_test.pt.\n\n## 2. Train a prediction model\nTo train a model using training data. The model is chosen if it gains the best MSE for testing data.  \nRunning \n\n```sh\nconda activate geometric\npython training.py 0 0 0\n```\n\nwhere the first argument is for the index of the datasets, 0/1 for 'davis' or 'kiba', respectively;\n the second argument is for the index of the models, 0/1/2/3 for GINConvNet, GATNet, GAT_GCN, or GCNNet, respectively;\n and the third argument is for the index of the cuda, 0/1 for 'cuda:0' or 'cuda:1', respectively. \n Note that your actual CUDA name may vary from these, so please change the following code accordingly:\n```sh\ncuda_name = \"cuda:0\"\nif len(sys.argv)\u003e3:\n    cuda_name = \"cuda:\" + str(int(sys.argv[3])) \n```\n\nThis returns the model and result files for the modelling achieving the best MSE for testing data throughout the training.\nFor example, it returns two files model_GATNet_davis.model and result_GATNet_davis.csv when running GATNet on Davis data.\n\n## 3. Train a prediction model with validation \n\nIn \"3. Train a prediction model\", a model is trained on training data and chosen when it gains the best MSE for testing data.\nThis follows how a model was chosen in https://github.com/hkmztrk/DeepDTA. The result by two ways of training is comparable though.\n\nIn this section, a model is trained on 80% of training data and chosen if it gains the best MSE for validation data, \nwhich is 20% of training data. Then the model is used to predict affinity for testing data.\n\nSame arguments as in \"3. Train a prediction model\" are used. E.g., running \n\n```sh\npython training_validation.py 0 0 0\n```\n\nThis returns the model achieving the best MSE for validation data throughout the training and performance results of the model on testing data.\nFor example, it returns two files model_GATNet_davis.model and result_GATNet_davis.csv when running GATNet on Davis data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinng%2FGraphDTA","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinng%2FGraphDTA","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinng%2FGraphDTA/lists"}