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