DOCK 3.7 2015/04/15 abl1 Tutorial: Difference between revisions

From DISI
Jump to navigation Jump to search
No edit summary
Line 67: Line 67:


== run be_blasti.py==
== run be_blasti.py==
creat the following cshell script 0001.be_balsti_py.csh.
#!/bin/csh
# this script calls be_blasti.py which creates a receptor and ligand file from a (list of) pdbcode(s).
# msms is a molecular surface generation program needed for be_blasti.py to run
# which is put in your path
set path = ( /nfs/home/tbalius/zzz.programs/msms $path )
# you will need to have msms on you system. 
set list = "2HYY" # or use `cat filename` to list your pdb codes here from a text file like pdblist_rat, to loop over each variable (pdb code) later
#set list = `cat $1`
#set list = `cat /nfs/work/users/tbalius/VDR/Enrichment/pdblist_rat `
# CHANGE THIS, according to where the magic is going to happen
#set mountdir = "/mnt/nfs/work/users/tbalius/VDR/"
set mountdir = `pwd`
# loop over pdbnames e.g. 1DB1 or list
foreach pdbname ( $list )
echo " ${pdbname} "
# for each pdb makes a directory with its name
set workdir = ${mountdir}/${pdbname}
## so you don't blow away stuff; continue means STOP here and continue with next pdb from list
if ( -s $workdir ) then
    echo "$workdir exits"
    continue
endif
  mkdir -p ${workdir}
  cd ${workdir}
# the atom type definition is needed for msms which is sym-linked into the cwd
  ln -s /nfs/home/tbalius/zzz.programs/msms/atmtypenumbers .
# carbs are disregarded as ligands! if it is: carbohydrate instead of nocarbohydrate
# renumber renumbers the residue number
  python $DOCKBASE/proteins/pdb_breaker/be_blasti.py --pdbcode $pdbname nocarbohydrate original_numbers | tee -a pdbinfo_using_biopython.log
# error checking looks for receptor and ligand file which should be produced by be_blasti.py
  if !(-s rec.pdb) then
      echo "rec.pdb is not found"
  endif
  mv rec.pdb temp.pdb
  grep -v TER temp.pdb | grep -v END  > rec.pdb
  rm temp.pdb
# be_blasti.py produces peptide which may be used as a ligand if no other ligand is produced
  if (-s lig.pdb) then
      sed -e "s/HETATM/ATOM  /g" lig.pdb > xtal-lig.pdb
  else if (-s pep.pdb) then ## if no ligand and peptide
      sed -e "s/HETATM/ATOM  /g" pep.pdb > xtal-lig.pdb
  else
      echo "Warning: No ligand or peptid."
  endif
end # system
running 0001.be_balsti_py.csh will run a script that come with dock call be_blasti. 
And it will do the following
# download the pdb file from the web,
# break the file into rec and ligand componates
Note that you will need to have msms on you system.
[[get msms]]


== run blastermaster.py ==
== run blastermaster.py ==


== run enrichment calucaltions ==
== run enrichment calucaltions ==

Revision as of 21:21, 15 April 2015

This tutoral use the 3.7.2 beta version of dock release on XXX.

This is for a Linux environment and the scripts assume that you are running on SGE queueing system.

set up directories and get databases

Create directory called "RotationProject"

create a python file called "autodude_db_download.py"

# this gets the database from the autodude webpage

import sys, os
import urllib

system = 'abl1'
url = 'http://autodude.docking.org/dude_e_db2/'

print "url = " + url

#page=requests.get(url)

webfile = urllib.urlopen(url)
page    = webfile.read()
webfile.close()

splitpage=page.split('\n')

for line in splitpage:
   if system in line: 
      file = line.replace('"',' ').split()[2]
      print url+file
      urllib.urlretrieve(url+file,file)

     # exit()

This python script will download the dockable db2 databases from the autodude webpage.

python /mnt/nfs/home/rstein/RotationProject/autodude_db_download.py 

make a subdirectory called databases:

mkdir databases

go inside.

cd databases

make directories for ligands and decoys and move the corresponding files into those directories

mkdir decoys 
mv decoys*db2.gz decoys
mkdir ligands 
mv ligands*db2.gz ligands

download the ligand and decoy isomeric smiles file:

wget http://autodude.docking.org/abl1/decoys_final.ism
mv decoys_final.ism decoys.ism

note that the scripts expect the name to be decoys.ism, so we changed the name.

wget http://autodude.docking.org/abl1/actives_final.ism
mv actives_final.ism ligands.ism

run be_blasti.py

creat the following cshell script 0001.be_balsti_py.csh.

#!/bin/csh 

# this script calls be_blasti.py which creates a receptor and ligand file from a (list of) pdbcode(s).

# msms is a molecular surface generation program needed for be_blasti.py to run
# which is put in your path
set path = ( /nfs/home/tbalius/zzz.programs/msms $path )
# you will need to have msms on you system.   

set list = "2HYY" # or use `cat filename` to list your pdb codes here from a text file like pdblist_rat, to loop over each variable (pdb code) later
#set list = `cat $1`
#set list = `cat /nfs/work/users/tbalius/VDR/Enrichment/pdblist_rat `

# CHANGE THIS, according to where the magic is going to happen
#set mountdir = "/mnt/nfs/work/users/tbalius/VDR/"
set mountdir = `pwd` 

# loop over pdbnames e.g. 1DB1 or list
foreach pdbname ( $list )

echo " ${pdbname} "

# for each pdb makes a directory with its name
set workdir = ${mountdir}/${pdbname}

## so you don't blow away stuff; continue means STOP here and continue with next pdb from list
if ( -s $workdir ) then
   echo "$workdir exits"
   continue
endif

  mkdir -p ${workdir}
  cd ${workdir}

# the atom type definition is needed for msms which is sym-linked into the cwd
  ln -s /nfs/home/tbalius/zzz.programs/msms/atmtypenumbers .
# carbs are disregarded as ligands! if it is: carbohydrate instead of nocarbohydrate
# renumber renumbers the residue number
  python $DOCKBASE/proteins/pdb_breaker/be_blasti.py --pdbcode $pdbname nocarbohydrate original_numbers | tee -a pdbinfo_using_biopython.log

# error checking looks for receptor and ligand file which should be produced by be_blasti.py
  if !(-s rec.pdb) then
      echo "rec.pdb is not found"
  endif

  mv rec.pdb temp.pdb
  grep -v TER temp.pdb | grep -v END  > rec.pdb

  rm temp.pdb

# be_blasti.py produces peptide which may be used as a ligand if no other ligand is produced
  if (-s lig.pdb) then
     sed -e "s/HETATM/ATOM  /g" lig.pdb > xtal-lig.pdb
  else if (-s pep.pdb) then ## if no ligand and peptide
     sed -e "s/HETATM/ATOM  /g" pep.pdb > xtal-lig.pdb
  else
     echo "Warning: No ligand or peptid."
  endif

end # system


running 0001.be_balsti_py.csh will run a script that come with dock call be_blasti. And it will do the following

  1. download the pdb file from the web,
  2. break the file into rec and ligand componates

Note that you will need to have msms on you system. get msms

run blastermaster.py

run enrichment calucaltions