annotate PLIDflow/launch_confmaker_multiple.sh @ 6:795e11fac81b draft default tip

Included new tools for standardization
author bitlab
date Wed, 22 Apr 2020 06:12:00 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
1 receptor_pdbqt=$1
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
2 receptor_pdbqt_modified=$2
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
3 receptor_pdbqt_modified2=$3
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
4 ligand_pdbqt=$4
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
5 size_x=$5
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
6 out=$6
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
7 log=$7
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
8 receptor_name=$8
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
9 ligand_name=$9
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
10 receptor_file=${10}
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
11 receptorTypes=${11}
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
12 toolsDirectory=${12}
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
13
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
14 MYRAND=$(( ( RANDOM % 10000000 ) + 1 ))
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
15 RANDDIR=${MYRAND}
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
16
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
17
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
18 # ENABLE PROTEIN CODE
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
19 proteinCode=$(echo ${13} | awk '{print toupper($0)}')
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
20
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
21 # ENABLE PROTEIN CODE
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
22 #PROTEINDB=${YOUR_PATH_TO_FOLDER_DB}
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
23 PROTEINDB=/home/galaxy-bitlab/proteindb
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
24
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
25
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
26
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
27 mkdir $RANDDIR
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
28
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
29
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
30 cp -r ${toolsDirectory}/scripts/* $RANDDIR
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
31
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
32 cp $receptorTypes $RANDDIR
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
33 NOMBRERECEPTOR=$(basename $receptorTypes)
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
34 mv $RANDDIR/$NOMBRERECEPTOR $RANDDIR/receptor_atm_types.txt
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
35
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
36 MYPWD=$PWD
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
37
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
38
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
39 cd $RANDDIR
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
40
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
41 source ADT_VENV/bin/activate
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
42
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
43 (Rscript pdbcenter_npts_finder.R $receptor_pdbqt_modified2 $MYPWD/$RANDDIR) 2>&1
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
44
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
45 (Rscript gpffilemaker.R $receptor_pdbqt_modified2 $MYPWD/$RANDDIR) 2>&1
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
46
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
47 (Rscript glgfilemaker.R $receptor_pdbqt_modified2 $MYPWD/$RANDDIR) 2>&1
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
48
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
49 echo "[INFO] Working path: $PWD"
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
50
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
51
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
52 proteinPath=$PROTEINDB/$proteinCode
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
53 echo "[INFO] - Extracting protein code [$proteinPath]"
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
54 isRandomID="FALSE"
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
55 if [ "$proteinCode" == "X__OC__PROTEINCODE__CC__" ]
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
56 then
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
57 isRandomID="TRUE"
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
58 echo "No protein code supplied"
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
59 fi
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
60
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
61 filloutsNum=0
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
62 filloutsAreGood=1
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
63 if [ -d "$proteinPath" ] && [ $isRandomID == "FALSE" ]; then
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
64
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
65 for x in {10..600..10}
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
66 do
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
67 filloutsNum=$(ls -lh $PROTEINDB/$proteinCode/FILL_${x}out* 2> /dev/null | wc -l)
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
68 if [ $filloutsNum -eq 0 ]; then
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
69 filloutsAreGood=0
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
70 echo "[INFO] Did not find fillout $x"
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
71 fi
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
72 done
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
73 else
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
74 filloutsAreGood=0
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
75 fi
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
76
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
77 if [ -d "$proteinPath" ] && [ $filloutsAreGood -eq 1 ] && [ $isRandomID == "FALSE" ]; then
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
78 echo "[INFO] Found protein in database. Reusing envelopes."
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
79 cp $proteinPath/FILL* .
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
80 else
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
81 echo "[INFO] Did not find protein in database. Computing envelopes."
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
82 pathLigand=$(which AutoLigand.py)
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
83 (Rscript envelopesmaker.R $receptor_pdbqt_modified2 $MYPWD/$RANDDIR $pathLigand) 2>&1
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
84 mkdir $proteinPath
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
85 cp FILL* $proteinPath
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
86
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
87 fi
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
88
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
89
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
90 (Rscript clusterfilemaker.R $MYPWD/$RANDDIR) 2>&1
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
91
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
92 (Rscript clusterfinder_Auto.R $MYPWD/$RANDDIR) 2>&1
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
93
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
94 (Rscript cluster_to_vina_cluster.R $receptor_pdbqt_modified2 $ligand_pdbqt $out $log $size_x $MYPWD/$RANDDIR $receptor_name $ligand_name) 2>&1
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
95
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
96
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
97 rm -rf ./CONDA_RDKIT_ENV
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
98 rm -rf ./ADT_VENV
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
99
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
100 cd $MYPWD
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
101
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
102
795e11fac81b Included new tools for standardization
bitlab
parents:
diff changeset
103 deactivate