by Xinyu Xu, Xichen Pan, Haotian Xue, Peiyu Chen
python3.6+
torch
numpy
tensorboardX
# used in test
pysmiles==1.0.1
h5py
Install requirements first by runing:
pip install -r requirements.txt
Test the model as follows:
cd \path\to\test.py
python .\test.py --csv_file path\to\csvfile --gpu_id 0
Train the model following steps:
- change pretrain_dir to your own one then put pretrained protein embedding model in it.
- put your csvfile into
data
fold then run
python .\preprocessing\decompose.py
python .\preprocessing\make_graph_dict.py
python .\preprocessing\saveh5.py
- train the model by runing:
python train.py --save_dir neg3 --gpu_id 0 --neg_rate 3
- Doing curriculum learning by running:
python train.py --save_dir neg15 --gpu_id 0 --neg_rate 15 --curriculum_weight ./checkpoints/neg3/model.pt
│ find_threshold.py
│ logits_ex.py
│ README.md
│ requirements.txt
│ result.csv # result file
│ test.py
│ train.py
│
├─cache
│ model_weight.bin
│ targetfeature.h5
│
├─ckp
│ submit.h5
│ submit.pt
│
├─data
│ Dataset.py
│ datautils.py
│ drug.pkl
│ element.json
│ hcount.json
│ pairs.pkl
│ target.pkl
│ test_neg_pairs.pkl
│ test_pos_pairs.pkl
│
├─models
│ Aggregation.py
│ attn.py
│ convlist.py
│ dt_net.py
│ GraphModels.py
│ labelsmoothing.py
│
├─preprocessing
│ decompose.py
│ make_graph_dict.py
│ saveh5.py
│
├─src
│ │ alignment.pyx
│ │ alphabets.py
│ │ fasta.py
│ │ metrics.pyx
│ │ parse_utils.py
│ │ pdb.py
│ │ pfam.py
│ │ scop.py
│ │ transmembrane.py
│ │ utils.py
│ │ __init__.py
│ │
│ └─models
│ comparison.py
│ embedding.py
│ multitask.py
│ sequence.py
│ __init__.py
│
└─utils
general.py
parser.py
protein_embedding.py