[med-svn] r2703 - in trunk/packages/theseus/trunk/debian: . patches

mok0-guest at alioth.debian.org mok0-guest at alioth.debian.org
Mon Nov 17 23:07:09 UTC 2008


Author: mok0-guest
Date: 2008-11-17 23:07:09 +0000 (Mon, 17 Nov 2008)
New Revision: 2703

Added:
   trunk/packages/theseus/trunk/debian/theseus_align
   trunk/packages/theseus/trunk/debian/theseus_align.1
   trunk/packages/theseus/trunk/debian/watch
Removed:
   trunk/packages/theseus/trunk/debian/patches/02-thesus_align.1.dpatch
Modified:
   trunk/packages/theseus/trunk/debian/changelog
   trunk/packages/theseus/trunk/debian/patches/00list
   trunk/packages/theseus/trunk/debian/rules
Log:
Upstream has carried out various changes at my request, so
we now have a working watch file, and a couple of patches are
no longer needed. The get-orig-target fetches the auxilliary
theseus_align script into debian/. Version is now 1.3.9.


Modified: trunk/packages/theseus/trunk/debian/changelog
===================================================================
--- trunk/packages/theseus/trunk/debian/changelog	2008-11-17 13:53:58 UTC (rev 2702)
+++ trunk/packages/theseus/trunk/debian/changelog	2008-11-17 23:07:09 UTC (rev 2703)
@@ -1,4 +1,4 @@
-theseus (1.3.4-1) unstable; urgency=low
+theseus (1.3.9-1) unstable; urgency=low
 
   * New upstream release, first upload to Debian.
 

Modified: trunk/packages/theseus/trunk/debian/patches/00list
===================================================================
--- trunk/packages/theseus/trunk/debian/patches/00list	2008-11-17 13:53:58 UTC (rev 2702)
+++ trunk/packages/theseus/trunk/debian/patches/00list	2008-11-17 23:07:09 UTC (rev 2703)
@@ -1,5 +1,2 @@
 00-makefile.dpatch
-01-theseus.1.dpatch
-02-thesus_align.1.dpatch
 200-make.inc.dpatch
-99-theseus_align.sh.dpatch

Deleted: trunk/packages/theseus/trunk/debian/patches/02-thesus_align.1.dpatch
===================================================================
--- trunk/packages/theseus/trunk/debian/patches/02-thesus_align.1.dpatch	2008-11-17 13:53:58 UTC (rev 2702)
+++ trunk/packages/theseus/trunk/debian/patches/02-thesus_align.1.dpatch	2008-11-17 23:07:09 UTC (rev 2703)
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02-thesus_align.1.dpatch by Morten Kjeldgaard <mok0 at ubuntu.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix hyphen issue in theseus_align manpage.
-
- at DPATCH@
-diff -urNad theseus~/theseus_align.1 theseus/theseus_align.1
---- theseus~/theseus_align.1	2007-09-25 22:56:26.000000000 +0200
-+++ theseus/theseus_align.1	2008-11-17 13:28:57.000000000 +0100
-@@ -20,7 +20,7 @@
- .SH SYNOPSIS
- .B theseus_align
- .RI [ "theseus options" ] 
---f \fIpdbfile1.pdb\fR \fIpdbfile2.pdb\fR ...
-+\-f \fIpdbfile1.pdb\fR \fIpdbfile2.pdb\fR ...
- .SH OPTIONS
- The options given to the script will be passed on to \fBtheseus\fR. For a
- complete description, see the man page for \fBtheseus\fR (1).

Modified: trunk/packages/theseus/trunk/debian/rules
===================================================================
--- trunk/packages/theseus/trunk/debian/rules	2008-11-17 13:53:58 UTC (rev 2702)
+++ trunk/packages/theseus/trunk/debian/rules	2008-11-17 23:07:09 UTC (rev 2703)
@@ -6,10 +6,11 @@
 # extract the upstream version from debian/changelog
 uvers := $(shell sed 's/.*(\(.*\)-.*).*/\1/;q' < debian/changelog)
 
+# Get the auxilliary script distributed separately
 get-orig-source:
-	wget -q http://www.theseus3d.org/src/theseus.tar.gz \
-	     -O ../theseus_$(uvers).orig.tar.gz
-
+	dh_testdir
+	wget -q http://www.theseus3d.org/src/theseus_align \
+	     -O - | sed 's!/usr/local/bin!/usr/bin!' > debian/theseus_align
 build: patch-stamp build-stamp
 
 build-stamp: 
@@ -45,7 +46,7 @@
 	dh_install
 	dh_installdocs debian/citation.bib
 	dh_installchangelogs 
-	dh_installman theseus.1 theseus_align.1
+	dh_installman theseus.1 debian/theseus_align.1
 	dh_installexamples examples/* debian/getexamples
 	dh_strip
 	dh_compress
@@ -58,6 +59,6 @@
 
 binary: binary-indep binary-arch
 
-.PHONY: build clean binary-indep binary-arch binary install get-orig-source
+.PHONY: build clean cleanfirst binary-indep binary-arch binary install get-orig-source
 
 ####

Added: trunk/packages/theseus/trunk/debian/theseus_align
===================================================================
--- trunk/packages/theseus/trunk/debian/theseus_align	                        (rev 0)
+++ trunk/packages/theseus/trunk/debian/theseus_align	2008-11-17 23:07:09 UTC (rev 2703)
@@ -0,0 +1,204 @@
+#!/bin/bash
+# THESEUS: Maximum likelihood superpositioning of multiple 
+#          macromolecular structures
+# 
+# -/_|:|_|_\- 
+# Douglas L. Theobald
+# Department of Biochemistry
+# Brandeis University
+# Waltham, MA  02454
+#
+# dtheobald at brandeis.edu
+# dtheobald at gmail.com
+#
+# theseus_align
+#
+# Usage: theseus_align [theseus_options] -f pdbfile1.pdb pdbfile2.pdb ...
+#
+# 'theseus_align' allows for a quick-and-dirty way to ML superposition proteins
+# with different sequences. It should work very well when the protein sequences
+# are relatively similar, although the ML method will still give much better
+# results than least-squares when the sequences are moderately divergent.
+# Technically, this procedure gives a structure-based superposition of a
+# sequence-based alignment. It _does not_ perform a structure-based alignment.
+#
+# First, the script uses THESEUS to create FASTA formatted sequence files
+# corresponding to the exact protein sequences found in the pdb files that you
+# supply.
+#
+# Second, these sequences are aligned using the multiple sequence alignment
+# program of your choice -- currently set up for MUSCLE and easily modified for
+# CLUSTALW, T_COFFEE, KALIGN, DIALIGN2, or MAFFT. Any multiple sequence
+# alignment program can be used, as long as it can generate clustal-formatted
+# files. However, I highly recommend Bob Edgar's MUSCLE program for both its
+# speed and accuracy. It is easy to install using either precompiled binaries or
+# by compiling from scratch:
+# http://www.drive5.com/muscle/
+#
+# Third, THESEUS performs a superposition of the structures using the sequence
+# alignment as a guide.
+#
+# The following six constant strings should be modified to whatever is
+# convenient and applicable.
+
+theseus="/usr/bin/theseus"; # where to find the THESEUS binary executable
+fastafile="theseus.fasta";
+filemapfile="theseus.filemap";
+alignmentfile="theseus.aln";
+
+# for MUSCLE -- http://www.drive5.com/muscle/
+alignprog="/usr/bin/muscle";
+align_cmd="${alignprog} -maxiters 32 -in ${fastafile} -out ${alignmentfile} -clwstrict";
+
+# for CLUSTALW -- ftp://ftp-igbmc.u-strasbg.fr/pub/ClustalW/
+#alignprog="/usr/bin/clustlaw";
+#align_cmd="${alignprog} -infile=${fastafile} -outfile=${alignmentfile}";
+
+# for MAFFT -- http://www.biophys.kyoto-u.ac.jp/%7Ekatoh/programs/align/mafft/
+#alignprog="/usr/bin/mafft";
+#align_cmd="${alignprog} --maxiterate 1000 --localpair --clustalout ${fastafile} > ${alignmentfile}";
+
+# for T_COFFEE -- http://igs-server.cnrs-mrs.fr/%7Ecnotred/Projects_home_page/t_coffee_home_page.html
+#alignprog="/usr/bin/t_coffee";
+#align_cmd="${alignprog} ${fastafile} -outfile=${alignmentfile}";
+
+# for KALIGN -- http://msa.cgb.ki.se/
+#alignprog="/usr/bin/kalign"
+#align_cmd="${alignprog} -i ${fastafile} -f aln | sed 's/Kalign/CLUSTALW/' > ${alignmentfile}";
+
+# for DIALIGN2 -- http://bibiserv.techfak.uni-bielefeld.de/dialign/
+#alignprog="/usr/bin/dialign2"
+#align_cmd="${alignprog} -cw ${fastafile}; sed 's/\/\///' ${fastafile%.*}.cw | sed 's/DIALIGN/CLUSTALW/'";
+
+
+################################################################################
+################################################################################
+# NOTHING BELOW HERE SHOULD BE CHANGED
+################################################################################
+
+if [ ! -f ${alignprog} ] || [ ! -x ${alignprog} ] || [ ! -s ${alignprog} ]
+then
+    printf "\nERROR: Problem with multiple sequence aligment executable, ${alignprog}\n";
+    ${alignprog};
+    exit 1;
+elif [ ! -f ${theseus} ] || [ ! -x ${theseus} ] || [ ! -s ${theseus} ]
+then
+    printf "\nERROR: Problem with THESEUS executable, ${alignprog}\n";
+    ${theseus};
+    exit 1;
+fi
+
+usage="Usage: ${0} [theseus_options] -f pdbfile1.pdb pdbfile2.pdb ...";
+
+declare -a opts=( $@ ); # save the command line arguments
+(( argc = $# )); # save the number of command line arguments
+
+# shift up until we get past '-f', which signifies that the rest are files
+(( optn = 0 ));
+while [ "${1}" != "-f" ] && [ ! -z "${1}" ]
+do
+    shift;
+    (( optn++ ));
+done
+
+# Ensure that there is something on the command line
+if [[ -z "$@" ]] # double brackets don't do word splitting
+then
+    printf "\n${usage}\n\n";
+    exit 1;
+else
+    shift;
+fi
+
+for (( i = optn; i < argc; ++i ))
+do
+    unset opts[${i}]; # nix the pdb files from the options array
+done
+
+pdbs="$@";
+echo ${pdbs}
+
+# Make sure there are pdb files on the command line
+if [[ -z "${pdbs}" ]] # double brackets don't do word splitting
+then
+    printf "\n${usage}\n\n";
+    exit 1;
+else
+    shift;
+fi
+
+# Check each pdb file to see if it exists, if it is readable, and if it is non-empty
+for pdb in ${pdbs}
+do
+    if [ ! -f ${pdb} ] || [ ! -r ${pdb} ] || [ ! -s ${pdb} ]
+    then
+        printf "\nProblem with file: ${pdb}\n"
+        printf "\n${usage}\n\n";
+        exit 1;
+    fi
+done
+
+theseus_cmd="${theseus} ${opts[@]} -f -M ${filemapfile} -A ${alignmentfile} ${pdbs}";
+
+# Use THESEUS to make fasta sequence files corresponding to each pdb
+${theseus} -f -F ${pdbs};
+
+if [ ! $? ]
+then
+    printf "\nERROR: THESEUS did not successfully create all FASTA sequence files.\n";
+	printf "\n${usage}\n\n";
+	exit 1;
+fi
+
+for pdb in ${pdbs}
+do
+    fasta="${pdb}.fst";
+    if [ ! -f ${fasta} ] || [ ! -r ${fasta} ] || [ ! -s ${fasta} ]
+    then
+        printf "\nProblem with FASTA sequence file ${fastafile} for ${pdb}\n"
+        printf "\n${usage}\n\n";
+        exit 1;
+    fi
+done
+
+if [ -f ${fastafile} ]
+then
+    rm ${fastafile};
+fi
+
+# Concatenate all fasta files into one large multiple sequence fasta file
+for pdb in ${pdbs}
+do
+    cat ${pdb}.fst >> ${fastafile};
+done
+
+#ls -1 ${pdbs} | awk '{print $1" "$1}' > ${filemapfile};
+
+if [ -f ${filemapfile} ]
+then
+    rm ${filemapfile};
+fi
+
+# Make the mapfile for THESEUS to use (which sequence corresponds to which file)
+for pdb in ${pdbs}
+do
+    echo "${pdb} ${pdb}" >> ${filemapfile};
+done
+
+# Align the sequences
+printf "\n\n${align_cmd}\n";
+${align_cmd};
+
+if [ ! $? ]
+then
+    printf "\nERROR: Sequence alignment failed.\n";
+	printf "\n${usage}\n\n";
+	exit 1;
+fi
+
+# Superimpose with THESEUS based on the sequence alignment generated above
+printf "\n\n${theseus_cmd}\n";
+${theseus_cmd};
+
+exit 0;
+

Added: trunk/packages/theseus/trunk/debian/theseus_align.1
===================================================================
--- trunk/packages/theseus/trunk/debian/theseus_align.1	                        (rev 0)
+++ trunk/packages/theseus/trunk/debian/theseus_align.1	2008-11-17 23:07:09 UTC (rev 2703)
@@ -0,0 +1,62 @@
+.\"                                     Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH THESEUS_ALIGN 1 "November, 2008"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh       disable hyphenation
+.\" .hy       enable hyphenation
+.\" .ad l     left justify
+.\" .ad b     justify to both left and right margins
+.\" .nf       disable filling
+.\" .fi       enable filling
+.\" .br       insert line break
+.\" .sp <n>   insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+theseus_align \- quick-and-dirty way to superimpose proteins
+.SH SYNOPSIS
+.B theseus_align
+.RI [ "theseus options" ] 
+\-f \fIpdbfile1.pdb\fR \fIpdbfile2.pdb\fR ...
+.SH OPTIONS
+The options given to the script will be passed on to \fBtheseus\fR. For a
+complete description, see the man page for \fBtheseus\fR (1).
+.SH DESCRIPTION
+This manual page briefly documents briefly the script \fBtheseus_align\fR,
+designed for a quick-and-dirty way to ML superposition proteins with
+different sequences. It should work very well when the protein sequences
+are relatively similar, although the ML method will still give much better
+results than least-squares when the sequences are moderately divergent.
+Technically, this procedure gives a structure-based superposition of a
+sequence-based alignment. It \fIdoes not\fR perform a structure-based
+alignment.
+.P
+First, the script uses \fBtheseus\fR to create FASTA formatted sequence
+files corresponding to the exact protein sequences found in the pdb files
+that you supply.
+.P
+Second, these sequences are aligned using the multiple sequence alignment
+program of your choice. The script is easily modified for CLUSTALW,
+T_COFFEE, KALIGN, DIALIGN2, or MAFFT. Any multiple sequence alignment
+program can be used, as long as it can generate clustal-formatted
+files. However, I highly recommend Bob Edgar's MUSCLE program for both its
+speed and accuracy. It is easy to install using either precompiled binaries
+or by compiling from scratch: http://www.drive5.com/muscle/
+.P
+Third, \fBtheseus\fR performs a superposition of the structures using the
+sequence alignment as a guide.
+.P
+The installed version of \fBtheseus_align\fR uses \fBmuscle\fR (1) for
+doing the multiple sequence alignment. If you wish to use one of the other
+programs mentioned above, you'll have to copy the script to your own
+directory and edit it.
+.SH SEE ALSO
+\fBtheseus\fR (1), \fBclustalw\fR (1) 
+.SH AUTHOR
+\fBtheseus_align\fR was written by Douglas L. Theobald, Department of
+Biochemistry, Brandeis University.
+.\"-----
+

Added: trunk/packages/theseus/trunk/debian/watch
===================================================================
--- trunk/packages/theseus/trunk/debian/watch	                        (rev 0)
+++ trunk/packages/theseus/trunk/debian/watch	2008-11-17 23:07:09 UTC (rev 2703)
@@ -0,0 +1,3 @@
+version=3
+http://www.theseus3d.org/index.html /src/theseus_(.*).tar.gz
+




More information about the debian-med-commit mailing list