Skip to content

Commit

Permalink
moved from google code
Browse files Browse the repository at this point in the history
  • Loading branch information
willhelm-mueller committed Aug 23, 2016
0 parents commit 453d4a3
Show file tree
Hide file tree
Showing 43 changed files with 6,751 additions and 0 deletions.
110 changes: 110 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
= dxTuber =

dxTuber is the first cavity detection tool that takes into account protein and cavity dynamics
using solvent and protein residence probabilities derived from molecular dynamics (MD) simulations.
dxTuber supports all MD packages that VMD can process.

dxTuber results can be exported in PDB format where each cavity is an individually selectable object
of coherent voxels written as pseudo atoms, each holding the residence probability information,
in the form of mass-weighted solvent densities encoded as formal b-factors.

It calculates pore and tunnel profiles along principal axis,
furthermore cavity volumes and solvent densities can be directly extracted from the PDB files.
Based on this data cavity statistics can be obtained easily.

dxTuber is licensed under the GPLv2 (-> gpl2-2.0.txt)


= Dependencies =

- GTK+ / Bonobo
- Python 2.5 and 2.6 are tested (please mail me if you tested other versions successfull ;)
- Python-gtk
- Required for GUI version
- Python-argparse for python < 2.7 (The argparse lib should be available in python 2.7+)
http://code.google.com/p/argparse/
- Required for cmd version


= Installation =

1. extract and copy all files in a directory you like
(e.g. /opt/dxTuber)
2. create in your home folder a .dxTuber folder (~/.dxTuber)
3. copy dxTuber.conf into ~/.dxTuber/
4. modify dxTuber.conf <INSTALL_DIR> (full path of [1.] e.g. /opt/dxTuber)
5. create softlinks of
dxTuber_gtk.py | gui version
dxTuber_cmd.py | command line version
analyzeCavity.py | cmd version of analyze function
dx2pdb.py | OpenDX -> PDB convertor
pdb2dx.py | PDB -> OpenDX convertor // supports only previously processed dxTuber PDB files.
postgroupcavities.py | Pythonscript that devides cavities into subcavities
in /usr/bin (optional)
6. start dxTuber_gtk.py


= How to use dxTuber =

The program is started from the console by typing dxTuber_gtk.py.
While the dxTuber is driven by a graphical user interface, general status messages
and information on calculation progress are printed to the console. Protein and water
OpenDX VolMap files are imported via the OpenDX panel and specified in the Files tab.
Scan initiates a cavity search using the protein density threshold and scanning method
specified in the Settings tab.

Once a search is completed, the found set of cavity voxels appears as a new row in the
Files tab that can be selected for clustering into coherent cavities (Group DX),
filtering (Filter), analysis (Analyze) or export. The latter can be done via the Save to DX or
Save to PDB dialogue to save a selected set of cavity voxels in PDB or OpenDX format at any time.

Coherent cavities can be analyzed in respect to their cross-sectional area along one of
the principal axes. Therefore a principal axis and the cavity of interest need to be
specified which is done based on each cavity's unique denomination that is encoded
as atom name in the exported PDB file.


= Tested on =

Suse Linux 10.3 Enterprise / 11 (32 Bit)
openSuse 11.3 (32 Bit)
Ubuntu 10.4 LTS (32 Bit)


= Known Bugs / Issues =

- Compiz can disturb the dxTuber widget so that the main window title is not shown.
-> Disable Compiz

- dxTuber stops reading / calculating / saving / grouping ...
-> Keep the shell in focus

- To stop or shut down dxTuber_gtk hit 'ctrl +c' in the shell where dxTuber was startet from.
(I tried several hours to catch the term signal from gtk window with no success...)

- After reading / scanning / saving all radio buttons are resetted
-> Ensure your selections are correct until this bug is fixed.

- pyGTK gets outdated & can not be compiled / installed
-> use the command line version of dxTuber


= Acknowledgements =

### Research lab: Computational Structural Biology @ University of Bonn: ###

Christian Kandt Supervising, Bugtesting
Nadine Fischer Bugtesting
Thomas H. Schmidt Bugtesting, Typos ;)

### Extranal:
Mattia Sturlese Bugreport


= Developed by =

Martin Raunest
Contact
e-mail: [email protected] or [email protected]
xmpp: [email protected]

147 changes: 147 additions & 0 deletions analyseDialog.libglade
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
<?xml version="1.0"?>
<glade-interface>
<widget class="GtkWindow" id="analysePopup">
<child>
<widget class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="n_rows">5</property>
<property name="n_columns">2</property>
<child>
<widget class="GtkRadioButton" id="analyseDiameterMaxRadio">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Diameter</property>
<property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">analyseAreaRadio</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options">GTK_EXPAND</property>
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="analyseAreaRadio">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Area</property>
<property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<signal name="clicked" handler="ANALYSE_METHOD_0"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options">GTK_EXPAND</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<widget class="GtkLabel" id="axisLabel">
<property name="visible">True</property>
<property name="xalign">0.039999999105930328</property>
<property name="label" translatable="yes">Axis</property>
<property name="justify">GTK_JUSTIFY_RIGHT</property>
<property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property>
<property name="ellipsize">PANGO_ELLIPSIZE_START</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="groupLabel">
<property name="visible">True</property>
<property name="xalign">0.039999999105930328</property>
<property name="label" translatable="yes">Group</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="xAxisRadioButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">X-Axis</property>
<property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<signal name="clicked" handler="ANALYSE_X"/>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options">GTK_EXPAND</property>
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="yAxisRadioButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Y-Axis</property>
<property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">xAxisRadioButton</property>
<signal name="clicked" handler="ANALYSE_Y"/>
</widget>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options">GTK_EXPAND</property>
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="zAxisRadioButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Z-Axis</property>
<property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">xAxisRadioButton</property>
<signal name="clicked" handler="ANALYSE_Z"/>
</widget>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options">GTK_EXPAND</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="analyseButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="yes">Analyse</property>
<property name="response_id">0</property>
<signal name="clicked" handler="ANALYSE_TUBE_BUTTON_CLICKED"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_EXPAND</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>
131 changes: 131 additions & 0 deletions analyzeCavity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
#!/usr/bin/env python
# This file is part of the dxTuber package
# Copyright (C) 2010-2013 Martin Raunest
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
###
#
#
# v0.25
#
# -bug in cmd parameter check block (thx for the bug report: Mattia Sturlese)
#
#
# v0.12
# +FilterByMinDens
#
#
# v0.1
# +cmd implementation of analyze tube
#
#
#

import sys
import os
import re
import subprocess
from lib.analysetube import *
from lib.readpdb import *
from lib.filterdx import *




dxTuberConfFile = os.environ['HOME']+"/.dxTuber/dxTuber.conf"
conf = open (dxTuberConfFile,'r')
confLines = conf.readlines()
for line in confLines:
if re.match ('^#',line):
continue
if re.match('VERSION',line):
tmpArray = re.split('\s',line,1)
tmp = re.sub('\"','',tmpArray[1])
tmp = re.sub('\n','',tmp)
version = re.sub('^\s','',tmp)

####
# Deal with arguments
####

######################################################################
# If argparse is not installed global, get a static lib #
# and import it manually (static) #
# #
# http://packages.ubuntu.com/lucid/python-argparse #
# http://code.google.com/p/argparse/ #
# #
# maybe this helps for implementation ... #
# #
# sys.path.append('path_to_argparse_lib')
# from argparse import *
# #
######################################################################


import argparse

parser = argparse.ArgumentParser(description='This tool is part of the dxTuber package. It is able to analyze previously grouped cavities along principle axis x, y and z. Based on the choosen -c cavity its cross sectioneal area is plotted against the -a axis. Output will be stored in -o OUT. (1st coloumn = axis, 2nd column = area)',epilog='dxTuber v' + version)
parser.add_argument('-p','--pdb', default=False, help='dxTuber grouped outfile')
parser.add_argument('-a','--axis', default=False,choices=('x','y','z'),help='Select an axis')
parser.add_argument('-c','--cavity',default=False, help='Cavity ID (Name column in PDB file)')
parser.add_argument('-o','--out',default=False, help='Output (1st column axis 2nd column area)')
#parser.add_argument('--mindens', help='Minimum density')


args = parser.parse_args()
'''
args.pdb grouped outfile
args.axis axis
args.cavity cavity ID
args.out outfile
#args.mindens
'''

if not args.pdb or not args.axis or not args.cavity or not args.out:
sysRun = subprocess.Popen([sys.argv[0], '-h'])
sysRun.communicate()
sys.exit()


readPDB = ReadPDB (args.pdb)
readPDB.readPDB()
tuberObj = readPDB.getTubeDxObject()


if not tuberObj.getGroupes():
sysRun = subprocess.Popen([sys.argv[0], '-h'])
sysRun.communicate()
print "Please choose a previously grouped PDB file"
print "Ensure that your cavity id start with '0'"
sys.exit()



#if args.mindens:
# filterThis = FilterDx(dxObjectTube = tuberObj.getDxObject())
# filterThis.filterByDensity( tubeDxObj= tuberObj, densityThreshold=args.mindens)
# tuberObj.setDxObject(filterThis.getDxObject())

analyse = AnalyseTube (tuberObj.getVoxelGroupGrid(),int(args.cavity))
analyse.analyseTubeArea(args.axis )
analyse.writeStatistics(args.out)






Loading

0 comments on commit 453d4a3

Please sign in to comment.