ProzacR

docking 2020

May 14th, 2020
413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.62 KB | None | 0 0
  1. #grab files:
  2. awk -F "," '{print $1}' CID_60961_compound.csv > ids.csv
  3. while read -r line; do curl https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/CID/${line}/record/SDF/\?record_type=3d\&response_type=save\&response_basename=Conformer3D_CID_${line} -o ${line}.sdf; done < ids.csv
  4.  
  5. #dock them:
  6. #!/bin/bash
  7.  
  8. for file in *.sdf; do babel $file ${file%sdf}pdbqt; done
  9.  
  10. mkdir O43148_rez/
  11. for file in *.pdbqt; do ~/bin/qvina-master/bin/qvina-w --receptor /home/vytautas/methyl_transferases_docking/human/O43148/5e8j_A.pdbqt --ligand $file --center_x -2 --center_y -6 --center_z -3 --size_x 20 --size_y 20 --size_z 20 --num_modes 1 --out O43148_rez/${file%.pdbqt}_out.pdbqt; done
  12. cd O43148_rez/
  13. for file in *_out.pdbqt; do echo -n ${file%_out.pdbqt} && echo -n ", " && grep -m 1 "REMARK VINA RESULT" $file | awk '{print $4}'; done > rez.csv
  14. cd ..
  15.  
  16. mkdir nsp10+nsp14_rez/
  17. for file in *.pdbqt; do ~/bin/qvina-master/bin/qvina-w --receptor /home/vytautas/methyl_transferases_docking/virus/nsp10+nsp14/5c8s.1_nsp10+nsp14_fix.pdbqt --ligand $file --center_x -10 --center_y -38 --center_z -8 --size_x 20 --size_y 20 --size_z 20 --num_modes 1 --out nsp10+nsp14_rez/${file%.pdbqt}_out.pdbqt; done
  18. cd nsp10+nsp14_rez/
  19. for file in *_out.pdbqt; do echo -n ${file%_out.pdbqt} && echo -n ", " && grep -m 1 "REMARK VINA RESULT" $file | awk '{print $4}'; done > rez.csv
  20. cd ..
  21.  
  22. mkdir Q8N1G2_rez/
  23. for file in *.pdbqt; do ~/bin/qvina-master/bin/qvina-w --receptor /home/vytautas/methyl_transferases_docking/human/Q8N1G2/4n49_fix.pdbqt --ligand $file --center_x 8 --center_y 20 --center_z 17 --size_x 20 --size_y 20 --size_z 20 --num_modes 1 --out Q8N1G2_rez/${file%.pdbqt}_out.pdbqt; done
  24. cd Q8N1G2_rez/
  25. for file in *_out.pdbqt; do echo -n ${file%_out.pdbqt} && echo -n ", " && grep -m 1 "REMARK VINA RESULT" $file | awk '{print $4}'; done > rez.csv
  26. cd ..
  27.  
  28. mkdir nsp16+nsp10_rez/
  29. for file in *.pdbqt; do ~/bin/qvina-master/bin/qvina-w --receptor /home/vytautas/methyl_transferases_docking/virus/nsp16+nsp10/6w4h_fix.pdbqt --ligand $file --center_x 84 --center_y 15 --center_z 27 --size_x 20 --size_y 20 --size_z 20 --num_modes 1 --out nsp16+nsp10_rez/${file%.pdbqt}_out.pdbqt; done
  30. cd nsp16+nsp10_rez/
  31. for file in *_out.pdbqt; do echo -n ${file%_out.pdbqt} && echo -n ", " && grep -m 1 "REMARK VINA RESULT" $file | awk '{print $4}'; done > rez.csv
  32. cd ..
  33.  
  34. join -t "," ??????_rez/rez.csv > human_rez.csv
  35. join -t "," nsp1?+nsp1?_rez/rez.csv > virus_rez.csv
  36. join -t "," human_rez.csv virus_rez.csv > docking_rez.csv
  37.  
  38. #po 100 failu:
  39. #!/bin/bash
  40.  
  41. for i in {101..129}
  42. do
  43. mkdir $i
  44. for file in $(ls -p *.sdf | grep -v / | tail -100)
  45. do
  46.         mv $file $i
  47. done
  48. done
Add Comment
Please, Sign In to add comment