Repository navigation
Expand file tree
/
Copy pathdataset_rxn.sh
More file actions
executable file
·55 lines (46 loc) · 1.59 KB
/
Copy pathdataset_rxn.sh
File metadata and controls
executable file
·55 lines (46 loc) · 1.59 KB
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
#!/bin/bash
#SBATCH --job-name=condCL_dataset_rxn
#SBATCH --mail-type=END,FAIL
#SBATCH --mail-user=matthew.ball3@astrazeneca.com
#SBATCH --nodes=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=64G
#SBATCH --time=1-23:59:59
#SBATCH --output=condCL_dataset_rxn-%j.log
#SBATCH --error=condCL_dataset_rxn-%j.log
#SBATCH -p medium
# Load conda environment
#source ~/init_conda.sh
#conda activate condition_learning
# Define paths
SCRIPT_PATH="src/condition_learning/data/scripts/rxns"
CONFIG_PATH="config/data_curation/reactions"
# Function to run Python scripts
run_python_script() {
local script=$1
shift
python "$SCRIPT_PATH/$script" "$@"
}
# 1. Extract reactions from reaction database
# run_python_script "extract_rxns.py" \
# --config "$CONFIG_PATH/extract_rxns.yaml"
# 2. Clean the reaction conditions
for reaction_type in "amide_coupling" "buchwald_hartwig"; do
run_python_script "clean_rxn_conditions.py" \
--config "$CONFIG_PATH/clean_rxn_conditions/${reaction_type}.yaml"
done
# 3. Filter the reactions:
for reaction_type in "amide_coupling" "buchwald_hartwig"; do
run_python_script "filter_rxns.py" \
--config "$CONFIG_PATH/filter_rxns/${reaction_type}.yaml"
done
# 4. Add SMARTS-RX information:
for reaction_type in "amide_coupling" "buchwald_hartwig"; do
python src/condition_learning/smartsrx.py \
--config "$CONFIG_PATH/smartsrx/${reaction_type}.yaml"
done
# 5. De-duplicate reactions:
for reaction_type in "amide_coupling" "buchwald_hartwig"; do
run_python_script "deduplicate.py" \
--config "$CONFIG_PATH/deduplicate/${reaction_type}.yaml"
done