--- theseus-1.1.5.orig/debian/patches/200-make.inc.dpatch +++ theseus-1.1.5/debian/patches/200-make.inc.dpatch @@ -0,0 +1,27 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 200-makefile.dpatch by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Customize make.inc for Ubuntu building + +@DPATCH@ +diff -urNad theseus-1.1.3~/make.inc theseus-1.1.3/make.inc +--- theseus-1.1.3~/make.inc 2007-09-27 17:07:18.000000000 +0200 ++++ theseus-1.1.3/make.inc 2007-09-28 00:34:56.000000000 +0200 +@@ -146,3 +146,16 @@ + # CFLAGS = $(WARN) + # CC = cc + ++ ++# Ubuntu Linux x86 & amd64 ++SYSLIBS = -lpthread -lg2c -lm -lc ++LIBS = -Llib -ldistfit -lmsa -ldssplite -ldltmath -lDLTutils ++BLASLIB = -latlas -L/usr/lib/atlas -llapack -lblas ++BLASLIBDIR = ++LAPACKLIB = ++LAPACKLIBDIR = ++INSTALLDIR = ++OPT = -g -O3 -ffast-math -fstrict-aliasing -funroll-loops -fomit-frame-pointer -ftree-vectorize ++WARN = -Wall -pedantic -std=c99 ++CFLAGS += $(WARN) ++CC = gcc --- theseus-1.1.5.orig/debian/patches/100-theseus.1.dpatch +++ theseus-1.1.5/debian/patches/100-theseus.1.dpatch @@ -0,0 +1,408 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 100-theseus.1.dpatch by +## +## DP: Fix error in the .TH line. The manpage section must go here, +## DP: not the program version. + +@DPATCH@ +diff -urNad theseus-1.1.5~/theseus.1 theseus-1.1.5/theseus.1 +--- theseus-1.1.5~/theseus.1 2007-12-02 16:08:26.000000000 +0100 ++++ theseus-1.1.5/theseus.1 2007-12-02 16:18:20.000000000 +0100 +@@ -1,31 +1,31 @@ + .\" use 'man groff_man' to see the man page format macros + .\" ---------------------------------------------------------------------------- +-.TH THESEUS 1.1.5 "2 October 2007" "Brandeis University" "Likelihood Rocks" ++.TH THESEUS 1 "2 October 2007" "Brandeis University" "Likelihood Rocks" + .\" ---------------------------------------------------------------------------- + .SH NAME + .\" ---- + .\" + .B theseus +-v. 1.1.5 \- Maximum likelihood, multiple simultaneous superpositions ++\- Maximum likelihood, multiple simultaneous superpositions + with statistical analysis + .\" ---------------------------------------------------------------------------- + .SH SYNOPSIS + .\" -------- + .\" + .B theseus +-[-aAbBcCdDeEfFgGhHiIjklLmMnNoOpPqQrRsStTuvVwWxXyYZ] ++[\-aAbBcCdDeEfFgGhHiIjklLmMnNoOpPqQrRsStTuvVwWxXyYZ] + .I pdbfile1 [pdbfile2 ...] + .P + and + .P + .B theseus_align +-[-aAbBcCdDeEfFgGhHiIjklLmMnNoOpPqQrRsStTuvVwWxXyYZ] -f ++[\-aAbBcCdDeEfFgGhHiIjklLmMnNoOpPqQrRsStTuvVwWxXyYZ] \-f + .I pdbfile1 [pdbfile2 ...] + .P + Default usage is equivalent to: + .P + .B theseus +--a0 -e2 -g1 -i200 -k-1 -p1e-7 -r theseus -v -P0 ++\-a0 \-e2 \-g1 \-i200 \-k\-1 \-p1e\-7 \-r theseus \-v \-P0 + .I your.pdb + .\" ---------------------------------------------------------------------------- + .SH DESCRIPTION +@@ -70,13 +70,13 @@ + different species or multiple mutated structures of hen egg white lysozyme. + This mode requires the user to supply a sequence alignment file of the + structures being superpositioned (see option +-.B "-A" ++.B "\-A" + and "FILE FORMATS" below). + Additionally, it may be necessary to supply a mapfile that tells + .B theseus + which PDB structure files correspond to which sequences in the alignment (see + option +-.B "-M" ++.B "\-M" + and "FILE FORMATS" below). When superpositioning based on a seqeunce + alignment, + .B theseus +@@ -95,7 +95,7 @@ + Example 1: + .IP + .B theseus +--A cytc.aln -M cytc.filemap d1cih__.pdb d1csu__.pdb d1kyow_.pdb ++\-A cytc.aln \-M cytc.filemap d1cih__.pdb d1csu__.pdb d1kyow_.pdb + .IP + In the above example, + d1cih__.pdb, d1csu__.pdb, and d1kyow_.pdb +@@ -104,7 +104,7 @@ + Example 2: + .IP + .B theseus_align +--f d1cih__.pdb d1csu__.pdb d1kyow_.pdb ++\-f d1cih__.pdb d1csu__.pdb d1kyow_.pdb + .IP + In this example, the + .B theseus_align +@@ -129,7 +129,7 @@ + + .TP + .PD +-.BI "-a [" selection ] ++.BI "\-a [" selection ] + Atoms to include in the superposition. + This option takes two types of arguments, either (1) a number specifying a + preselected set of atom types, or (2) an explict PDB-style, colon-delimited list +@@ -154,7 +154,7 @@ + .PD + .IP + Note, only the +-.B "-a0" ++.B "\-a0" + option is available when superpositioning structures with + different sequences. + .IP +@@ -164,13 +164,13 @@ + Multiple atom types must be delimited by a colon. + For example, + .IP +-.B "-a' N : CA : C : O ' ++.B "\-a' N : CA : C : O '" + .IP + would specify the atom types in the peptide backbone. + + + .TP +-.B "-c" ++.B "\-c" + Use ML atomic covariance weighting (fit correlations, much slower) + .IP + Unless you have many different structures with few residues, fitting the +@@ -178,7 +178,7 @@ + parameters and a paucity of data. + + .TP +-.BI "-e [" n ] ++.BI "\-e [" n ] + Embedding algorithm for initializing the average structure + .PD 0 + .RS 8 +@@ -190,11 +190,11 @@ + .PD + + .TP +-.BI "-f" ++.BI "\-f" + Only read the first model of a multi-model PDB file + + .TP +-.BI "-g [" n ] ++.BI "\-g [" n ] + Hierarchical model for variances + .PD 0 + .RS 8 +@@ -206,33 +206,33 @@ + .PD + + .TP +-.B "-h" ++.B "\-h" + Help/usage + + .TP +-.BI "-i [" nnn ] ++.BI "\-i [" nnn ] + Maximum iterations, {200} + + .TP +-.BI "-k [" n ] +-constant minimum variance {-1} ++.BI "\-k [" n ] ++constant minimum variance {\-1} + {if set to negative value, the minimum variance is determined empirically} + + .TP +-.BI "-p [" precision ] +-Requested relative precision for convergence, {1e-7} ++.BI "\-p [" precision ] ++Requested relative precision for convergence, {1e\-7} + + .TP +-.BI "-r [" "root name" ] ++.BI "\-r [" "root name" ] + Root name to be used in naming the output files, {theseus} + + .TP +-.BI "-s [" n-n:... ] +-Residue selection (e.g. -s15-45:50-55), {all} ++.BI "\-s [" n\-n:... ] ++Residue selection (e.g. \-s15\-45:50\-55), {all} + + .TP +-.BI "-S [" n-n:... ] +-Residues to exclude (e.g. -S15-45:50-55) {none} ++.BI "\-S [" n\-n:... ] ++Residues to exclude (e.g. \-S15\-45:50\-55) {none} + .IP + The previous two options have the same format. Residue (or alignment column) + ranges are indicated by beginning and end separated by a dash. +@@ -240,31 +240,31 @@ + Chains may also be selected by giving the chain ID immediately preceding the + residue range. + For example, +-.B -sA1-20:A40-71 ++.B \-sA1-20:A40-71 + will only include residues 1 through 20 + and 40 through 70 in chain A. Chains cannot be specified when superpositioning + structures with different sequences. + + .TP +-.B "-v" ++.B "\-v" + use ML variance weighting (no correlations) {default} + + .PD + .SS Input/output options: + + .TP +-.BI "-A [" "sequence alignment file" ] ++.BI "\-A [" "sequence alignment file" ] + Sequence alignment file to use as a guide (CLUSTAL or A2M format) + .IP + For use when superpositioning structures with different sequences. + See "FILE FORMATS" below. + + .TP +-.B "-E" ++.B "\-E" + Print expert options + + .TP +-.B "-F" ++.B "\-F" + Print FASTA files of the sequences in PDB files and quit + .IP + A useful option when superpositioning structures with different sequences. +@@ -273,39 +273,39 @@ + alignment file used as + .B theseus + input with the +-.B "-A" ++.B "\-A" + option. + + .TP +-.B "-h" ++.B "\-h" + Help/usage + + .TP +-.B "-I" ++.B "\-I" + Just calculate statistics for input file; don't superposition + + .TP +-.BI "-M [" mapfile ] ++.BI "\-M [" mapfile ] + File that maps sequences in the alignment file to PDB files + .IP + A simple two-column formatted file; see "FILE FORMATS" below. Used with mode 2. + + .TP +-.B "-n" ++.B "\-n" + Don't write transformed pdb file + + .TP +-.BI "-o [" "reference structure" ] ++.BI "\-o [" "reference structure" ] + Reference file to superposition on, all rotations are relative to the first + model in this file + .IP +-For example, 'theseus -o cytc1.pdb cytc1.pdb cytc2.pdb cytc3.pdb' will ++For example, 'theseus \-o cytc1.pdb cytc1.pdb cytc2.pdb cytc3.pdb' will + superposition the structures and rotate the entire final superposition so that + the structure from cytc1.pdb is in the same orientation as the structure in the + original cytc1.pdb PDB file. + + .TP +-.B "-O" ++.B "\-O" + Olve's segID file + .IP + Useful output when superpositioning structures with different sequences (mode 2). +@@ -321,26 +321,26 @@ + the very atoms that were included in the ML superposition calculation. + That is, it will only contain alpha carbons or phosphorous atoms, and it will + only contain atoms from the columns selected with the +-.B "-s" ++.B "\-s" + or + .B +-"-S" ++"\-S" + options. + Requested by Olve Peersen of Colorado State University. + + .TP +-.B "-V" ++.B "\-V" + Version + + .PD + .SS Principal components analysis: + + .TP +-.B "-C" ++.B "\-C" + Use covariance matrix for PCA (correlation matrix is default) + + .TP +-.BI "-P [" nnn ] ++.BI "\-P [" nnn ] + Number of principal components to calculate {0} + + .IP +@@ -358,23 +358,23 @@ + + .P + .B theseus +--l -r new2sdf ++\-l \-r new2sdf + .I 2sdf.pdb + + .P + .B theseus +--s15-45 -P3 ++\-s15-45 \-P3 + .I 2sdf.pdb + + .P + .B theseus +--A ++\-A + .I cytc.aln +--M ++\-M + .I cytc.mapfile +--o ++\-o + .I cytc1.pdb +--s1-40 ++\-s1\-40 + .I cytc1.pdb cytc2.pdb cytc3.pdb cytc4.pdb + .\" ---------------------------------------------------------------------------- + .SH ENVIRONMENT +@@ -408,7 +408,7 @@ + equal), a sequence alignment file must be included for + .B theseus + to use as a guide (specified by the +-.B "-A" ++.B "\-A" + option). + .B Theseus + accepts both CLUSTAL and A2M (FASTA) formatted multiple sequence alignment +@@ -422,14 +422,14 @@ + PDB file. An easy way to ensure that your sequences exactly match the PDB + files is to generate the sequences using + .B theseus' +-.B "-F" ++.B "\-F" + option, which writes out a FASTA formatted sequence file of the chain(s) + in the PDB files. The files output with this option can then be aligned with + a multiple sequence alignment program such as CLUSTAL or MUSCLE, and the + resulting output alignment file used as + .B theseus + input with the +-.B "-A" ++.B "\-A" + option. + + .PD +@@ -439,7 +439,7 @@ + PDB file. That is, there can be extra sequences in the alignment that are + not used for guiding the superposition. + +-.SS PDB -> Sequence mapfile ++.SS PDB \-> Sequence mapfile + + If the names of the PDB files and the names of the corresponding sequences + in the alignemnt are identical, the mapfile may be omitted. Otherwise, +@@ -447,7 +447,7 @@ + needs to know which sequences in the alignment file correspond to which + PDB structure files. This information is included in a mapfile with a very + simple format (specified with the +-.B "-M" ++.B "\-M" + option). There are only two columns separated by whitespace: the first column + lists the names of the PDB structure files, while the second column lists the + corresponding sequence names exactly as given in the multiple sequence +@@ -526,10 +526,10 @@ + model is a matrix Gaussian distribution of the structures with equal + variances and no correlations. For the ML fits, the assumed models can + either be (1) unequal variances and no correlations, as calculated with the +-.B "-v" ++.B "\-v" + option [default] or (2) unequal variances and correlations, as calculated + with the +-.B "-c" ++.B "\-c" + option. This statistic is for the superposition only, and does + not include the fit of the covariance matrix eigenvalues to an inverse gamma + distribution. See 'Omnibus chi^2' below. +@@ -641,7 +641,7 @@ + .PD + .P + When Principal Components are calculated (with the +-.B "-P" ++.B "\-P" + option), the following + files are also produced: + +diff -urNad theseus-1.1.5~/theseus_align.1 theseus-1.1.5/theseus_align.1 +--- theseus-1.1.5~/theseus_align.1 2007-09-25 22:56:26.000000000 +0200 ++++ theseus-1.1.5/theseus_align.1 2007-12-02 16:19:23.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). --- theseus-1.1.5.orig/debian/patches/99-theseus_align.sh.dpatch +++ theseus-1.1.5/debian/patches/99-theseus_align.sh.dpatch @@ -0,0 +1,26 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 99-theseus_align.sh.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Define clustalw to be the active alignment program. +## DP: Fix the directory where theseus is found -> /usr/bin. + +@DPATCH@ +--- theseus_align.orig 2007-09-27 15:12:04.000000000 +0200 ++++ foo/theseus_align 2007-09-27 15:13:14.000000000 +0200 +@@ -41,13 +41,13 @@ + # The following six constant strings should be modified to whatever is + # convenient and applicable. + +-theseus="/usr/local/bin/theseus"; # where to find the THESEUS binary executable ++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/local/bin/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/ --- theseus-1.1.5.orig/debian/patches/00list +++ theseus-1.1.5/debian/patches/00list @@ -0,0 +1,3 @@ +100-theseus.1.dpatch +200-make.inc.dpatch +99-theseus_align.sh.dpatch --- theseus-1.1.5.orig/debian/copyright +++ theseus-1.1.5/debian/copyright @@ -0,0 +1,80 @@ +This package was debianized by Morten Kjeldgaard on +Wed, 06 Jun 2007 14:56:39 +0100. + +It was downloaded from http://www.theseus3d.org/src/theseus.tar.gz + +Upstream Author: + + Douglas Theobald + Department of Chemistry and Biochemistry + UCB 215 + University of Colorado at Boulder + Boulder, CO 80309-0215 + +Other authors: + + Gish, Kans, Ostell and Schuler (from lbidltmath/ncbi_math.h) + Takuji Nishimura and Makoto Matsumoto (from libdltmath/myrandom.c) + +Copyright: + + 2003-2007 Douglas L. Theobald + 2002 Takuji Nishimura and Makoto Matsumoto + 1991 Gish, Kans, Ostell and Schuler + +License: + + THESEUS 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 package 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 package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. + + +The files libdltmath/ncbi_math.h and libdltmath/ncbi_math.c are in the +Public Domain, and distributed with the notice below. However, with this +software, these two files are distributed under the same GPL license as the +remaining files. + + + PUBLIC DOMAIN NOTICE + National Center for Biotechnology Information + + This software/database is a "United States Government Work" under the + terms of the United States Copyright Act. It was written as part of + the author's official duties as a United States Government employee and + thus cannot be copyrighted. This software/database is freely available + to the public for use. The National Library of Medicine and the U.S. + Government have not placed any restriction on its use or reproduction. + + Although all reasonable efforts have been taken to ensure the accuracy + and reliability of the software and data, the NLM and the U.S. + Government do not and cannot warrant the performance or results that + may be obtained by using this software or data. The NLM and the U.S. + Government disclaim all warranties, express or implied, including + warranties of performance, merchantability or fitness for any particular + purpose. + + Please cite the author in any work or product based on this material. + + +The Debian packaging is (C) 2007, Morten Kjeldgaard and +is licensed under the GPL version 2 or later, see +`/usr/share/common-licenses/GPL-2'. + + +The files in examples/ are in the public domain, and can be copied and +distributed with no restriction. It is scientific data from the Protein +Data Bank (http://www.pdb.org) and the database ASTRAL +(http://astral.berkeley.edu). --- theseus-1.1.5.orig/debian/theseus.install +++ theseus-1.1.5/debian/theseus.install @@ -0,0 +1,2 @@ +theseus usr/bin +theseus_align /usr/bin --- theseus-1.1.5.orig/debian/control +++ theseus-1.1.5/debian/control @@ -0,0 +1,25 @@ +Source: theseus +Section: science +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Morten Kjeldgaard +Homepage: http://www.theseus3d.org +Build-Depends: debhelper (>= 5), dpatch, atlas3-base-dev +Standards-Version: 3.7.2.2 + +Package: theseus +Architecture: any +Depends: ${shlibs:Depends} +Suggests: muscle +Description: superimpose macromolecules using maximum likelihood + Theseus is a program that simultaneously superimposes multiple + macromolecular structures. Theseus finds the optimal solution to the + superposition problem using the method of maximum likelihood. By + down-weighting variable regions of the superposition and by correcting for + correlations among atoms, the ML superposition method produces very + accurate structural alignments. + . + When macromolecules with different residue sequences are superimposed, + other programs and algorithms discard residues that are aligned with + gaps. Theseus, however, uses a novel superimposition algorithm that + includes all of the data. --- theseus-1.1.5.orig/debian/compat +++ theseus-1.1.5/debian/compat @@ -0,0 +1 @@ +5 --- theseus-1.1.5.orig/debian/getexamples +++ theseus-1.1.5/debian/getexamples @@ -0,0 +1,47 @@ +#!/bin/sh +# Get example input files for theseus +# Copyright (C) 2007 Morten Kjeldgaard +# +# This script 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.1 of the License, or (at your option) any later +# version. +# +# This script 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 script; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301 USA +set -e + +pdbs="1s40" + +astrals="d1cih__ d1cih__2 d1crj__ d1csu__ d1csx__ d1kyow_ d1lfma_ d1m60a_ d1u74d_ d1yeb__ d2pcbb_" + +# function to fetch entries from the pdb +pdb_fetch () { + for f in $* ; do + wget -nv http://www.pdb.org/pdb/files/$f.pdb.gz + gzip -dc $f.pdb.gz > $f.pdb + done +} + +# function to fetch entries from astral +astral_fetch() { + for f in $* ; do + wget -nv http://astral.berkeley.edu/pdbstyle.cgi?id=${f}.pdb&output=text + done +} + +savedir=$PWD +cd /tmp + +pdb_fetch $pdbs +astral_fetch $astrals + +cd $savedir --- theseus-1.1.5.orig/debian/rules +++ theseus-1.1.5/debian/rules @@ -0,0 +1,56 @@ +#!/usr/bin/make -f +# -*- mode: makefile; mode: font-lock -*- + +include /usr/share/dpatch/dpatch.make + +# extract the upstream version from debian/changelog +uvers := $(shell sed 's/.*(\(.*\)-.*).*/\1/;q' < debian/changelog) + +get-orig-source: + wget -q http://www.theseus3d.org/src/theseus.tar.gz \ + -O ../theseus_$(uvers).orig.tar.gz + +build: patch-stamp build-stamp + +build-stamp: + dh_testdir + + # compiler flags are hardwired in make.inc + $(MAKE) + + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + + $(MAKE) clean + rm -f theseus distfit + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + +binary: build install + dh_testdir + dh_testroot + dh_install + dh_installdocs + dh_installchangelogs + dh_installman theseus.1 theseus_align.1 + dh_installexamples examples/* debian/getexamples + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +.PHONY: build clean binary-indep binary-arch binary install get-orig-source + +#### --- theseus-1.1.5.orig/debian/changelog +++ theseus-1.1.5/debian/changelog @@ -0,0 +1,18 @@ +theseus (1.1.5-0ubuntu1) hardy; urgency=low + + * Initial release (LP: #173506) + * The upstream tarball has been versioned as 1.1.5 (not versioned upstream) + The get-orig-source target in debian/rules can be used for this purpose + once the changelog has been edited to contain the right version + * Patch to theseus.1 and theseus_align.1 + - fix incorrect .TH line in theseus.1 + - fix multiple instances of hyphen (-) to minus (\-) + * Patch on thesus_align.sh. The script is patched to find + programs in /usr/bin. The script makes use of the + multiple sequence alignment program muscle, which is available + from universe. + * Patch make.inc to provide correct compiler switches. + * A script (getexamples) is provided to show the user how (s)he can + download the data in examples/ + + -- Morten Kjeldgaard Sun, 02 Dec 2007 15:53:15 +0100