-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample_pipeline.sh
60 lines (52 loc) · 1.95 KB
/
example_pipeline.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
python scripts/load_data.py \
--uniprot P05067 \
--affinity_type IC50 \
--affinity_cutoff 10000 \
--output_dir data/ \
--train_size 0.8 \
--binary_labels
# Train toxsmi model
python scripts/train_toxsmi.py \
--train data/train.csv \
--test data/valid.csv \
--smi data/mols.smi \
--language tokenizer \
--params config/toxsmi_conf.json \
--model models \
--name toxsmi_model
# Generate molecules with MoLeR
head -n 5 data/mols.smi > data/good_docks.smi
python scripts/moler_generate_toxsmi.py \
--smi_path data/good_docks.smi \
--param_path config/moler_conf.json \
--output_path data/moler_filtered \
--predictor_path models/toxsmi_model/weights/best_F1.pt
# Generate more diverse molecules with Regression Transformer
python scripts/prepare_rt_data.py \
--smi_path data/moler_filtered/generated.csv \
--output_path data/moler_filtered/generated_qed.csv && \
head -n 10 data/moler_filtered/generated_qed.csv > data/moler_filtered/generated_qed_selected.csv
python scripts/rt_generate.py \
--smi_path data/moler_filtered/generated_qed_selected.csv \
--param_path config/rt_conf.json \
--output_path data/rt
python scripts/inference_dataset.py -i data/rt/qed_rt_conf_generated_qed_selected/generated.csv
python scripts/test_toxsmi.py \
--model_path models/toxsmi_model \
--smi_filepath generated.smi \
--label_filepath dummy_data.csv \
--checkpoint_name F1
# Calculate properties
python scripts/mol_properties.py \
--smi_path models/toxsmi_model/results/dummy_data_F1_results_flat.csv \
--output_path mol_props.csv
# Run RXN
pip install rxn4chemistry
head -n 2 data/rt/qed_rt_conf_generated_qed_selected/generated.csv > selected_for_retro.csv
python scripts/retrosynthesis.py selected_for_retro.csv \
--api_key $API_KEY \
--project_id $PROJ_ID \
--steps 4 \
--timeout 100 \
--name my_retrosynthesis