[med-svn] [glam2] 01/01: Commit changes once prepared to create glam2 from meme2 source. The effort was somehow stalled but should be kept here at least

Andreas Tille tille at debian.org
Wed Sep 27 14:06:30 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch glam_from_meme
in repository glam2.

commit dbd88aa58b785468cb3edee2b259b4007cbc20f2
Author: Andreas Tille <tille at debian.org>
Date:   Wed Sep 27 16:05:49 2017 +0200

    Commit changes once prepared to create glam2 from meme2 source.  The effort was somehow stalled but should be kept here at least
---
 debian/NEWS.Debian                            |  28 ---
 debian/README.source                          |   3 +-
 debian/changelog                              |   8 +
 debian/copyright                              |  78 ++++++--
 debian/debian-compile/Makefile                | 105 ++++++++++
 debian/debian-compile/config.h                |   6 +
 debian/debian-compile/dir.h                   |   4 +
 debian/debian-compile/glam2_convolve.c        |  89 +++++++++
 debian/debian-docs/index.html                 | 106 ++++++++++
 debian/debian-examples/crp0.s                 |  54 +++++
 debian/debian-examples/dna.alph               |   7 +
 debian/debian-examples/glam_tfbs.1comp        |   8 +
 debian/debian-examples/lipocalin.s            |  20 ++
 debian/debian-examples/recode3.20comp         | 107 ++++++++++
 debian/debian-examples/robinson.alph          |  25 +++
 debian/docs                                   |   6 +-
 debian/examples                               |   2 +-
 debian/glam2-purge.1.xml                      | 168 ----------------
 debian/glam2.1.xml                            | 272 --------------------------
 debian/glam2.doc-base.method                  |   2 +-
 debian/{ => glam2_manpages}/glam2-purge.1     |   0
 debian/{ => glam2_manpages}/glam2.1           |   0
 debian/{glam2.1 => glam2_manpages/glam2fft.1} |   6 +-
 debian/{ => glam2_manpages}/glam2format.1     |   0
 debian/glam2_manpages/glam2html.1             |  33 ++++
 debian/{ => glam2_manpages}/glam2mask.1       |   0
 debian/glam2_manpages/glam2psfm.1             |  34 ++++
 debian/{ => glam2_manpages}/glam2scan.1       |   0
 debian/glam2_manpages/glam2scan2html.1        |  33 ++++
 debian/glam2format.1.xml                      | 140 -------------
 debian/glam2mask.1.xml                        | 131 -------------
 debian/glam2scan.1.xml                        | 182 -----------------
 debian/install                                |  12 +-
 debian/manpages                               |   6 +-
 debian/patches/fix_fftw3_build.patch          |  15 ++
 debian/patches/hardening.patch                |  56 ------
 debian/patches/series                         |   2 +-
 debian/rules                                  |  41 ++--
 debian/watch                                  |   6 +-
 39 files changed, 759 insertions(+), 1036 deletions(-)

diff --git a/debian/NEWS.Debian b/debian/NEWS.Debian
deleted file mode 100644
index 7f0486f..0000000
--- a/debian/NEWS.Debian
+++ /dev/null
@@ -1,28 +0,0 @@
-glam2 (1064-3) unstable; urgency=low
-
-  The source of glam2 is now maintained in the MEME software suite at
-
-     http://meme.nbcr.net/meme/
-
-  Since MEME is non-free we are keeping this old source here and once
-  the packaging of MEME is finished (packaging started at
-
-     svn://anonscm.debian.org/debian-med/trunk/packages/meme/trunk/
-
-  by Debian Med team) an alternative might be provided.
-
-  There is an alternative branch
-
-     svn://anonscm.debian.org/debian-med/trunk/packages/glam2/branch/meme
-
-  in SVN which strips the glam2 source from MEME which might or might
-  not be considered free.  At least MEME authors agreed on the idea that
-  glam2 license should be valid also at the new place on the Debian Med
-  packaging mailing list in February 2013.  However, it has turned out
-  that some additional tools of the MEME suite are needed to successfully
-  build glam2 and this was not yet discussed.  If you are interested feel
-  free to test the glam2 packaging in branch/meme and in case the test
-  turns out to be successful please ask the authors for permission for
-  relicensing.
-
- -- Andreas Tille <tille at debian.org>  Fri, 15 Nov 2013 15:07:59 +0100
diff --git a/debian/README.source b/debian/README.source
index 6763ce2..765712d 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -4,8 +4,7 @@ project (see http://acb.qfab.org/acb/glam2/).  Unfortunately the MEME
 license is not DFSG free but the authors have given permission to
 extract the successor code of glam2 under the old license of this
 code.  This is realised via uscan by excluding all the files mentioned
-in Files-Excluded inside debian/copyright inside the branch
-glam_from_meme in packaging Git.
+in Files-Excluded inside debian/copyright.
 
 However, the following files are taken needed from main MEME and do not
 belong to the formerly separate glam2 source:
diff --git a/debian/changelog b/debian/changelog
index 20671de..f886505 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+glam2 (1:4.9.1+dfsg-1) UNRELEASED; urgency=low
+
+  * New upstream version integrated into MEME
+
+ -- Andreas Tille <tille at debian.org>  Wed, 27 Sep 2017 15:48:37 +0200
+
+... snip ...
+
 glam2 (1064-4) UNRELEASED; urgency=medium
 
   [ James McCoy ]
diff --git a/debian/copyright b/debian/copyright
index 245cff5..d523b75 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,16 +1,70 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Contact: Martin C Frith <martin at cbrc.jp>
+Upstream-Name: glam2
+Upstream-Contact: Martin Frith <martin at cbrc.jp>,
                   Timothy L Bailey <t.bailey at imb.uq.edu.au>
-Source: http://bioinformatics.org.au/glam2/archive/glam2-1064.zip
-        Glam2 is now included into the MEME software suite and not
-        maintained separately at this place any more.  Since MEME is non-free
-        we are keeping this old version of glam2 in Debian.  Se also
-          https://lists.debian.org/debian-med/2013/11/msg00034.html
+Source: ftp://ftp.sdsc.edu/pub/sdsc/biology/meme/
+Comment: Glam2 is maintained upstream now as part of the MEME software
+ package.  While MEME is non-free upstream has agreed in the mailing
+ list thread starting here
+  http://lists.alioth.debian.org/pipermail/debian-med-packaging/2013-January/018334.html
+ to keep the old license that was used by the separate glam distribution.
+ To accomplish this the full MEME source is downloaded here but stripped
+ from all non-free parts.
+Files-Excluded:
+    config/
+    doc/examples/compute_prior_dist_example_output_files
+    doc/examples/sample_opal_scripts
+    doc/examples/[A-Zc-fh-rz-z]*
+    doc/examples/sample-[a-fh-z]*
+    doc/examples/s[b-z]*
+    doc/[A-FH-Za-fh-z]*
+    doc/g[a-km-z]*
+    etc/[A-FH-Za-fh-z]*
+    etc/g[a-km-z]*
+    scripts/[A-FH-Za-fh-z]*
+    scripts/g[a-km-z]*
+    src/[A-FH-Zdfjklnopqtv-z]*
+    src/a[a-km-qs-z]*
+    src/al[a-oq-z]*
+    src/alph[b-z]*
+    src/b[a-hj-z]*
+    src/bin[b-z]*
+    src/c[a-df-z]*
+    src/ce[a-pr-z]*
+    src/e[a-oq-z]*
+    src/g[a-km-z]*
+    src/h[b-z]*
+    src/hash[^_]*
+    src/hash_[b-z]*
+    src/hash_*.c
+    src/i[a-np-z]*
+    src/m[b-np-z]*
+    src/ma[abd-su-z]*
+    src/mat[a-qs-z]*
+    src/moti[a-eg-z]*
+    src/motif-in-[a-eg-z]*
+    src/motif-in-s[a-oq-z]*
+    src/motif-in.c
+    src/motif[_a-z]*
+    src/r[a-df-z]*
+    src/re[a-cefh-z]*
+    src/red[a-z]*
+    src/reg[a-df-z]*
+    src/s[a-su-z]*
+    src/st[a-qs-z]*
+    src/str[a-hj-z]*
+    src/string-[ac-km-z]*
+    src/string-list.c
+    src/u[a-ru-z]*
+    src/ut[a-hj-z]*
+    tests/
+    website/
+    [A-Za-c]*
 
 Files: *
 Copyright: 2007 Martin C Frith <martin at cbrc.jp>
            2007 Timothy L Bailey <t.bailey at imb.uq.edu.au>
-License: PD_glam
+License: PD
  GLAM2 was developed by Martin C Frith, working at the Computational Biology
  Research Center in Tokyo, and Timothy L Bailey, working at the Institute for
  Molecular Bioscience in Brisbane. The source code and documentation are hereby
@@ -20,8 +74,8 @@ License: PD_glam
  Apr 25;4(4):e1000071.).
 
 Files: purge/*
-Copyright: Andrew Neuwald
-License: PD_ncbi
+Copyright: 2005 Andrew Neuwald
+License: PD_purge
                            PUBLIC DOMAIN NOTICE
               National Center for Biotechnology Information
  .
@@ -61,10 +115,10 @@ License: PD_ncbi
       by A. F. Neuwald.
 
 Files: debian/*
-Copyright: 2007 Steffen Moeller <moeller at debian.org>
-           2007-2008 Charles Plessy <plessy at debian.org>
+Copyright: 2007 Steffen Möller <moeller at debian.org>
+           2007-2009 Charles Plessy <plessy at debian.org>
            2011-2013 Andreas Tille <tille at debian.org>
-License: PD
+License: PD_as_well
  The package is in the public domain and so shall then be
  the packaging for Debian of Steffen Moeller <moeller at debian.org>
  and Charles Plessy <plessy at debian.org>.
diff --git a/debian/debian-compile/Makefile b/debian/debian-compile/Makefile
new file mode 100644
index 0000000..3cd2fa1
--- /dev/null
+++ b/debian/debian-compile/Makefile
@@ -0,0 +1,105 @@
+# This file holds commands for compiling programs in the GLAM2 package
+
+# These commands are customized for the gcc compiler, and may need to
+# be modified for other compilers
+
+# -Wall means turn on compiler warnings (optional)
+# -O3 means optimization level 3 (the maximum for gcc)
+# -lm means include the math library
+
+# Source files for glam2:
+GSRC = glam2_alphabet.c		\
+       glam2_args.c		\
+       glam2_column_sample.c	\
+       glam2_dirichlet.c	\
+       glam2_dna_prior.c	\
+       glam2_fasta.c		\
+       glam2_glam2.c		\
+       glam2_glam2_aln.c	\
+       glam2_init.c		\
+       glam2_output.c		\
+       glam2_recode3_20comp.c	\
+       glam2_site_sample.c	\
+       glam2_util.c		\
+       alphabet.c               \
+       array.c			\
+       array-list.c             \
+       binary-search.c          \
+       ceqlogo.c                \
+       eps2png.c                \
+       io.c                     \
+       matrix.c			\
+       motif.c                  \
+       red-black-tree.c         \
+       regex-utils.c            \
+       string-builder.c         \
+       utils.c
+
+# Source files for glam2scan:
+SSRC = glam2_alphabet.c		\
+       glam2_scan_args.c	\
+       glam2_dirichlet.c	\
+       glam2_dna_prior.c	\
+       glam2_fasta.c		\
+       glam2_scan.c		\
+       glam2_scan_init.c	\
+       glam2_scan_output.c	\
+       glam2_recode3_20comp.c	\
+       glam2_util.c		\
+       glam2_heap.c		\
+       glam2_motif.c		\
+       glam2_alignment.c	\
+       utils.c
+
+# Source files for glam2format:
+FSRC = glam2_glam2format.c	\
+       glam2_alignment.c 	\
+       glam2_fasta.c		\
+       glam2_util.c		\
+       utils.c
+
+# Source files for glam2mask:
+MSRC = glam2_glam2mask.c 	\
+       glam2_alignment.c	\
+       glam2_fasta.c		\
+       glam2_util.c		\
+       utils.c
+
+# Compiler options:
+CFLAGS += -Wall -O3
+
+BINS = glam2		\
+       glam2scan	\
+       glam2format	\
+       glam2mask	\
+       glam2fft
+
+all: $(BINS)
+
+# Command for compiling glam2:
+glam2: $(GSRC) *.h Makefile
+	cc $(CFLAGS) -o glam2 $(GSRC) -lm $(LDFLAGS)
+
+# Command for compiling glam2scan:
+glam2scan: $(SSRC) *.h Makefile
+	cc $(CFLAGS) -o glam2scan $(SSRC) -lm $(LDFLAGS)
+
+# Command for compiling glam2format:
+glam2format: $(FSRC) *.h Makefile
+	cc $(CFLAGS) -o glam2format $(FSRC) -lm $(LDFLAGS)
+
+# Command for compiling glam2mask:
+glam2mask: $(MSRC) *.h Makefile
+	cc $(CFLAGS) -o glam2mask $(MSRC) -lm $(LDFLAGS)
+
+# Here follow commands for compiling special versions of the programs
+
+# Compile glam2 including FFT algorithm (requires FFTW to be installed):
+glam2fft: $(GSRC) glam2_convolve.c *.h Makefile
+	cc $(CFLAGS) -DFFT -o glam2fft $(GSRC) glam2_convolve.c -lm -lfftw3 $(LDFLAGS)
+
+clean:
+	rm -f *.o
+
+distclean:
+	rm -f $(BINS)
diff --git a/debian/debian-compile/config.h b/debian/debian-compile/config.h
new file mode 100644
index 0000000..b9240ee
--- /dev/null
+++ b/debian/debian-compile/config.h
@@ -0,0 +1,6 @@
+/* Version number of package */
+#define VERSION "4.9.1"
+
+#define CONVERT_PATH "/usr/bin/convert"
+
+#define GHOSTSCRIPT_PATH "/usr/bin/gs"
diff --git a/debian/debian-compile/dir.h b/debian/debian-compile/dir.h
new file mode 100644
index 0000000..540437b
--- /dev/null
+++ b/debian/debian-compile/dir.h
@@ -0,0 +1,4 @@
+/* #define MEME_DIR "/usr/bin" */
+#define ETC_DIR "/etc/meme"
+#define BIN_DIR "/usr/bin"
+
diff --git a/debian/debian-compile/glam2_convolve.c b/debian/debian-compile/glam2_convolve.c
new file mode 100644
index 0000000..ef50772
--- /dev/null
+++ b/debian/debian-compile/glam2_convolve.c
@@ -0,0 +1,89 @@
+/**************************************************************
+ * Taken over from old glam2 source but does not help since   *
+ * glam2_convolve.h tries to include glam2_fftw3.h which is   *
+ * missing and was not part of the old glam2 distribution.    *
+ * Andreas Tille <tille at debian.org>                           *
+ **************************************************************/
+#include <assert.h>
+#include <errno.h>
+#include "glam2_util.h"
+#include "glam2_convolve.h"
+
+/* Return the lowest power of 2 that is >= x (and >= 1) */
+static int next_pow2(const int x) {
+  int y = 1;
+  while (y < x) {
+    assert(can_mul_int(y, 2));
+    y *= 2;
+  }
+  return y;
+}
+
+/* Multiplication of complex numbers */
+/* Allows output to overwrite input */
+static void multiply_complex(fftw_complex z, const fftw_complex x, const fftw_complex y) {
+  const double a = x[0] * y[0] - x[1] * y[1];
+  const double b = x[0] * y[1] + x[1] * y[0];
+  z[0] = a;
+  z[1] = b;
+}
+
+/* Dot product of complex vectors */
+/* Can't use const for pointer-to-pointer */
+static void dot_complex(fftw_complex *z, fftw_complex *x, fftw_complex *y, int size) {
+  int i;
+  for (i = 0; i < size; ++i)
+    multiply_complex(z[i], x[i], y[i]);
+}
+
+/* malloc or die */
+static void *fftw_xmalloc(size_t size) {
+  void *p = fftw_malloc(size);
+  if (p == NULL)
+    die("%s: error allocating %lu bytes: %s\n",
+        prog_name, (unsigned long)size, strerror(errno));
+  return p;
+}
+
+void fft_init(fft_convolver *f, const int max_size) {
+  int zero_pad, size, mem;
+  assert(max_size > 0);
+  zero_pad = max_size - 1;  /* padding to avoid wraparound convolution */
+  assert(can_add_int(max_size, zero_pad));
+  size = next_pow2(max_size + zero_pad);  /* power-of-2 size is faster??? */
+  assert(can_mul_int(2, size / 2 + 1));
+  mem = 2 * (size / 2 + 1);  /* padding for in-place transforms */
+
+  f->size = size;
+
+  f->x = fftw_xmalloc(mem * sizeof(double));
+  f->y = fftw_xmalloc(mem * sizeof(double));
+  f->z = fftw_xmalloc(mem * sizeof(double));
+
+  f->x_plan = fftw_plan_dft_r2c_1d(size, f->x, (fftw_complex *)f->x,
+				   FFTW_MEASURE);
+  f->y_plan = fftw_plan_dft_r2c_1d(size, f->y, (fftw_complex *)f->y,
+				   FFTW_MEASURE);
+  f->z_plan = fftw_plan_dft_c2r_1d(size, (fftw_complex *)f->z, f->z,
+				   FFTW_MEASURE);
+}
+
+void fft_convolve(double *z, const double *x, const double *y, const int size, fft_convolver *f) {
+  const int half_size = f->size / 2 + 1;
+  const int pad_size = f->size - size;
+  assert(size <= f->size / 2);
+
+  COPY(f->x, x, size);
+  COPY(f->y, y, size);
+  set_dbl(f->x + size, pad_size, 0);  /* pad with zeros */
+  set_dbl(f->y + size, pad_size, 0);  /* pad with zeros */
+
+  fftw_execute(f->x_plan);
+  fftw_execute(f->y_plan);
+  dot_complex((fftw_complex *)f->z, (fftw_complex *)f->x, (fftw_complex *)f->y,
+	      half_size);
+  fftw_execute(f->z_plan);
+  mul_dbl(f->z, f->size, 1.0 / f->size);
+
+  COPY(z, f->z, size);
+}
diff --git a/debian/debian-docs/index.html b/debian/debian-docs/index.html
new file mode 100644
index 0000000..83e6723
--- /dev/null
+++ b/debian/debian-docs/index.html
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+    "http://www.w3.org/TR/html4/strict.dtd">
+<html lang=en>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>GLAM2 Manual</title>
+<link type="text/css" rel="stylesheet" href="glam2.css">
+</head>
+<body>
+
+<h1>GLAM2 Manual</h1>
+
+<p><strong>Summary:</strong> GLAM2 is a software package for finding
+<em>motifs</em> in sequences, typically amino-acid or nucleotide
+sequences.  A motif is a re-occurring sequence pattern: typical
+examples are the TATA box and the CAAX prenylation motif.  The main
+innovation of GLAM2 is that it allows insertions and deletions in
+motifs.</p>
+
+<p><strong>Family:</strong> GLAM2 is a child of <a
+href="http://zlab.bu.edu/glam/">GLAM</a> and a sibling of <a
+href="ftp://ftp.ncbi.nih.gov/pub/spouge/papers/archive/AGLAM/">A-GLAM</a>.
+If you are looking for nucleotide motifs without insertions or
+deletions, A-GLAM is probably better.  'GLAM' used to stand for
+Gapless Local Alignment of Multiple sequences, but it now stands for
+Gapped Local Alignment of Motifs.</p>
+
+<p<strong>Inventory:</strong> The package includes these programs:</p>
+
+<ul>
+
+<li><strong>glam2</strong> - for discovering motifs shared by a set of
+sequences.</li>
+
+<li><strong>glam2scan</strong> - for finding matches, in a sequence
+database, to a motif discovered by glam2.</li>
+
+<li><strong>glam2format</strong> - for converting glam2 motifs to
+standard alignment formats.</li>
+
+<li><strong>glam2mask</strong> - for masking glam2 motifs out of
+sequences, so that weaker motifs can be found.</li>
+
+<!--
+<li><strong>purge</strong> - for removing highly similar members of a
+set of sequences.</li>
+-->
+</ul>
+
+<p>These are <em>command line</em> programs, so you need a basic
+familiarity with running things from your computer's command line in
+order to use them. (In Mac OS X, you want Applications -> Utilities ->
+Terminal.)</p>
+
+<p><strong>About:</strong> GLAM2 was developed by <a
+href="http://www.cbrc.jp/~martin/">Martin C Frith</a>, working at the
+<a href="http://www.cbrc.jp/index.eng.html">Computational Biology
+Research Center</a> in Tokyo, and <a
+href="http://research.imb.uq.edu.au/~tbailey/">Timothy L Bailey</a>,
+working at the <a href="http://www.imb.uq.edu.au/">Institute for
+Molecular Bioscience</a> in Brisbane.  The source code and
+documentation are hereby released into the public domain.  If you use
+GLAM2, please cite:
+<cite>MC Frith, NFW Saunders, B Kobe, TL Bailey (2008) Discovering
+sequence motifs with arbitrary insertions and deletions, PLoS
+Computational Biology (in press)</cite>.</p>
+
+<p><strong>Contact:</strong> Questions and comments are welcome.
+Email: glam2(at-mark)imb.uq.edu.au.  We would especially like to hear
+about any errors when installing or running the software
+(e.g. segmentation faults, assertion failures) so that we can fix
+them.  Please send the exact text of the error message, and the exact
+inputs that produce the error.</p>
+
+<h2>Contents</h2>
+
+<ul>
+
+<li><a href="install.html">Installation</a> - how to install GLAM2 on
+your computer.</li>
+
+<li><a href="glam2_tut.html">glam2 tutorial</a> - all you need to know
+for typical usage of glam2.</li>
+
+<li><a href="glam2_ref.html">glam2 reference</a> - all of glam2's
+options.</li>
+
+<li><a href="glam2scan.html">glam2scan manual</a></li>
+
+<li><a href="glam2format.html">glam2format manual</a></li>
+
+<li><a href="glam2mask.html">glam2mask manual</a></li>
+
+<li><a href="purge.html">purge manual</a></li>
+
+<li><a href="alphabet.html">Alphabets</a></li>
+
+<li><a href="dirichlet.html">Dirichlet mixtures</a></li>
+
+<li><a href="GLAM2_method.pdf">GLAM2 methods (PDF)</a> - mathematical
+description of how GLAM2 works.</li>
+
+</ul>
+
+</body>
+</html>
diff --git a/debian/debian-examples/crp0.s b/debian/debian-examples/crp0.s
new file mode 100644
index 0000000..be5eb64
--- /dev/null
+++ b/debian/debian-examples/crp0.s
@@ -0,0 +1,54 @@
+>ce1cg 17 61
+TAATGTTTGTGCTGGTTTTTGTGGCATCGGGCGAGAATAGCGCGTGGTGTGAAAGACTGTTTTTTTGATCGTTTTCACAA
+AAATGGAAGTCCACAGTCTTGACAG
+>ara 17 55
+GACAAAAACGCGTAACAAAAGTGTCTATAATCACGGCAGAAAAGTCCACATTGATTATTTGCACGGCGTCACACTTTGCT
+ATGCCATAGCATTTTTATCCATAAG
+>bglr1 76
+ACAAATCCCAATAACTTAATTATTGGGATTTGTTATATATAACTTTATAAATTCCTAAAATTACACAAAGTTAATAACTG
+TGAGCATGGTCATATTTTTATCAAT
+>crp 63
+CACAAAGCGAAAGCTATGCTAAAACAGTCAGGATGCTACAGTAATACATTGATGTACTGCATGTATGCAAAGGACGTCAC
+ATTACCGTGCAGTACAGTTGATAGC
+>cya 50
+ACGGTGCTACACTTGTATGTAGCGCATCTTTCTTTACGGTCAATCAGCAAGGTGTTAAATTGATCACGTTTTAGACCATT
+TTTTCGTCGTGAAACTAAAAAAACC
+>deop2 7 60
+AGTGAATTATTTGAACCAGATCGCATTACAGTGATGCAAACTTGTAAGTAGATTTCCTTAATTGTGATGTGTATCGAAGT
+GTGTTGCGGAGTAGATGTTAGAATA
+>gale 42
+GCGCATAAAAAACGGCTAAATTCTTGTGTAAACGATTCCACTAATTTATTCCATGTCACACTTTTCGCATCTTTGTTATG
+CTATGGTTATTTCATACCATAAGCC
+>ilv 39
+GCTCCGGCGGGGTTTTTTGTTATCTGCAATTCAGTACAAAACGTGATCAACCCCTCAATTTTCCCTTTGCTGAAAAATTT
+TCCATTGTCTCCCCTGTAAAGCTGT
+>lac 9 80
+AACGCAATTAATGTGAGTTAGCTCACTCATTAGGCACCCCAGGCTTTACACTTTATGCTTCCGGCTCGTATGTTGTGTGG
+AATTGTGAGCGGATAACAATTTCAC
+>male 14
+ACATTACCGCCAATTCTGTAACAGAGATCACACAAAGCGACGGTGGGGCGTAGGGGCAAGGAGGATGGAAAGAGGTTGCC
+GTATAAAGAAACTAGAGTCCGTTTA
+>malk 29 61
+GGAGGAGGCGGGAGGATGAGAACACGGCTTCTGTGAACTAAACCGAGGTCATGTAAGGAATTTCGTGATGTTGCTTGCAA
+AAATCGTGGCGATTTTATGTGCGCA
+>malt 41
+GATCAGCGTCGTTTTAGGTGAGTTGTTAATAAAGATTTGGAATTGTGACACAGTGCAAATTCAGACACATAAAAAAACGT
+CATCGCTTGCATTAGAAAGGTTTCT
+>ompa 48
+GCTGACAAAAAAGATTAAACATACCTTATACAAGACTTTTTTTTCATATGCCTGACGGAGTTCACACTTGTAAGTTTTCA
+ACTACGTTGTAGACTTTACATCGCC
+>tnaa 71 
+TTTTTTAAACATTAAAATTCTTACGTAATTTATAATCTTTAAAAAAAGCATTTAATATTGCTCCCCGAACGATTGTGATT
+CGATTCACATTTAAACAATTTCAGA
+>uxu1 17
+CCCATGAGAGTGAAATTGTTGTGATGTGGTTAACCCAATTAGAATTCGGGATTGACATGTCTTACCAAAAGGTAGAACTT
+ATACGCCATCTCATCCGATGCAAGC
+>pbr322 53
+CTGGCTTAACTATGCGGCATCAGAGCAGATTGTACTGAGAGTGCACCATATGCGGTGTGAAATACCGCACAGATGCGTAA
+GGAGAAAATACCGCATCAGGCGCTC
+>trn9cat 1 84
+CTGTGACGGAAGATCACTTCGCAGAATAAATAAATCCTGGTGTCCCTGTTGATACCGGGAAGCCCTGGGCCAACTTTTGG
+CGAAAATGAGACGTTGATCGGCACG
+>tdc 78
+GATTTTTATACTTTAACTTGTTGATATTTAAAGGTATTTAATTGTAATAACGATACTCTGGAAAGTATTGAAAGTTAATT
+TGTGAGTGGTCGCACATATCCTGTT
diff --git a/debian/debian-examples/dna.alph b/debian/debian-examples/dna.alph
new file mode 100644
index 0000000..31b03cf
--- /dev/null
+++ b/debian/debian-examples/dna.alph
@@ -0,0 +1,7 @@
+# This is the standard nucleotide alphabet.
+
+aA
+cC
+gG
+tTuU
+N
diff --git a/debian/debian-examples/glam_tfbs.1comp b/debian/debian-examples/glam_tfbs.1comp
new file mode 100644
index 0000000..4e6d4d9
--- /dev/null
+++ b/debian/debian-examples/glam_tfbs.1comp
@@ -0,0 +1,8 @@
+comment= This is a simple Dirichlet mixture with just one component, suitable
+comment= for transcription factor binding sites in DNA.  It was obtained by
+comment= fitting to motifs in the TRANSFAC database, as described in: MC
+comment= Frith, U Hansen, JL Spouge, Z Weng Nucleic Acids Research 2004
+comment= 32:189-200.
+
+Mixture= 1
+Alpha= 1.6 0.4 0.4 0.4 0.4
diff --git a/debian/debian-examples/lipocalin.s b/debian/debian-examples/lipocalin.s
new file mode 100644
index 0000000..650054f
--- /dev/null
+++ b/debian/debian-examples/lipocalin.s
@@ -0,0 +1,20 @@
+>ICYA_MANSE
+GDIFYPGYCPDVKPVNDFDLSAFAGAWHEIAKLPLENENQGKCTIAEYKYDGKKASVYNSFVSNGVKEYMEGDLEIAPDA
+KYTKQGKYVMTFKFGQRVVNLVPWVLATDYKNYAINYNCDYHPDKKAHSIHAWILSKSKVLEGNTKEVVDNVLKTFSHLI
+DASKFISNDFSEAACQYSTTYSLTGPDRH
+>LACB_BOVIN
+MKCLLLALALTCGAQALIVTQTMKGLDIQKVAGTWYSLAMAASDISLLDAQSAPLRVYVEELKPTPEGDLEILLQKWENG
+ECAQKKIIAEKTKIPAVFKIDALNENKVLVLDTDYKKYLLFCMENSAEPEQSLACQCLVRTPEVDDEALEKFDKALKALP
+MHIRLSFNPTQLEEQCHI
+>BBP_PIEBR
+NVYHDGACPEVKPVDNFDWSNYHGKWWEVAKYPNSVEKYGKCGWAEYTPEGKSVKVSNYHVIHGKEYFIEGTAYPVGDSK
+IGKIYHKLTYGGVTKENVFNVLSTDNKNYIIGYYCKYDEDKKGHQDFVWVLSRSKVLTGEAKTAVENYLIGSPVVDSQKL
+VYSDFSEAACKVN
+>RETB_BOVIN
+ERDCRVSSFRVKENFDKARFAGTWYAMAKKDPEGLFLQDNIVAEFSVDENGHMSATAKGRVRLLNNWDVCADMVGTFTDT
+EDPAKFKMKYWGVASFLQKGNDDHWIIDTDYETFAVQYSCRLLNLDGTCADSYSFVFARDPSGFSPEVQKIVRQRQEELC
+LARQYRLIPHNGYCDGKSERNIL
+>MUP2_MOUSE
+MKMLLLLCLGLTLVCVHAEEASSTGRNFNVEKINGEWHTIILASDKREKIEDNGNFRLFLEQIHVLEKSLVLKFHTVRDE
+ECSELSMVADKTEKAGEYSVTYDGFNTFTIPKTDYDNFLMAHLINEKDGETFQLMGLYGREPDLSSDIKERFAKLCEEHG
+ILRENIIDLSNANRCLQARE
diff --git a/debian/debian-examples/recode3.20comp b/debian/debian-examples/recode3.20comp
new file mode 100644
index 0000000..6b15bbf
--- /dev/null
+++ b/debian/debian-examples/recode3.20comp
@@ -0,0 +1,107 @@
+ClassName = DirichletReg
+Name = recode3.20comp
+Alphabet = ExtAA
+Order =  A C D E F G H I K L M N P Q R S T V W Y
+AlphaChar= 20
+NumDistr= 20
+
+Number= 0
+Mixture= 0.176513
+Alpha= 10.1329 0.668781 0.072626 1.08101 0.930936 0.1235 0.982387 0.366701 0.0586812 0.849019 0.185073 0.0648062 0.979541 0.519704 0.555784 0.636552 1.04987 0.60931 0.129148 0.0676805 0.201772
+Comment= N , D S Q H K E G R T P >< A Y , W C F M , L V , I
+
+Number= 1
+Mixture= 0.207622
+Alpha= 11.6836 0.880009 0.197393 0.303744 0.497357 0.657492 0.391988 0.348159 0.936094 0.527206 1.42844 0.449302 0.368825 0.384576 0.439775 0.581516 0.622624 0.747064 1.08007 0.235012 0.606928
+Comment= M Y L F I W V H T Q >< R A C S K N P E , G D
+
+Number= 2
+Mixture= 0.0669246
+Alpha= 5.22319 0.153384 0.0520756 0.0073824 0.0158439 0.428964 0.025533 0.0185789 0.845361 0.0282996 2.42256 0.424296 0.0190716 0.0313429 0.0274578 0.0252186 0.028514 0.0519217 0.522946 0.0279653 0.0664755
+Comment= L , M I , F V >< C , A Y W , T H Q P , R K S N G , E , D
+
+Number= 3
+Mixture= 0.0868259
+Alpha= 9.82176 0.794007 0.0130659 0.624236 1.85769 0.0290214 0.115707 0.123504 0.22099 1.52605 0.341371 0.111114 0.308302 0.263545 0.953727 0.933444 0.554741 0.604551 0.396451 0.00823516 0.0420054
+Comment= E K Q , R T D A >< S N P V H M , L I , G , Y C F , W
+
+Number= 4
+Mixture= 0.0593123
+Alpha= 5.54386 0.740015 0.187165 0.0213261 0.0456854 0.118944 0.0633687 0.0170331 1.06684 0.0380614 0.733524 0.138456 0.0300644 0.0718692 0.0240143 0.0301022 0.0862989 0.367283 1.70735 0.0113856 0.045079
+Comment= V , I , C A L T M >< F , P S , Y G W E H , N K Q R D
+
+Number= 5
+Mixture= 0.0358616
+Alpha= 4.66847 0.15978 0.0261585 0.0505181 0.125524 0.0350331 0.102549 0.157461 0.0795041 1.26261 0.189383 0.0550608 0.171028 0.0844169 0.290476 1.44604 0.129158 0.138972 0.0851144 0.0159134 0.0637679
+Comment= R K ,, Q H >< N T M , S L A E P Y C G I V , W D F
+
+Number= 6
+Mixture= 0.03427
+Alpha= 5.9237 0.308434 0.0137217 1.69731 1.92422 0.0361113 0.162357 0.07232 0.0487895 0.236135 0.0809074 0.0286236 0.213663 0.181631 0.320245 0.104878 0.218398 0.141668 0.0747719 0.0141705 0.0453433
+Comment= E D ,, Q >< N K A P S , H T G R , M Y V W L F I C
+
+Number= 7
+Mixture= 0.0428319
+Alpha= 0.0441636 0.00260287 9.99856e-06 0.00631292 0.00445502 0.00274753 1.03886e-05 1.02839e-05 0.000913052 0.0029241 0.00353485 0.00105128 0.00338172 1.04172e-05 0.00173574 0.00459583 0.00274255 0.00247625 0.00175366 1.02411e-05 0.00288489
+Comment= D R , Y N E F K M Q T S >< L A V , I ,,,,, W C H , P , G
+
+Number= 8
+Mixture= 0.047875
+Alpha= 3.87573 1.61043 0.15522 0.0378292 0.0498243 0.0406484 0.529136 0.0217524 0.040597 0.0413396 0.100193 0.0509779 0.0357917 0.0931204 0.0367156 0.0330646 0.529587 0.196607 0.230878 0.00909518 0.0329275
+Comment= A , S C , G >< T V M P , L Q F , Y H N E K I R D W
+
+Number= 9
+Mixture= 0.0466614
+Alpha= 4.02936 0.15525 0.0136827 0.0857138 0.0508316 0.0151451 3.10555 0.027169 0.0140491 0.0654038 0.0257501 0.00901049 0.127437 0.0423873 0.0345064 0.0477247 0.12452 0.0341196 0.0230637 0.00930115 0.0187464
+Comment= G ,,,>< N S A , D K H , R Q P E C T W Y , M F V L , I
+
+Number= 10
+Mixture= 0.0283695
+Alpha= 4.37516 0.225739 0.0684326 0.101072 0.0813791 0.0298832 0.0915218 0.0336807 0.0833114 0.0931673 0.0731542 0.0419314 0.230216 0.087446 0.0694702 0.0751969 1.13857 1.63158 0.179083 0.00912576 0.0311963
+Comment= T S ,, N >< C A V , M Q P D K R I H E G , Y L F W
+
+Number= 11
+Mixture= 0.0301127
+Alpha= 5.10487 1.3431e-06 0.0166656 0.00743068 1.34592e-06 0.169076 0.00407061 0.00714122 1.98221 0.017522 0.816669 0.114773 0.00678027 0.0106392 0.0100244 0.0158968 0.00879658 0.0399043 1.81043 0.0150671 0.0517801
+Comment= I V ,, L M >< F , Y , W C T ,, R K H Q P , N S D , G ,,,,,,,,,,, E , A
+
+Number= 12
+Mixture= 0.0233828
+Alpha= 3.08488 0.063525 0.0288391 1.09265 0.0959581 0.00965196 0.216914 0.0730986 0.0207325 0.08719 0.0315107 0.00960293 0.752755 0.059914 0.0445321 0.0312317 0.287327 0.116896 0.0249446 0.00701663 0.0305859
+Comment= D N ,, S >< H G T C , K E P Q Y A , R W M , V L I F
+
+Number= 13
+Mixture= 0.034662
+Alpha= 5.72698 0.294281 0.019271 0.12293 0.162747 0.0373667 0.145029 0.0412349 0.0815261 0.157594 0.151631 0.021412 0.0601581 3.6966 0.0809085 0.101856 0.23533 0.135424 0.140532 0.00900473 0.0321389
+Comment= P ,,,>< S A , K E T Q D R V G H L , N I C M Y F , W
+
+Number= 14
+Mixture= 0.0270202
+Alpha= 3.67648 0.0844832 0.0584945 0.0411628 0.045719 0.847822 0.0590839 0.250253 0.0675757 0.0562614 0.168617 0.0439737 0.0794234 0.028301 0.0305672 0.0598024 0.0798202 0.0585385 0.0858243 0.227395 1.30336
+Comment= Y , F W , H ,>< C M L , N S V R I A T K , Q G E D P
+
+Number= 15
+Mixture= 0.0226822
+Alpha= 3.08684 0.0634034 0.0246167 1.3443e-06 0.00389272 1.12953 0.00796028 1.35032e-06 0.233395 1.34466e-06 0.541933 0.101309 1.36412e-06 0.027467 0.00704479 0.00802297 0.0248977 0.0276933 0.185467 0.183309 0.516892
+Comment= F , Y , W , L M I >< V , C A , P T S ,, Q R G , E ,,,,,,,,,, H , N K , D
+
+Number= 16
+Mixture= 0.00898452
+Alpha= 2.51284 0.123696 0.0454619 0.0386434 0.351847 0.0560181 0.0439442 0.223229 0.01302 0.148699 0.19001 0.120964 0.098734 5.90055e-06 0.554971 0.219233 0.0453885 0.0564686 0.0614792 0.0410248 0.0800036
+Comment= Q , H E M , R W K >< C N Y L A F , T V S D , G , I ,,,,,,,,,,, P
+
+Number= 17
+Mixture= 0.00716226
+Alpha= 3.39257 0.0212037 3.18769 0.00745627 0.00382411 0.00691924 0.0126233 1.34375e-06 0.00724293 0.00522979 0.00785563 0.00489521 0.0105326 0.0136265 0.00505819 0.00677712 0.0251744 0.0235516 0.0371462 0.00187667 0.0038893
+Comment= C ,,,,,><,, V T , S P A N M , G F Q R D W I Y , K L E ,,,,,,,,,, H
+
+Number= 18
+Mixture= 0.00710292
+Alpha= 2.51689 0.0229376 0.00427768 0.00959934 0.013608 0.182277 0.0227654 0.0157344 0.0226783 0.011561 0.0803491 0.0154283 0.00899225 0.00980608 0.00600945 0.0342359 0.0216842 0.0189306 0.0223176 1.83914 0.154565
+Comment= W ,,,,, F Y ><, L M R H , I S T , V G A C E P N K D Q
+
+Number= 19
+Mixture= 0.00582299
+Alpha= 1.35874 2.16602e-06 2.16245e-06 0.0198496 2.17942e-06 0.0246741 2.47051e-06 1.02563 0.0131152 2.16539e-06 0.00637704 2.1414e-06 0.0839371 0.0168135 0.0438887 0.0252951 0.0235533 0.0130626 0.00797507 2.16433e-06 0.0545531
+Comment= H ,,,, N Y >< Q , F R S P D , T I , V , L ,,,,,,,,, W C M ,, K E G A
+EndClassName = DirichletReg
diff --git a/debian/debian-examples/robinson.alph b/debian/debian-examples/robinson.alph
new file mode 100644
index 0000000..b44690f
--- /dev/null
+++ b/debian/debian-examples/robinson.alph
@@ -0,0 +1,25 @@
+# This is the standard protein alphabet.  The abundances are taken
+# from from: AB Robinson & LR Robinson Proc Natl Acad Sci 1991
+# 88:8880-4, which is cited in publications on NCBI BLAST.
+
+Aa 35155
+Cc 8669
+Dd 24161
+Ee 28354
+Ff 17367
+Gg 33229
+Hh 9906
+Ii 23161
+Kk 25872
+Ll 40625
+Mm 10101
+Nn 20212
+Pp 23435
+Qq 19208
+Rr 23105
+Ss 32070
+Tt 26311
+Vv 29012
+Ww 5990
+Yy 14488
+x
diff --git a/debian/docs b/debian/docs
index ff413f7..bd16f5d 100644
--- a/debian/docs
+++ b/debian/docs
@@ -1,4 +1,2 @@
-README
-doc/*.html
-doc/*.css
-doc/*.pdf
+doc/*
+debian/debian-docs/*
diff --git a/debian/examples b/debian/examples
index e39721e..ac0b4f0 100644
--- a/debian/examples
+++ b/debian/examples
@@ -1 +1 @@
-examples/*
+debian/debian-examples/*
diff --git a/debian/glam2-purge.1.xml b/debian/glam2-purge.1.xml
deleted file mode 100644
index b5369ca..0000000
--- a/debian/glam2-purge.1.xml
+++ /dev/null
@@ -1,168 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?xml-stylesheet type="text/xsl"
-	href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
-	"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
-
-<!-- Process this file with an XSLT processor, e.g. xsltproc:    -->
-<!-- `xsltproc \
-      -''-nonet \
-      -''-param man.charmap.use.subset "0" \
-      -''-param make.year.ranges "1" \
-      -''-param make.single.year.ranges "1" \
-      manpage.xml'                                               -->
-
-  <!ENTITY dhfirstname "Charles">
-  <!ENTITY dhsurname   "Plessy">
-  <!ENTITY dhemail     "plessy at debian.org">
-  <!ENTITY dhusername  "&dhfirstname; &dhsurname;">
-  <!ENTITY dhrelease   "1056">
-  <!ENTITY dhtitle     "glam2 Manual">
-  <!ENTITY dhucpackage "GLAM2-PURGE">
-  <!ENTITY dhpackage   "glam2-purge">
-  <!ENTITY dhproduct   "GLAM2">
-  <!ENTITY dhsection   "1">
-
-]>
-
-<refentry>
-	<refentryinfo>
-		<title>&dhtitle;</title>
-		<!-- Better put a suite name instead of &dhpackage; into productname -->
-		<productname>&dhproduct;</productname>
-		<releaseinfo role="version">&dhrelease;</releaseinfo>
-		<authorgroup>
-      <author>
-        <firstname>Andrew</firstname>
-        <firstname>F</firstname>
-        <surname>Neuwald</surname>
-        <contrib>Author of purge, renamed glam2-purge in Debian.</contrib>
-      </author>
-    </authorgroup>
-    <authorgroup>
-			<author>
-				<firstname>Martin</firstname>
-        <firstname>C</firstname>
-				<surname>Frith</surname>
-				<contrib>Modified purge to be ANSI standard C and improved the user interface.</contrib>
-			</author>
-			<author>
-        <firstname>Timothy</firstname>
-        <firstname>L</firstname>
-        <surname>Bailey</surname>
-        <contrib>Modified purge to be ANSI standard C and improved the user interface.</contrib>
-      </author>
-    </authorgroup>
-    <authorgroup>
-      <author>
-				<firstname>&dhfirstname;</firstname>
-				<surname>&dhsurname;</surname>
-				<contrib>Formatted this manpage in DocBook XML for the Debian distribution.</contrib>
-				<address>
-					<email>&dhemail;</email>
-				</address>
-			</author>
-		</authorgroup>
-		<legalnotice>
-			<para>The source code and the documentation of Purge and GLAM2 are released in the public domain.</para>
-		</legalnotice>
-	</refentryinfo>
-	<refmeta>
-		<refentrytitle>&dhucpackage;</refentrytitle>
-		<manvolnum>&dhsection;</manvolnum>
-	</refmeta>
-	<refnamediv>
-		<refname>&dhpackage;</refname>
-		<refpurpose>Removes redundant sequences from a FASTA file</refpurpose>
-	</refnamediv>
-	<refsynopsisdiv>
-		<cmdsynopsis>
-			<command>&dhpackage;</command>
-			<arg choice="plain"><replaceable>file</replaceable></arg>
-			<arg choice="plain"><option>score</option></arg>
-			<arg choice="opt"><option>options</option></arg>
-		</cmdsynopsis>
-	</refsynopsisdiv>
-  
-	<refsect1 id="description">
-		<title>DESCRIPTION</title>
-		<para>
-      <command>glam2-purge</command> is a modified version of Andrew Neuwald's <command>purge</command> program that removes redundant sequences from a FASTA file. This is recommended in order to prevent highly similar sequences distorting the search for motifs. Purge works with either DNA or protein sequences and creates an output file such that no two sequences have a (gapless) local alignment score greater than a threshold specified by the user. The output file is named <file>.& [...]
-    </para>
-	</refsect1>
-  
-	<refsect1 id="options">
-		<title>OPTIONS</title>
-		<variablelist>
-			<!-- Use the variablelist.term.separator and the
-			     variablelist.term.break.after parameters to
-			     control the term elements. -->
-			<varlistentry>
-				<term><option>-n</option></term>
-				<listitem>
-					<para>Sequences are DNA (default: protein).</para>
-				</listitem>
-			</varlistentry>
-      
-			<varlistentry>
-				<term><option>-b</option></term>
-				<listitem>
-					<para>Use blast heuristic method (default for protein).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-e</option></term>
-				<listitem>
-					<para>Use an exhaustive method (default for DNA).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-q</option></term>
-				<listitem>
-					<para>Keep first sequence in the set.</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-x</option></term>
-				<listitem>
-					<para>Use xnu to mask protein tandem repeats.</para>
-				</listitem>
-			</varlistentry>
-		</variablelist>
-	</refsect1>
-
-	<refsect1 id="see_also">
-		<title>SEE ALSO</title>
-		<!-- In alpabetical order. -->
-		<para><citerefentry>
-				<refentrytitle>glam2</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2format</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2mask</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2scan</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>xnu</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry></para>
-		<para>The full Hypertext documentation of GLAM2 is available online at <ulink url="http://bioinformatics.org.au/glam2/">http://bioinformatics.org.au/glam2/</ulink> or on this computer in <filename class="directory">/usr/share/doc/glam2/</filename>.</para>
-	</refsect1>
-  
-  <refsect1 id="ref">
-    <title>REFERENCES</title>
-    <para>
-      Purge was written by Andy Neuwald and is described in more detail in Neuwald et al., "Gibbs motif sampling: detection of bacterial outer membrane protein repeats", Protein Science, 4:1618–1632, 1995. Please cite it if you use Purge.
-    </para>
-    <para>
-      If you use GLAM2, please cite: MC Frith, NFW Saunders, B Kobe, TL Bailey (2008) Discovering sequence motifs with arbitrary insertions and deletions, PLoS Computational Biology (in press).
-    </para>
-  </refsect1>
-</refentry>
diff --git a/debian/glam2.1.xml b/debian/glam2.1.xml
deleted file mode 100644
index c5bd191..0000000
--- a/debian/glam2.1.xml
+++ /dev/null
@@ -1,272 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?xml-stylesheet type="text/xsl"
-	href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
-	"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
-
-<!-- Process this file with an XSLT processor, e.g. xsltproc:    -->
-<!-- `xsltproc \
-      -''-nonet \
-      -''-param man.charmap.use.subset "0" \
-      -''-param make.year.ranges "1" \
-      -''-param make.single.year.ranges "1" \
-      manpage.xml'                                               -->
-
-  <!ENTITY dhfirstname "Charles">
-  <!ENTITY dhsurname   "Plessy">
-  <!ENTITY dhemail     "plessy at debian.org">
-  <!ENTITY dhusername  "&dhfirstname; &dhsurname;">
-  <!ENTITY dhrelease   "1056">
-  <!ENTITY dhtitle     "glam2 Manual">
-  <!ENTITY dhucpackage "GLAM2">
-  <!ENTITY dhpackage   "glam2">
-  <!ENTITY dhproduct   "GLAM2">
-  <!ENTITY dhsection   "1">
-
-]>
-
-<refentry>
-	<refentryinfo>
-		<title>&dhtitle;</title>
-		<!-- Better put a suite name instead of &dhpackage; into productname -->
-		<productname>&dhproduct;</productname>
-		<releaseinfo role="version">&dhrelease;</releaseinfo>
-		<authorgroup>
-			<author>
-				<firstname>Martin</firstname>
-        <firstname>C</firstname>
-				<surname>Frith</surname>
-				<contrib>Author of GLAM2.</contrib>
-			</author>
-			<author>
-        <firstname>Timothy</firstname>
-        <firstname>L</firstname>
-        <surname>Bailey</surname>
-        <contrib>Author of GLAM2.</contrib>
-      </author>
-      <author>
-				<firstname>&dhfirstname;</firstname>
-				<surname>&dhsurname;</surname>
-				<contrib>Formatted this manpage in DocBook XML for the Debian distribution.</contrib>
-				<address>
-					<email>&dhemail;</email>
-				</address>
-			</author>
-		</authorgroup>
-		<legalnotice>
-			<para>The source code and the documentation of GLAM2 are released in the public domain.</para>
-		</legalnotice>
-	</refentryinfo>
-	<refmeta>
-		<refentrytitle>&dhucpackage;</refentrytitle>
-		<manvolnum>&dhsection;</manvolnum>
-	</refmeta>
-	<refnamediv>
-		<refname>&dhpackage;</refname>
-		<refpurpose>Gapped Local Alignment of Motifs</refpurpose>
-	</refnamediv>
-	<refsynopsisdiv>
-		<cmdsynopsis>
-			<command>&dhpackage;</command>
-			<arg choice="opt"><option>options</option></arg>
-			<arg choice="plain"><option>alphabet</option></arg>
-			<arg choice="plain"><replaceable>my_seqs.fa</replaceable></arg>
-		</cmdsynopsis>
-    <para>An alphabet other than <parameter>p</parameter> or <parameter>n</parameter> is interpreted as the name of an alphabet file.</para>
-	</refsynopsisdiv>
-  
-	<refsect1 id="description">
-		<title>DESCRIPTION</title>
-		<para>
-      GLAM2 is a software package for finding motifs in sequences, typically amino-acid or nucleotide sequences. A motif is a re-occurring sequence pattern: typical examples are the TATA box and the CAAX prenylation motif. The main innovation of GLAM2 is that it allows insertions and deletions in motifs.
-    </para>
-	</refsect1>
-  
-	<refsect1 id="options">
-		<title>OPTIONS (default settings)</title>
-		<variablelist>
-			<!-- Use the variablelist.term.separator and the
-			     variablelist.term.break.after parameters to
-			     control the term elements. -->
-			<varlistentry>
-				<term><option>-h</option></term>
-				<listitem>
-					<para>Show all options and their default settings.</para>
-				</listitem>
-			</varlistentry>
-      
-			<varlistentry>
-				<term><option>-o</option></term>
-				<listitem>
-					<para>Output file (<parameter>stdout</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-r</option></term>
-				<listitem>
-					<para>Number of alignment runs (<parameter>10</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-n</option></term>
-				<listitem>
-					<para>End each run after this many iterations without improvement (<parameter>10000</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-2</option></term>
-				<listitem>
-					<para>Examine both strands - forward and reverse complement.</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-z</option></term>
-				<listitem>
-					<para>Minimum number of sequences in the alignment (<parameter>2</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-a</option></term>
-				<listitem>
-					<para>Minimum number of aligned columns (<parameter>2</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-b</option></term>
-				<listitem>
-					<para>Maximum number of aligned columns (<parameter>50</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-w</option></term>
-				<listitem>
-					<para>Initial number of aligned columns (<parameter>20</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-d</option></term>
-				<listitem>
-					<para>Dirichlet mixture file.</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-D</option></term>
-				<listitem>
-					<para>Deletion pseudocount (<parameter>0.1</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-E</option></term>
-				<listitem>
-					<para>No-deletion pseudocount (<parameter>2.0</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-I</option></term>
-				<listitem>
-					<para>Insertion pseudocount (<parameter>0.02</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-J</option></term>
-				<listitem>
-					<para>No-insertion pseudocount (<parameter>1.0</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-q</option></term>
-				<listitem>
-					<para>Weight for generic versus sequence-set-specific residue abundances (<parameter>1e+99</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-t</option></term>
-				<listitem>
-					<para>Initial temperature (<parameter>1.2</parameter>).</para>
-				</listitem>
-			</varlistentry>
-      
-			<varlistentry>
-				<term><option>-c</option></term>
-				<listitem>
-					<para>Cooling factor per n iterations (<parameter>1.44</parameter>).</para>
-				</listitem>
-			</varlistentry>
-      
-			<varlistentry>
-				<term><option>-u</option></term>
-				<listitem>
-					<para>Temperature lower bound (<parameter>0.1</parameter>).</para>
-				</listitem>
-			</varlistentry>
-      
-			<varlistentry>
-				<term><option>-p</option></term>
-				<listitem>
-					<para>Print progress information at each iteration.</para>
-				</listitem>
-			</varlistentry>
-      
-			<varlistentry>
-				<term><option>-m</option></term>
-				<listitem>
-					<para>Column-sampling moves per site-sampling move (<parameter>1.0</parameter>).</para>
-				</listitem>
-			</varlistentry>
-      
-			<varlistentry>
-				<term><option>-x</option></term>
-				<listitem>
-					<para>Site sampling algorithm: <parameter>0</parameter>=FAST <parameter>1</parameter>=SLOW <parameter>2</parameter>=FFT (<parameter>0</parameter>).</para>
-				</listitem>
-			</varlistentry>
-      
-			<varlistentry>
-				<term><option>-s</option></term>
-				<listitem>
-					<para>Seed for pseudo-random numbers (<parameter>1</parameter>).</para>
-				</listitem>
-			</varlistentry>
-		</variablelist>
-	</refsect1>
-
-	<refsect1 id="see_also">
-		<title>SEE ALSO</title>
-		<!-- In alpabetical order. -->
-		<para><citerefentry>
-				<refentrytitle>glam2format</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2mask</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2-purge</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2scan</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry></para>
-		<para>The full Hypertext documentation of GLAM2 is available online at <ulink url="http://bioinformatics.org.au/glam2/">http://bioinformatics.org.au/glam2/</ulink> or on this computer in <filename class="directory">/usr/share/doc/glam2/</filename>.</para>
-	</refsect1>
-  
-  <refsect1 id="ref">
-    <title>REFERENCE</title>
-    <para>
-      If you use GLAM2, please cite: MC Frith, NFW Saunders, B Kobe, TL Bailey (2008) Discovering sequence motifs with arbitrary insertions and deletions, PLoS Computational Biology (in press).
-    </para>
-  </refsect1>
-</refentry>
diff --git a/debian/glam2.doc-base.method b/debian/glam2.doc-base.method
index e69cfc9..f85062d 100644
--- a/debian/glam2.doc-base.method
+++ b/debian/glam2.doc-base.method
@@ -6,4 +6,4 @@ Abstract: This manual explains in detail
  the statistical methods used in GLAM2.
 
 Format: PDF
-Files: /usr/share/doc/glam2/GLAM2_method.pdf
+Files: /usr/share/doc/glam2/GLAM2_method.pdf.gz
diff --git a/debian/glam2-purge.1 b/debian/glam2_manpages/glam2-purge.1
similarity index 100%
rename from debian/glam2-purge.1
rename to debian/glam2_manpages/glam2-purge.1
diff --git a/debian/glam2.1 b/debian/glam2_manpages/glam2.1
similarity index 100%
copy from debian/glam2.1
copy to debian/glam2_manpages/glam2.1
diff --git a/debian/glam2.1 b/debian/glam2_manpages/glam2fft.1
similarity index 95%
rename from debian/glam2.1
rename to debian/glam2_manpages/glam2fft.1
index fd5177d..456c8f4 100644
--- a/debian/glam2.1
+++ b/debian/glam2_manpages/glam2fft.1
@@ -11,10 +11,10 @@
 .\" disable justification (adjust text to left margin only)
 .ad l
 .SH "NAME"
-glam2 \- Gapped Local Alignment of Motifs
+glam2fft \- Gapped Local Alignment of Motifs using fftw3 library
 .SH "SYNOPSIS"
 .HP 6
-\fBglam2\fR [\fBoptions\fR] \fBalphabet\fR \fImy_seqs\&.fa\fR
+\fBglam2fft\fR [\fBoptions\fR] \fBalphabet\fR \fImy_seqs\&.fa\fR
 .PP
 An alphabet other than
 \fIp\fR
@@ -24,6 +24,8 @@ is interpreted as the name of an alphabet file\&.
 .SH "DESCRIPTION"
 .PP
 GLAM2 is a software package for finding motifs in sequences, typically amino\-acid or nucleotide sequences\&. A motif is a re\-occurring sequence pattern: typical examples are the TATA box and the CAAX prenylation motif\&. The main innovation of GLAM2 is that it allows insertions and deletions in motifs\&.
+.PP
+This version is using fftw3 library.
 .SH "OPTIONS (DEFAULT SETTINGS)"
 .PP
 \fB\-h\fR
diff --git a/debian/glam2format.1 b/debian/glam2_manpages/glam2format.1
similarity index 100%
rename from debian/glam2format.1
rename to debian/glam2_manpages/glam2format.1
diff --git a/debian/glam2_manpages/glam2html.1 b/debian/glam2_manpages/glam2html.1
new file mode 100644
index 0000000..127ecf4
--- /dev/null
+++ b/debian/glam2_manpages/glam2html.1
@@ -0,0 +1,33 @@
+.TH "GLAM2HTML" "1" "06/20/2012" "GLAM2 1056" "glam2 Manual"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
+glam2html \- convert GLAM2 output to html
+.SH "SYNOPSIS"
+.HP 10
+\fBglam2html\fR 
+.SH "DESCRIPTION"
+.PP
+
+\fBglam2html\fR
+reads GLAM2 output from STDIN and writes HTML output to STDOUT.
+.SH "REFERENCE"
+.PP
+If you use GLAM2, please cite: MC Frith, NFW Saunders, B Kobe, TL Bailey (2008) Discovering sequence motifs with arbitrary insertions and deletions, PLoS Computational Biology (in press)\&.
+.SH "AUTHORS"
+.PP
+\fBMartin Frith\fR
+.sp -1n
+.IP "" 4
+Author of GLAM2\&.
+.PP
+\fBTimothy Bailey\fR
+.sp -1n
+.IP "" 4
+Author of GLAM2\&.
+.SH "COPYRIGHT"
+.PP
+The source code and the documentation of GLAM2 are released in the public domain\&.
+.sp
diff --git a/debian/glam2mask.1 b/debian/glam2_manpages/glam2mask.1
similarity index 100%
rename from debian/glam2mask.1
rename to debian/glam2_manpages/glam2mask.1
diff --git a/debian/glam2_manpages/glam2psfm.1 b/debian/glam2_manpages/glam2psfm.1
new file mode 100644
index 0000000..846c081
--- /dev/null
+++ b/debian/glam2_manpages/glam2psfm.1
@@ -0,0 +1,34 @@
+.TH "GLAM2PSFM" "1" "06/20/2012" "GLAM2 1056" "glam2 Manual"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
+glam2psfm \- convert GLAM2 output to html
+.SH "SYNOPSIS"
+.HP 10
+\fBglam2psfm\fR <filename>
+.SH "DESCRIPTION"
+.PP
+
+\fBglam2psfm\fR
+reads glam2 output from <filename> and writes it in MEME's PSFM format. 
+This can be used as input to TOMTOM.
+.SH "REFERENCE"
+.PP
+If you use GLAM2, please cite: MC Frith, NFW Saunders, B Kobe, TL Bailey (2008) Discovering sequence motifs with arbitrary insertions and deletions, PLoS Computational Biology (in press)\&.
+.SH "AUTHORS"
+.PP
+\fBMartin Frith\fR
+.sp -1n
+.IP "" 4
+Author of GLAM2\&.
+.PP
+\fBTimothy Bailey\fR
+.sp -1n
+.IP "" 4
+Author of GLAM2\&.
+.SH "COPYRIGHT"
+.PP
+The source code and the documentation of GLAM2 are released in the public domain\&.
+.sp
diff --git a/debian/glam2scan.1 b/debian/glam2_manpages/glam2scan.1
similarity index 100%
rename from debian/glam2scan.1
rename to debian/glam2_manpages/glam2scan.1
diff --git a/debian/glam2_manpages/glam2scan2html.1 b/debian/glam2_manpages/glam2scan2html.1
new file mode 100644
index 0000000..dc1e2ef
--- /dev/null
+++ b/debian/glam2_manpages/glam2scan2html.1
@@ -0,0 +1,33 @@
+.TH "GLAM2SCAN2HTML" "1" "06/20/2012" "GLAM2 1056" "glam2 Manual"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
+glam2scan2html \- convert GLAM2SCAN output to html
+.SH "SYNOPSIS"
+.HP 10
+\fBglam2scan2html\fR 
+.SH "DESCRIPTION"
+.PP
+
+\fBglam2scan2html\fR
+reads GLAM2SCAN output from STDIN and writes an HTML output to STDOUT.
+.SH "REFERENCE"
+.PP
+If you use GLAM2, please cite: MC Frith, NFW Saunders, B Kobe, TL Bailey (2008) Discovering sequence motifs with arbitrary insertions and deletions, PLoS Computational Biology (in press)\&.
+.SH "AUTHORS"
+.PP
+\fBMartin Frith\fR
+.sp -1n
+.IP "" 4
+Author of GLAM2\&.
+.PP
+\fBTimothy Bailey\fR
+.sp -1n
+.IP "" 4
+Author of GLAM2\&.
+.SH "COPYRIGHT"
+.PP
+The source code and the documentation of GLAM2 are released in the public domain\&.
+.sp
diff --git a/debian/glam2format.1.xml b/debian/glam2format.1.xml
deleted file mode 100644
index cf04102..0000000
--- a/debian/glam2format.1.xml
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?xml-stylesheet type="text/xsl"
-	href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
-	"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
-
-<!-- Process this file with an XSLT processor, e.g. xsltproc:    -->
-<!-- `xsltproc \
-      -''-nonet \
-      -''-param man.charmap.use.subset "0" \
-      -''-param make.year.ranges "1" \
-      -''-param make.single.year.ranges "1" \
-      manpage.xml'                                               -->
-
-  <!ENTITY dhfirstname "Charles">
-  <!ENTITY dhsurname   "Plessy">
-  <!ENTITY dhemail     "plessy at debian.org">
-  <!ENTITY dhusername  "&dhfirstname; &dhsurname;">
-  <!ENTITY dhrelease   "1056">
-  <!ENTITY dhtitle     "glam2 Manual">
-  <!ENTITY dhucpackage "GLAM2FORMAT">
-  <!ENTITY dhpackage   "glam2format">
-  <!ENTITY dhproduct   "GLAM2">
-  <!ENTITY dhsection   "1">
-
-]>
-
-<refentry>
-	<refentryinfo>
-		<title>&dhtitle;</title>
-		<productname>&dhproduct;</productname>
-		<releaseinfo role="version">&dhrelease;</releaseinfo>
-		<authorgroup>
-			<author>
-				<firstname>Martin</firstname>
-        <firstname>C</firstname>
-				<surname>Frith</surname>
-				<contrib>Author of GLAM2.</contrib>
-			</author>
-			<author>
-        <firstname>Timothy</firstname>
-        <firstname>L</firstname>
-        <surname>Bailey</surname>
-        <contrib>Author of GLAM2.</contrib>
-      </author>
-      <author>
-				<firstname>&dhfirstname;</firstname>
-				<surname>&dhsurname;</surname>
-				<contrib>Formatted this manpage in DocBook XML for the Debian distribution.</contrib>
-				<address>
-					<email>&dhemail;</email>
-				</address>
-			</author>
-		</authorgroup>
-		<legalnotice>
-			<para>The source code and the documentation of GLAM2 are released in the public domain.</para>
-		</legalnotice>
-	</refentryinfo>
-	<refmeta>
-		<refentrytitle>&dhucpackage;</refentrytitle>
-		<manvolnum>&dhsection;</manvolnum>
-	</refmeta>
-	<refnamediv>
-		<refname>&dhpackage;</refname>
-		<refpurpose>converts GLAM2 motifs to FASTA or MSF format</refpurpose>
-	</refnamediv>
-	<refsynopsisdiv>
-		<cmdsynopsis>
-			<command>&dhpackage;</command>
-			<arg choice="opt"><option>options</option></arg>
-			<arg choice="plain"><option>my_format</option></arg>
-			<arg choice="plain"><replaceable>my_motif.glam2</replaceable></arg>
-		</cmdsynopsis>
-    <para>Formats: fasta, msf.</para>
-	</refsynopsisdiv>
-  
-	<refsect1 id="description">
-		<title>DESCRIPTION</title>
-		<para>
-      <command>&dhpackage;</command> reads in a motif found by <command>glam2</command>, and writes it in a standard alignment format (FASTA-with-gaps or MSF). This enables the alignment to be passed to third-party software, including graphical visualization tools such as Kalignvu, Boxshade, and WebLogo. On the other hand, not all the motif information is preserved: in particular, the key positions are lost. Only the top motif in <command>glam2</command> output is converted.
-    </para>
-	</refsect1>
-  
-	<refsect1 id="options">
-		<title>OPTIONS (default settings)</title>
-		<variablelist>
-			<!-- Use the variablelist.term.separator and the
-			     variablelist.term.break.after parameters to
-			     control the term elements. -->
-      
-			<varlistentry>
-				<term><option>-o</option></term>
-				<listitem>
-					<para>Output file (<parameter>stdout</parameter>).</para>
-				</listitem>
-			</varlistentry>
-      
-			<varlistentry>
-				<term><option>-c</option></term>
-				<listitem>
-					<para>Make a compact alignment. By default, residues that are inserted between key positions are written as unaligned with each other. This best reflects <command>glam2</command>'s intention, but it can make the alignment large and full of gaps. With <varname>-c</varname>, inserted residues are written as arbitrarily aligned with each other, just as they appear in the <command>glam2</command> output.</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-f</option></term>
-				<listitem>
-					<para>Sequence file to make a <quote>global</quote> alignment by adding flanking sequences from the original FASTA-format sequence file. The flanking sequences will be written as either unaligned with each other or arbitrarily aligned, depending on the <varname>-c</varname> option. The sequences should have unique names and their order should be unchanged.</para>
-				</listitem>
-			</varlistentry>
-		</variablelist>
-	</refsect1>
-
-	<refsect1 id="see_also">
-		<title>SEE ALSO</title>
-		<!-- In alpabetical order. -->
-		<para><citerefentry><refentrytitle>boxshade</refentrytitle>
-        <manvolnum>1</manvolnum></citerefentry>, <citerefentry>
-				<refentrytitle>glam2</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2mask</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2-purge</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2scan</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry></para>
-		<para>The full Hypertext documentation of GLAM2 is available online at <ulink url="http://bioinformatics.org.au/glam2/">http://bioinformatics.org.au/glam2/</ulink> or on this computer in <filename class="directory">/usr/share/doc/glam2/</filename>.</para>
-	</refsect1>
-  
-  <refsect1 id="ref">
-    <title>REFERENCE</title>
-    <para>
-      If you use GLAM2, please cite: MC Frith, NFW Saunders, B Kobe, TL Bailey (2008) Discovering sequence motifs with arbitrary insertions and deletions, PLoS Computational Biology (in press).
-    </para>
-  </refsect1>
-</refentry>
diff --git a/debian/glam2mask.1.xml b/debian/glam2mask.1.xml
deleted file mode 100644
index 16178ba..0000000
--- a/debian/glam2mask.1.xml
+++ /dev/null
@@ -1,131 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?xml-stylesheet type="text/xsl"
-	href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
-	"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
-
-<!-- Process this file with an XSLT processor, e.g. xsltproc:    -->
-<!-- `xsltproc \
-      -''-nonet \
-      -''-param man.charmap.use.subset "0" \
-      -''-param make.year.ranges "1" \
-      -''-param make.single.year.ranges "1" \
-      manpage.xml'                                               -->
-
-  <!ENTITY dhfirstname "Charles">
-  <!ENTITY dhsurname   "Plessy">
-  <!ENTITY dhemail     "plessy at debian.org">
-  <!ENTITY dhusername  "&dhfirstname; &dhsurname;">
-  <!ENTITY dhrelease   "1056">
-  <!ENTITY dhtitle     "glam2 Manual">
-  <!ENTITY dhucpackage "GLAM2MASK">
-  <!ENTITY dhpackage   "glam2mask">
-  <!ENTITY dhproduct   "GLAM2">
-  <!ENTITY dhsection   "1">
-
-]>
-
-<refentry>
-	<refentryinfo>
-		<title>&dhtitle;</title>
-		<!-- Better put a suite name instead of &dhpackage; into productname -->
-		<productname>&dhproduct;</productname>
-		<releaseinfo role="version">&dhrelease;</releaseinfo>
-		<authorgroup>
-			<author>
-				<firstname>Martin</firstname>
-        <firstname>C</firstname>
-				<surname>Frith</surname>
-				<contrib>Author of GLAM2.</contrib>
-			</author>
-			<author>
-        <firstname>Timothy</firstname>
-        <firstname>L</firstname>
-        <surname>Bailey</surname>
-        <contrib>Author of GLAM2.</contrib>
-      </author>
-      <author>
-				<firstname>&dhfirstname;</firstname>
-				<surname>&dhsurname;</surname>
-				<contrib>Formatted this manpage in DocBook XML for the Debian distribution.</contrib>
-				<address>
-					<email>&dhemail;</email>
-				</address>
-			</author>
-		</authorgroup>
-		<legalnotice>
-			<para>The source code and the documentation of GLAM2 are released in the public domain.</para>
-		</legalnotice>
-	</refentryinfo>
-	<refmeta>
-		<refentrytitle>&dhucpackage;</refentrytitle>
-		<manvolnum>&dhsection;</manvolnum>
-	</refmeta>
-	<refnamediv>
-		<refname>&dhpackage;</refname>
-		<refpurpose>masks a GLAM2 motif in sequences</refpurpose>
-	</refnamediv>
-	<refsynopsisdiv>
-		<cmdsynopsis>
-			<command>&dhpackage;</command>
-			<arg choice="opt"><option>options</option></arg>
-			<arg choice="plain"><replaceable>my_motif.glam2</replaceable></arg>
-			<arg choice="plain"><replaceable>my_seqs.fa</replaceable></arg>
-		</cmdsynopsis>
-	</refsynopsisdiv>
-  
-	<refsect1 id="description">
-		<title>DESCRIPTION</title>
-		<para>
-    <command>&dhpackage;</command> masks a <command>glam2</command> motif out of sequences, so that weaker motifs can be found. Masking replaces residues aligned to key positions with the symbol 'x'. By alternately applying <command>glam2</command> and <command>glam2mask</command> several times, it is possible to find the strongest, second-strongest, third-strongest, etc. motifs in a set of sequences.
-    </para>
-	</refsect1>
-  
-	<refsect1 id="options">
-		<title>OPTIONS (default settings)</title>
-		<variablelist>
-			<!-- Use the variablelist.term.separator and the
-			     variablelist.term.break.after parameters to
-			     control the term elements. -->
-			<varlistentry>
-				<term><option>-o</option></term>
-				<listitem>
-					<para>Output file (<parameter>stdout</parameter>).</para>
-				</listitem>
-			</varlistentry>
-     
-			<varlistentry>
-				<term><option>-x</option></term>
-				<listitem>
-					<para>Mask character (<parameter>x</parameter>).</para>
-				</listitem>
-			</varlistentry>
-		</variablelist>
-	</refsect1>
-  
-	<refsect1 id="see_also">
-		<title>SEE ALSO</title>
-		<!-- In alpabetical order. -->
-		<para><citerefentry>
-				<refentrytitle>glam2format</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2-purge</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2scan</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry></para>
-		<para>The full Hypertext documentation of GLAM2 is available online at <ulink url="http://bioinformatics.org.au/glam2/">http://bioinformatics.org.au/glam2/</ulink> or on this computer in <filename class="directory">/usr/share/doc/glam2/</filename>.</para>
-	</refsect1>
-  
-  <refsect1 id="ref">
-    <title>REFERENCE</title>
-    <para>
-      If you use GLAM2, please cite: MC Frith, NFW Saunders, B Kobe, TL Bailey (2008) Discovering sequence motifs with arbitrary insertions and deletions, PLoS Computational Biology (in press).
-    </para>
-  </refsect1>
-</refentry>
diff --git a/debian/glam2scan.1.xml b/debian/glam2scan.1.xml
deleted file mode 100644
index 46a1d24..0000000
--- a/debian/glam2scan.1.xml
+++ /dev/null
@@ -1,182 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?xml-stylesheet type="text/xsl"
-	href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
-	"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
-
-<!-- Process this file with an XSLT processor, e.g. xsltproc:    -->
-<!-- `xsltproc \
-      -''-nonet \
-      -''-param man.charmap.use.subset "0" \
-      -''-param make.year.ranges "1" \
-      -''-param make.single.year.ranges "1" \
-      manpage.xml'                                               -->
-
-  <!ENTITY dhfirstname "Charles">
-  <!ENTITY dhsurname   "Plessy">
-  <!ENTITY dhemail     "plessy at debian.org">
-  <!ENTITY dhusername  "&dhfirstname; &dhsurname;">
-  <!ENTITY dhrelease   "1056">
-  <!ENTITY dhtitle     "glam2 Manual">
-  <!ENTITY dhucpackage "GLAM2SCAN">
-  <!ENTITY dhpackage   "glam2scan">
-  <!ENTITY dhproduct   "GLAM2">
-  <!ENTITY dhsection   "1">
-
-]>
-
-<refentry>
-	<refentryinfo>
-		<title>&dhtitle;</title>
-		<!-- Better put a suite name instead of &dhpackage; into productname -->
-		<productname>&dhproduct;</productname>
-		<releaseinfo role="version">&dhrelease;</releaseinfo>
-		<authorgroup>
-			<author>
-				<firstname>Martin</firstname>
-        <firstname>C</firstname>
-				<surname>Frith</surname>
-				<contrib>Author of GLAM2.</contrib>
-			</author>
-			<author>
-        <firstname>Timothy</firstname>
-        <firstname>L</firstname>
-        <surname>Bailey</surname>
-        <contrib>Author of GLAM2.</contrib>
-      </author>
-      <author>
-				<firstname>&dhfirstname;</firstname>
-				<surname>&dhsurname;</surname>
-				<contrib>Formatted this manpage in DocBook XML for the Debian distribution.</contrib>
-				<address>
-					<email>&dhemail;</email>
-				</address>
-			</author>
-		</authorgroup>
-		<legalnotice>
-			<para>The source code and the documentation of GLAM2 are released in the public domain.</para>
-		</legalnotice>
-	</refentryinfo>
-	<refmeta>
-		<refentrytitle>&dhucpackage;</refentrytitle>
-		<manvolnum>&dhsection;</manvolnum>
-	</refmeta>
-	<refnamediv>
-		<refname>&dhpackage;</refname>
-		<refpurpose>finds a GLAM2 motif in a database</refpurpose>
-	</refnamediv>
-	<refsynopsisdiv>
-		<cmdsynopsis>
-			<command>&dhpackage;</command>
-			<arg choice="opt"><option>options</option></arg>
-			<arg choice="plain"><option>alphabet</option></arg>
-			<arg choice="plain"><replaceable>my_motif.glam2</replaceable></arg>
-     	<arg choice="plain"><replaceable>my_seqs.fa</replaceable></arg>
-		</cmdsynopsis>
-    <para>An alphabet other than <parameter>p</parameter> or <parameter>n</parameter> is interpreted as the name of an alphabet file.</para>
-	</refsynopsisdiv>
-  
-	<refsect1 id="description">
-		<title>DESCRIPTION</title>
-		<para>
-      <command>glam2scan</command> finds matches, in a sequence database, to a motif discovered by <command>glam2</command>. Each match receives a score, indicating how well it fits the motif.
-    </para>
-	</refsect1>
-  
-	<refsect1 id="options">
-		<title>OPTIONS (default settings)</title>
-		<variablelist>
-			<!-- Use the variablelist.term.separator and the
-			     variablelist.term.break.after parameters to
-			     control the term elements. -->
-			<varlistentry>
-				<term><option>-h</option></term>
-				<listitem>
-					<para>Show all options and their default settings.</para>
-				</listitem>
-			</varlistentry>
-      
-			<varlistentry>
-				<term><option>-o</option></term>
-				<listitem>
-					<para>Output file (<parameter>stdout</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-n</option></term>
-				<listitem>
-					<para>Number of alignments to report (<parameter>25</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-2</option></term>
-				<listitem>
-					<para>Examine both strands - forward and reverse complement.</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-D</option></term>
-				<listitem>
-					<para>Deletion pseudocount (<parameter>0.1</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-E</option></term>
-				<listitem>
-					<para>No-deletion pseudocount (<parameter>2.0</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-I</option></term>
-				<listitem>
-					<para>Insertion pseudocount (<parameter>0.02</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-J</option></term>
-				<listitem>
-					<para>No-insertion pseudocount (<parameter>1.0</parameter>).</para>
-				</listitem>
-			</varlistentry>
-
-			<varlistentry>
-				<term><option>-d</option></term>
-				<listitem>
-					<para>Dirichlet mixture file.</para>
-				</listitem>
-			</varlistentry>
-		</variablelist>
-	</refsect1>
-
-	<refsect1 id="see_also">
-		<title>SEE ALSO</title>
-		<!-- In alpabetical order. -->
-		<para><citerefentry>
-				<refentrytitle>glam2format</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2mask</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2-purge</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry>, <citerefentry>
-				<refentrytitle>glam2</refentrytitle>
-				<manvolnum>1</manvolnum>
-			</citerefentry></para>
-		<para>The full Hypertext documentation of GLAM2 is available online at <ulink url="http://bioinformatics.org.au/glam2/">http://bioinformatics.org.au/glam2/</ulink> or on this computer in <filename class="directory">/usr/share/doc/glam2/</filename>.</para>
-	</refsect1>
-  
-  <refsect1 id="ref">
-    <title>REFERENCE</title>
-    <para>
-      If you use GLAM2, please cite: MC Frith, NFW Saunders, B Kobe, TL Bailey (2008) Discovering sequence motifs with arbitrary insertions and deletions, PLoS Computational Biology (in press).
-    </para>
-  </refsect1>
-</refentry>
diff --git a/debian/install b/debian/install
index 9402da9..94a8e64 100644
--- a/debian/install
+++ b/debian/install
@@ -1,5 +1,7 @@
-src/glam2format /usr/bin/
-src/glam2mask /usr/bin/
-src/glam2scan /usr/bin/
-src/glam2fft /usr/bin/
-purge/purge /usr/bin
+src/glam2	usr/bin
+src/glam2format	usr/bin
+src/glam2mask	usr/bin
+src/glam2scan	usr/bin
+src/glam2fft	usr/bin
+debian/tmp_py/*	usr/bin
+# purge/purge /usr/bin
diff --git a/debian/manpages b/debian/manpages
index c742228..4c9e8e6 100644
--- a/debian/manpages
+++ b/debian/manpages
@@ -1,5 +1 @@
-debian/glam2.1
-debian/glam2format.1
-debian/glam2mask.1
-debian/glam2-purge.1
-debian/glam2scan.1
+debian/glam2_manpages/*.1
diff --git a/debian/patches/fix_fftw3_build.patch b/debian/patches/fix_fftw3_build.patch
new file mode 100644
index 0000000..90d62a2
--- /dev/null
+++ b/debian/patches/fix_fftw3_build.patch
@@ -0,0 +1,15 @@
+Author: Andreas Tille <tille at debian.org>
+LastChanged: Tue, 12 Nov 2013 15:17:01 +0100
+Description: fftw2 is no glam2 header file
+
+--- a/src/glam2_convolve.h
++++ b/src/glam2_convolve.h
+@@ -3,7 +3,7 @@
+ #ifndef GLAM2_CONVOLVE_H
+ #define GLAM2_CONVOLVE_H
+ 
+-#include "glam2_fftw3.h"
++#include "fftw3.h"
+ 
+ typedef struct {
+   int size;
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
deleted file mode 100644
index 0efecab..0000000
--- a/debian/patches/hardening.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-LastChanged: Fri, 15 Nov 2013 15:07:59 +0100
-Description: propagate hardening options
-
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -24,32 +24,32 @@ FSRC = glam2format.c alignment.c fasta.c
- MSRC = glam2mask.c alignment.c fasta.c util.c
- 
- # Compiler options:
--CFLAGS = -Wall -O3
-+CFLAGS += -Wall -O3
- 
- # Default action: compile glam2, glam2scan, glam2format, and glam2mask
- all: glam2 glam2scan glam2format glam2mask
- 
- # Command for compiling glam2:
- glam2: $(GSRC) *.h Makefile
--	cc $(CFLAGS) -o glam2 $(GSRC) -lm
-+	cc $(CFLAGS) -o glam2 $(GSRC) -lm $(LDFLAGS)
- 
- # Command for compiling glam2scan:
- glam2scan: $(SSRC) *.h Makefile
--	cc $(CFLAGS) -o glam2scan $(SSRC) -lm
-+	cc $(CFLAGS) -o glam2scan $(SSRC) -lm $(LDFLAGS)
- 
- # Command for compiling glam2format:
- glam2format: $(FSRC) *.h Makefile
--	cc $(CFLAGS) -o glam2format $(FSRC) -lm
-+	cc $(CFLAGS) -o glam2format $(FSRC) -lm $(LDFLAGS)
- 
- # Command for compiling glam2mask:
- glam2mask: $(MSRC) *.h Makefile
--	cc $(CFLAGS) -o glam2mask $(MSRC) -lm
-+	cc $(CFLAGS) -o glam2mask $(MSRC) -lm $(LDFLAGS)
- 
- # Here follow commands for compiling special versions of the programs
- 
- # Compile glam2 including FFT algorithm (requires FFTW to be installed):
- glam2fft: $(GSRC) convolve.c *.h Makefile
--	cc $(CFLAGS) -DFFT -o glam2fft $(GSRC) convolve.c -lm -lfftw3
-+	cc $(CFLAGS) -DFFT -o glam2fft $(GSRC) convolve.c -lm -lfftw3 $(LDFLAGS)
- 
- # Compile for debugging with gdb or valgrind, with extra compiler warnings:
- glam2_d: $(GSRC) *.h Makefile
---- a/purge/Makefile
-+++ b/purge/Makefile
-@@ -1,6 +1,6 @@
- # Compiler options:
--CFLAGS = -Wall -O3
-+CFLAGS += -Wall -O3
- 
- # Command for compiling purge:
- purge: *.c *.h Makefile
--	cc $(CFLAGS) -o purge *.c -lm
-+	cc $(CFLAGS) -o purge *.c -lm $(LDFLAGS)
diff --git a/debian/patches/series b/debian/patches/series
index 814900f..53593d5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-hardening.patch
+fix_fftw3_build.patch
diff --git a/debian/rules b/debian/rules
index 3ce8631..2bffcda 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,31 +1,26 @@
 #!/usr/bin/make -f
 
-DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
-BINDIR = $(CURDIR)/debian/$(DEBPKGNAME)/usr/bin
-SRCDIR=src
-
 %:
-	dh $@ --sourcedirectory=$(SRCDIR)
-
-override_dh_auto_build:
-	dh_auto_build
-	make --directory=$(SRCDIR) glam2fft
-	make --directory=purge
+	dh $@
 
-override_dh_compress:
-	dh_compress --exclude=.pdf
+override_dh_auto_clean:
+	dh_auto_clean
+	cd src; make distclean; for ownfile in `ls ../debian/debian-compile/*` ; do rm -f `basename $${ownfile}` ; done
+	rm -rf debian/tmp_py
 
-override_dh_install:
-	dh_install
-	# purge is renamed glam2-purge to avoid namespace problems.
-	mv $(BINDIR)/purge $(BINDIR)/glam2-purge
-	# FFT is enabled by default in Debian.
-	mv $(BINDIR)/glam2fft $(BINDIR)/glam2
-
-override_dh_clean:
-	dh_clean
-	rm -f  purge/*.o purge/purge src/*.o src/glam2 src/glam2mask scr/glam2format src/glam2scan src/glam2fft src/glam2format
+override_dh_auto_build:
+	cp -a debian/debian-compile/* src
+	cd src; make CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
+	mkdir debian/tmp_py
+	for script in `ls scripts/*.py.in` ; do \
+	    sed 's#@WHICHPYTHON@#/usr/bin/python#' $${script} >> debian/tmp_py/`basename $${script} .py.in` ; \
+	done
 
+# Remark: The following uscan command requires devscripts > 2.12.4 which is not
+#         yet released at the time of this package release.  The code can be obtained
+#         via
+#   git clone git://tille@git.debian.org/git/users/tille/devscripts.git
+#         and then use scripts/uscan.pl
 get-orig-source:
 	mkdir -p ../tarballs
-	uscan --verbose --force-download --repack --destdir=../tarballs
+	uscan --verbose --force-download --destdir=../tarballs --repack-compression xz
diff --git a/debian/watch b/debian/watch
index 9c89ab9..28c59e2 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,3 @@
-version=4
-opts=dversionmangle=s/.*/0.No-Site/ \
-  https://people.debian.org/~eriberto/ FakeWatchNoUpstreamSiteForThisPackage-(\d\S+)\.gz
+version=3
+opts="uversionmangle=s/_/./,dversionmangle=s/\+dfsg//g" \
+  http://ebi.edu.au/ftp/software/MEME/index.html .*/meme[_\-](\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/glam2.git



More information about the debian-med-commit mailing list