blob: 98437a399774502ad879a5625f99a9d38bc7cb24 (
plain)
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
61
62
63
64
65
66
67
|
pwd=$(pwd)
if [ -z "$1" ]
then
echo "CSV path not provided! 😠"
exit
fi
input="$1"
ligands=()
while IFS= read -r line
do
mails=$(echo $line | tr "," "\n")
i=0
code=""
for a in $mails; do
i=$((i+1))
if ((i == 1))
then
code=$(echo "$a")
fi
if ((i == 2))
then
#ligands+=("./ligands/$a.pdbqt")
ligands+=("$a")
fi
done
done < "$input"
proteins=()
#for file in ./configs/*
#do
# proteins+=("$(basename $file .txt)")
#done
proteins+=("6VXX")
#ligands=()
#for file in ./ligands/*
#do
# ligands+=("$(basename $file .pdbqt)")
#done
for protein in ${proteins[@]}; do
for ligand in ${ligands[@]}; do
###cd $pwd/Reports/$protein/$ligand/
###docker run --rm -v ${PWD}:/results -w /results -u $(id -u ${USER}):$(id -g ${USER}) pharmai/plip:latest -f $ligand.pdb -qpxy
echo "Saving Protein-Ligand Complex $ligand"
python3.7 ./scripts/get-best.py -p ./targets/$protein.pdbqt -l ./Reports/$protein/$ligand/$ligand.pdbqt
fname=$(echo ${protein}_${ligand}.pdb)
mv best.pdb ./Reports/$protein/$ligand/$fname
cd $pwd/Reports/$protein/$ligand/
echo "Processing in PLIP"
docker run --rm -v ${PWD}:/results -w /results -u $(id -u ${USER}):$(id -g ${USER}) pharmai/plip:latest -f $fname -qpxy
cd $pwd
echo "Generating Images"
#python3.7 ./scripts/quick-ligand-protein.py -p ./targets/$protein.pdbqt -l ./Reports/$protein/$ligand/$ligand.pdbqt
#mv closeup-front.png closeup-back.png output-back.png output-front.png ./Reports/$protein/$ligand/
echo "Generating PDF Report"
python3.7 ./scripts/makeReport.py --input ./Reports/$protein/$ligand/ > ./Reports/$protein/$ligand/report.md
cd $pwd/Reports/$protein/$ligand/
pandoc -V geometry:margin=1in report.md --pdf-engine=xelatex -o $ligand.pdf
cd $pwd
done
done
|