-
Notifications
You must be signed in to change notification settings - Fork 4
/
run_prediction.sh
executable file
·53 lines (46 loc) · 1.15 KB
/
run_prediction.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
#!/bin/bash
clear
PROT="$1"
LIG="$2"
DKR="$3"
if [ -z "$4" ]; then
SMILES="$3"
DKR="$4"
fi
if [ -z "$PROT" ]; then
PROT="OR51E2"
fi
if [[ "$LIG" = "next" ]]; then
LIGARG="next=1"
elif [ -z "$LIG" ]; then
LIGARG="lig=propionic_acid"
else
LIGF="sdf/$LIG.sdf"
LIGARG="lig=$LIG"
LIGW=$( echo "$LIG" | tr '_' ' ' )
if ! test -f "$LIGF"; then
INJSON=$( cat data/odorant.json | grep "$LIGW" )
if [ -z "$INJSON" ]; then
if [ -z "$SMILES" ]; then
echo "Odorant not found; please specify SMILES string for third argument."
exit
else
php -f "data/gensdf.php" "$LIG" "$SMILES"
fi
fi
fi
fi
DKRARG=""
if [[ "$DKR" = "pd" ]]; then
DKRARG="docker=$DKR"
elif [[ "$DKR" == "vina" ]]; then
DKRARG="docker=$DKR"
fi
FIRST4=${PROT:0:4}
if [[ "$FIRST4" = "OR51" ]]; then
php -f predict/method_directmdl.php "prot=$PROT" "$LIGARG" "$DKRARG"
elif [[ "$FIRST4" = "OR52" ]]; then
php -f predict/method_directmdl.php "prot=$PROT" "$LIGARG" "$DKRARG"
else
php -f predict/method_directmdl.php "prot=$PROT" "$LIGARG" "$DKRARG"
fi