The code for paper "CSGNN: Contrastive Self-Supervised Graph Neural Network for Molecular Interaction Prediction"
The repository is organized as follows:
data/contains the datasets used in the paper;parms_setting.pycontains hyperparameters adopted by CSGNN;data_preprocess.pyis the preprocess of data before training;layer.pycontains mix-hop GNN layers and contrastive GNN layers;instantiation.pyinstantiates the CSGNN;train.pycontains the training and testing code on datasets;utils.pycontains preprocessing functions of the data (e.g., normalize...);main.pycontains entry to CSGNN (e.g., normalize...);
- numpy == 1.18.5
- scipy == 1.5.2
- sklearn == 0.23.2
- torch == 1.5.0
- torch-geometric == 1.6.1
- networkx == 2.4
Here we provide several example of using CSGNN: To run CSGNN with GCN decoder on DTI network using "uniform" as initial features and output the result to test.txt, execute the following command:
python main.py --aggregator GCN --feature_type uniform --in_file data/DTI.edgelist --out_file test.txtTo run CSGNN with GIN decoder on DDI network using "position" as initial features and output the result to test.txt, execute the following command:
python main.py --aggregator GIN --feature_type position --in_file data/DDI.edgelist --out_file test.txt