In [1]:
from __future__ import print_function, division, unicode_literals
import oddt
from oddt.datasets import dude
print(oddt.__version__)
In [2]:
%%bash
mkdir -p ./DUD-E_targets/
wget -qO- http://dude.docking.org/targets/ampc/ampc.tar.gz | tar xz -C ./DUD-E_targets/
wget -qO- http://dude.docking.org/targets/cxcr4/cxcr4.tar.gz | tar xz -C ./DUD-E_targets/
wget -qO- http://dude.docking.org/targets/pur2/pur2.tar.gz | tar xz -C ./DUD-E_targets/
wget -qO- http://dude.docking.org/targets/pygm/pygm.tar.gz | tar xz -C ./DUD-E_targets/
wget -qO- http://dude.docking.org/targets/sahh/sahh.tar.gz | tar xz -C ./DUD-E_targets/
In [3]:
directory = './DUD-E_targets'
We will use the dude class.
In [4]:
dude_database = dude(home=directory)
Now we can get one target or iterate over all targets in our directory.
Let's choose one target.
In [5]:
target = dude_database['cxcr4']
target
has four properties: protein, ligand, actives and decoys:
protein - protein molecule
ligand - ligand molecule
actives - generator containing actives
decoys - generator containing decoys
In [6]:
target.ligand
Out[6]:
Let's see which target has the most actives and decoys.
In [7]:
for target in dude_database:
actives = list(target.actives)
decoys = list(target.decoys)
print('Target: ' + target.dude_id,
'Number of actives: ' + str(len(actives)),
'Number of decoys: ' + str(len(decoys)),
sep='\t\t')