--- amap-align-2.2.orig/debian/amap.1
+++ amap-align-2.2/debian/amap.1
@@ -0,0 +1,211 @@
+.\"     Title: AMAP
+.\"    Author: Ariel Schwartz <sariel@cs.berkeley.edu>
+.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
+.\"      Date: 03/31/2008
+.\"    Manual: User Manual
+.\"    Source: amap 2.2
+.\"
+.TH "AMAP" "1" "03/31/2008" "amap 2.2" "User Manual"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
+amap - Protein multiple alignment by sequence annealing
+.SH "SYNOPSIS"
+.HP 5
+\fBamap\fR [\fB\fIOPTION\fR\fR] [\fIMFAFILE\fR] [\fIMFAFILE\fR]
+.SH "DESCRIPTION"
+.PP
+AMAP is a tool to perform multiple alignment of peptidic sequences\. It utilizes posterior decoding, and a sequence\-annealing alignment, instead of the traditional progressive alignment method\. It is the only alignment program that allows to control the sensitivity / specificity tradeoff\. It is based on the ProbCons source code, but uses alignment metric accuracy and eliminates the consistency transformation\.
+.PP
+In its default configuration, AMAP is tuned to maximize the expected Alignment Metric Accuracy (AMA) score \- a new alignment accuracy measure, based on a metric for the multiple\-alignment space, which integrates sensitivity and specificity into a single balanced measure\. AMA is defined as the fraction of correctly aligned residues (either to another residue or to a gap) out of the total number of residues in all the sequences\.
+.PP
+\fBamap\fR
+aligns sequences provided in MFA format\. This format consists of multiple sequences\. Each sequence in MFA format begins with a single\-line description, followed by lines of sequence data\. The description line is distinguished from the sequence data by a greater\-than (\(lq>\(rq) symbol in the first column\.
+.SH "OPTIONS"
+.PP
+\fB\-clustalw\fR
+.RS 4
+use CLUSTALW output format instead of MFA
+.RE
+.PP
+\fB\-c\fR \fB\-\-consistency\fR \fIREPS\fR
+.RS 4
+use 0 <=
+\fIREPS\fR
+<= 5 (default: 0) passes of consistency transformation
+.RE
+.PP
+\fB\-ir\fR \fB\-\-iterative\-refinement\fR \fIREPS\fR
+.RS 4
+use 0 <=
+\fIREPS\fR
+<=1000 (default: 0) passes of iterative\-refinement
+.RE
+.PP
+\fB\-pre\fR \fB\-\-pre\-training\fR \fIREPS\fR
+.RS 4
+use 0 <=
+\fIREPS\fR
+<= 20 (default: 0) rounds of pretraining
+.RE
+.PP
+\fB\-pairs\fR
+.RS 4
+generate all\-pairs pairwise alignments
+.RE
+.PP
+\fB\-viterbi\fR
+.RS 4
+use Viterbi algorithm to generate all pairs (automatically enables
+\fB\-pairs\fR)
+.RE
+.PP
+\fB\-v\fR \fB\-\-verbose\fR
+.RS 4
+Report progress while aligning (default: off)
+.RE
+.PP
+\fB\-annot\fR \fIFILENAME\fR
+.RS 4
+write annotation for multiple alignment to
+\fIFILENAME\fR
+.RE
+.PP
+\fB\-t\fR \fB\-\-train\fR \fIFILENAME\fR
+.RS 4
+compute EM transition probabilities, store in
+\fIFILENAME\fR
+(default: no training)
+.RE
+.PP
+\fB\-e\fR \fB\-\-emissions\fR
+.RS 4
+also reestimate emission probabilities (default: off)
+.RE
+.PP
+\fB\-p\fR \fB\-\-paramfile\fR \fIFILENAME\fR
+.RS 4
+read parameters from
+\fIFILENAME\fR
+(default: )
+.RE
+.PP
+\fB\-a\fR \fB\-\-alignment\-order\fR
+.RS 4
+print sequences in alignment order rather than input order (default: off)
+.RE
+.PP
+\fB\-g\fR \fB\-\-gap\-factor\fR \fIGF\fR
+.RS 4
+use
+\fIGF\fR
+as the gap\-factor parameter, set to 0 for best sensitivity, higher values for better specificity (default: 0\.5)
+.RE
+.PP
+\fB\-w\fR \fB\-\-edge\-weight\-threshold\fR \fIW\fR
+.RS 4
+stop the sequence annealing process when best edge has lower weight than
+\fIW\fR, set to 0 for best sensitivity, higher values for better specificity (default: 0)
+.RE
+.PP
+\fB\-prog\fR \fB\-\-progressive\fR
+.RS 4
+use progressive alignment instead of sequence annealing alignment (default: off)
+.RE
+.PP
+\fB\-noreorder\fR \fB\-\-no\-edge\-reordering\fR
+.RS 4
+disable reordering of edges during sequence annealing alignment (default: off)
+.RE
+.PP
+\fB\-maxstep\fR \fB\-\-use\-max\-stepsize\fR
+.RS 4
+use maximum improvement step size instead of tGf edge ranking (default: off)
+.RE
+.PP
+\fB\-print\fR \fB\-\-print\-posteriors\fR
+.RS 4
+only print the posterior probability matrices (default: off)
+.RE
+.PP
+\fB\-gui\fR \fISTART\fR \fISTEP\fR
+.RS 4
+print output for the AMAP Display Java based GUI (default: ) starting at weight
+\fISTART\fR
+(default: infinity) with step size
+\fISTEP\fR
+(default: )
+.RE
+.SH "EXAMPLES"
+.PP
+To run AMAP with the default options change to the
+\fIalign\fR
+directory and type:
+.PP
+
+\fB% amap <multi\-fasta\-file\-name>\fR
+.PP
+If no file name is provided the list of options are printed\.
+.PP
+In order to use the AMAP Display run AMAP with the \-gui option, and save the output to a file, then use the file as the input to AmapDisplay\. For example, type:
+.PP
+
+\fB% align/amap \-gui examples/BB12020\.tfa > examples/BB12020\.tfa\.out\fR
+.PP
+
+\fB% java \-jar display/AmapDisplay\.jar examples/BB12020\.tfa\.out\fR
+.PP
+(on Debian systems, the
+\fIexamples\fR
+directory is in
+\fI/usr/share/doc/amap\-align/examples\fR
+.SH "NOTE"
+.PP
+In older versions ( <\ 2\.0\-1) of the package for
+Debian(TM)
+systems, the
+\fBamap\fR
+command was renamed
+\fBamap\-align\fR
+because there was already another tool called
+\fBamap\fR
+(which performs some computer network diagnostics)\. A symbolic link
+\fBamap\-align\fR
+is still provided for upgrade purposes but will be removed in Debian releases posterior to Etch (Debian\ 4\.0)\.
+.SH "SEE ALSO"
+.PP
+The current version of AMAP uses the PROBCONS 1\.09 code base for some of the input/output procedures, and for the calculation of posterior probabilities (see PROBCONS\.README in
+\fI/usr/share/doc/amap\-align/\fR)\. Future releases might implement the algorithm using a new independent code base\.
+.PP
+On
+Debian(TM)
+systems,
+\fBprobcons\fR(1)
+is available in the probcons package\.
+.SH "REFERENCES"
+.PP
+For more details on AMAP and AMA, see Schwartz, Ariel S\., Myers, Eugene W\., and Pachter, Lior\. Alignment Metric Accuracy (Submitted for publication)\. For more details on sequence\-annealing, see Schwartz, Ariel S\. and Pachter, Lior\. Multiple Alignment by Sequence Annealing (Submitted for publication)\.
+.PP
+PROBCONS was published in Do, C\.B\., Mahabhashyam, M\.S\.P\., Brudno, M\., and Batzoglou, S\. 2005\. PROBCONS: Probabilistic Consistency\-based Multiple Sequence Alignment\. Genome Research 15: 330\-340\.
+.SH "AUTHORS"
+.PP
+\fBAriel Schwartz\fR <\&sariel@cs\.berkeley\.edu\&>
+.sp -1n
+.IP "" 4
+Upstream author of AMAP
+.PP
+\fBChuong Do\fR
+.sp -1n
+.IP "" 4
+Wrote Probcons, on which AMAP is based\.
+.PP
+\fBCharles Plessy>\fR <\&charles\-debian\-nospam@plessy\.org\&>
+.sp -1n
+.IP "" 4
+Wrote this manpage in DocBook XML for the Debian distribution\.
+.SH "COPYRIGHT"
+.PP
+AMAP, PROBCONS, and this manual page have been made freely available as PUBLIC DOMAIN software and hence are not subject to copyright in the United States\. This system and/or any portion of the source code may be used, modified, or redistributed without restrictions\. AMAP, PROBCONS and this manual page are distributed WITHOUT WARRANTY, express or implied\. The authors accept NO LEGAL LIABILITY OR RESPONSIBILITY for loss due to reliance on the program\.
+.sp
--- amap-align-2.2.orig/debian/copyright
+++ amap-align-2.2/debian/copyright
@@ -0,0 +1,52 @@
+X-Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat
+X-Debianized-By: Charles Plessy <charles-debian-nospam@plessy.org>
+X-Debinized-Date: Sun,  9 Jul 2006 12:53:25 +0900.
+X-Source-Downloaded-From: http://bio.math.berkeley.edu/amap/download
+X-Note: This download area as well as the homepage vanished
+X-Upstream-Author: 2005—2007 Ariel Schwartz <sariel@cs.berkeley.edu>
+
+Files: debian/*
+Copyright: © 2007 David Paleino <d.paleino@gmail.com>
+           © 2006—2008 Charles Plessy <chalres-debian-nospam@plessy.org>
+License: Same as AMAP itelf
+
+Files: display/*
+Copyright: © 2007 Michael E. Smoot
+License: GPL-2+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+X-Comment: On Debian systems, the complete text of the GNU General Public
+ License can be found in `/usr/share/common-licenses/GPL'.
+
+Files: *
+License: PD
+ The current version of AMAP uses the PROBCONS 1.09 code base for some of the
+ input/output procedures, and for the calculation of posterior probabilities
+ (see PROBCONS.README).
+ .
+ AMAP has been made  freely  available as PUBLIC DOMAIN software and hence is
+ not subject to copyright in the United States. This system and/or any portion
+ of the source code may be used, modified, or redistributed without
+ restrictions.  AMAP is distributed WITHOUT WARRANTY, express or implied.  The
+ authors accept NO LEGAL LIABILITY OR RESPONSIBILITY for loss due to reliance on
+ the program.
+ .
+ PROBCONS is copyright © 2004 Chuong Do <chuongdo@cs.stanford.edu>
+ .
+ PROBCONS has been made  freely  available  as  PUBLIC  DOMAIN software and
+ hence is not subject to copyright in the  United States.  This system and/or
+ any portion of  the  source  code may be used, modified, or redistributed
+ without restrictions.  PROBCONS is distributed WITHOUT WARRANTY, express or
+ implied.  The authors accept NO LEGAL LIABILITY OR  RESPONSIBILITY  for loss
+ due to reliance on the program.
--- amap-align-2.2.orig/debian/examples
+++ amap-align-2.2/debian/examples
@@ -0,0 +1 @@
+examples/*
--- amap-align-2.2.orig/debian/changelog
+++ amap-align-2.2/debian/changelog
@@ -0,0 +1,95 @@
+amap-align (2.2-3.4.201403120720) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Wed, 12 Mar 2014 07:20:50 +0100
+
+amap-align (2.2-3) unstable; urgency=low
+
+  * Standards-Version: 3.9.2 (no changes needed)
+  * Debhelper 8 (compat+control)
+  * debian/patches/fix-gcc-4.6.diff: Fix gcc-4.6 build error
+    Closes: #624990
+
+ -- Andreas Tille <tille@debian.org>  Mon, 02 May 2011 16:30:17 +0200
+
+amap-align (2.2-2) unstable; urgency=low
+
+  [ Charles Plessy ]
+  * Updated my email address.
+
+  [ David Paleino ]
+  * debian/control: removed myself from Uploaders
+
+  [ Andreas Tille ]
+  * debian/control:
+    - Standards-Version: 3.9.1 (no changes needed)
+    - Debhelper 7
+    - Fixed Debian Med spelling in maintainer address
+    - Commented Homepage which simply vanished and added a hint
+      about dead upstream
+  * debian/watch: deactivated useless code because the donwload area
+    vanished
+  * debian/copyright: Mention missing homepage / download
+  * debian/rules:
+    - s/dh_clean -k/dh_prep/
+    - fix permissions of example which should not be executable
+  * debian/README.{Debian,source}: added some information
+
+ -- Andreas Tille <tille@debian.org>  Thu, 13 Jan 2011 13:50:30 +0100
+
+amap-align (2.2-1) unstable; urgency=low
+
+  [ Charles Plessy ]
+  * New upstream release:
+    - Corrected DNA alignment parameters file. Improved debug output. (2.01)
+    - Includes new output for the AMAP Display Java based GUI. (2.1)
+  * debian/amap.1, debian/amap.1.xml: updated the manpage.
+  * debian/watch: changed URI to monitor.
+  * debian/patches, debian/rules, debian/control: switched to quilt.
+  * debian/patches/fix-gcc-4.3.diff: updated for version 2.2 (Closes: #468060).
+  * debian/control:
+    - Moved the 'Conflicts:' field from the source to the binary section.
+
+ -- Charles Plessy <charles-debian-nospam@plessy.org>  Thu, 10 Apr 2008 09:17:01 +0900
+
+amap-align (2.0-3) unstable; urgency=low
+
+  [ Charles Plessy ]
+  * Moved the Homepage: field out from the package's description.
+
+  [ David Paleino ]
+  * debian/amap.1 - the manpage is now generated offline: this saves
+    buildd time and B-D space.
+  * debian/control:
+    - XS-Vcs-* fields moved to Vcs-* and fixed
+    - added myself to Uploaders
+    - B-D fixed (see above)
+    - Using DM-Upload-Allowed instead of the XS- version
+  * debian/rules - minor changes
+
+  [ Andreas Tille ]
+  * Added myself as uploader
+  * Reformatted debian/NEWS according to Developers Reference,
+    section 6.3.4
+
+ -- Andreas Tille <tille@debian.org>  Wed, 20 Feb 2008 10:59:46 +0100
+
+amap-align (2.0-2) unstable; urgency=low
+
+  * Added Subversion repository URL to debian/control.
+  * Patched for building with gcc-4.3. Many thanks to Martin Michlmayr (Closes:413477)
+  * Renamed /usr/bin/amap-align to /usr/bin/amap, providing a wrapper for
+    compatibility.
+  * Included /usr/share/dpatch/dpatch.make in debian/rules.
+  * Improved manpage using the template of docbook-xsl 1.71.0.dfsg.1-1.1.
+  * Fixed double-building in debian/rules.
+
+ -- Charles Plessy <charles-debian-nospam@plessy.org>  Sat, 17 Mar 2007 22:16:34 +0900
+
+amap-align (2.0-1) unstable; urgency=low
+
+  * Initial release Closes: #366321
+
+ -- Charles Plessy <charles-debian-nospam@plessy.org>  Sun,  9 Jul 2006 12:53:25 +0900
+
--- amap-align-2.2.orig/debian/compat
+++ amap-align-2.2/debian/compat
@@ -0,0 +1 @@
+8
--- amap-align-2.2.orig/debian/rules
+++ amap-align-2.2/debian/rules
@@ -0,0 +1,74 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Build rules for the Debian package probcons
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+# Modifications by Charles Plessy during the years 2006-8 can also
+# be used without restriction.
+
+
+XP=xsltproc  \
+      -''-nonet \
+      -''-param man.charmap.use.subset "0" \
+      -''-param make.year.ranges "1" \
+      -''-param make.single.year.ranges "1" \
+      -o debian/
+
+pkg=amap-align
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+include /usr/share/quilt/quilt.make
+
+build: build-stamp
+build-stamp: patch
+	dh_testdir
+	$(MAKE) -C align
+	touch $@
+
+amap.1: debian/amap.1.xml
+	$(XP) $<
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	[ ! -f align/Makefile ] || $(MAKE) -C align clean
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+
+binary-indep: build install
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs 
+	dh_installdocs
+	dh_installexamples
+	chmod 644 debian/$(pkg)/usr/share/doc/$(pkg)/examples/BB12020.tfa
+	dh_install	align/amap debian/wrapper/amap-align usr/bin/
+	dh_installman	debian/amap.1
+	dh_link		usr/share/man/man1/amap.1 usr/share/man/man1/amap-align.1
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- amap-align-2.2.orig/debian/README.source
+++ amap-align-2.2/debian/README.source
@@ -0,0 +1,2 @@
+For instructions how to handle this source just have a look
+into /usr/share/doc/quilt/README.source.
--- amap-align-2.2.orig/debian/control
+++ amap-align-2.2/debian/control
@@ -0,0 +1,27 @@
+Source: amap-align
+Section: science
+Priority: optional
+Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
+DM-Upload-Allowed: yes
+Uploaders: Charles Plessy <plessy@debian.org>,
+ Andreas Tille <tille@debian.org>
+Build-Depends: debhelper (>= 8), quilt
+Standards-Version: 3.9.2
+Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/amap-align/trunk/?rev=0&sc=0
+Vcs-Svn: svn://svn.debian.org/svn/debian-med/trunk/packages/amap-align/trunk/
+X-Homepage: http://bio.math.berkeley.edu/amap/ - upstream seems to be dead
+
+Package: amap-align
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Conflicts: amap (<= 4.8-1)
+Description: Protein multiple alignment by sequence annealing
+ AMAP is a command line tool to perform multiple alignment of peptidic
+ sequences. It utilizes posterior decoding, and a sequence-annealing
+ alignment, instead of the traditional progressive alignment method. It is
+ the only alignment program that allows one to control the sensitivity /
+ specificity tradeoff.  It is based on the ProbCons source code, but
+ uses alignment metric accuracy and eliminates the consistency
+ transformation.
+ .
+ The java visualisation tool of AMAP 2.2 is not yet packaged in Debian.
--- amap-align-2.2.orig/debian/NEWS
+++ amap-align-2.2/debian/NEWS
@@ -0,0 +1,11 @@
+amap-align (2.0-2) unstable; urgency=low
+
+  * Previous versions of the package amap-align were shipping the program
+    under a binary name (amap-align) which differed from the original one
+    (amap) because there was already an amap program in Debian. Since this
+    program has been removed from the Etch distribution, amap-align now
+    provides its function through the program /usr/bin/align. To help the
+    transition, a symbolic link, /usr/bin/amap-align, is provided, but may
+    be supressed in the releases following Etch.
+
+ -- Charles Plessy <charles-debian-nospam@plessy.org>  Sat, 10 Mar 2007 12:59:02 +0900
--- amap-align-2.2.orig/debian/README.Debian
+++ amap-align-2.2/debian/README.Debian
@@ -0,0 +1,16 @@
+amap for Debian
+===============
+
+Please note that the previous upstream homepage
+  http://bio.math.berkeley.edu/amap/
+vanished and there is no information left about further updates
+of this program.
+
+The version hosted at
+    http://code.google.com/p/amap-align/
+is older than the Debian packaged version.
+
+If you have any knowledge about new location of the code, please
+drop a note to the address below.
+
+ -- Andreas Tille <tille@debian.org>  Thu, 13 Jan 2011 13:50:30 +0100
--- amap-align-2.2.orig/debian/docs
+++ amap-align-2.2/debian/docs
@@ -0,0 +1,2 @@
+align/PROBCONS.README
+README
--- amap-align-2.2.orig/debian/amap.1.xml
+++ amap-align-2.2/debian/amap.1.xml
@@ -0,0 +1,322 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<?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"
+"/usr/share/xml/docbook/schema/dtd/4.4/docbookx.dtd" [
+
+  <!ENTITY dhfirstname "Charles">
+  <!ENTITY dhsurname   "Plessy>">
+  <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
+  <!ENTITY dhemail     "charles-debian-nospam@plessy.org">
+  <!ENTITY dhusername  "&dhfirstname; &dhsurname;">
+  <!ENTITY dhucpackage "<refentrytitle>AMAP</refentrytitle>">
+  <!ENTITY dhpackage   "amap">
+  <!ENTITY dhrelease   "2.2">
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+  <!ENTITY dhtitle     "User Manual"> 
+]>
+
+<!-- This manpage is inspired from the template of docbook-xsl 1.71.0.dfsg.1-1.1 -->
+
+<refentry>
+  <refentryinfo>
+   <title>&dhtitle;</title>
+     <productname>&dhpackage;</productname>
+     <releaseinfo role="version">&dhrelease;</releaseinfo>
+     <authorgroup>
+       <author>
+         <firstname>Ariel</firstname>
+         <surname>Schwartz</surname>
+         <contrib>Upstream author of AMAP</contrib>
+         <address>
+           <email>sariel@cs.berkeley.edu</email>
+         </address>
+       </author>
+       <author>
+         <firstname>Chuong</firstname>
+         <surname>Do</surname>
+         <contrib>Wrote Probcons, on which AMAP is based.</contrib>
+       </author>
+       <author>
+         <firstname>&dhfirstname;</firstname>
+         <surname>&dhsurname;</surname>
+          <contrib>Wrote this manpage in DocBook XML for the Debian distribution.</contrib>
+          <address>
+            <email>&dhemail;</email>
+          </address>
+       </author>
+    </authorgroup>
+    <legalnotice>
+    <para>
+      AMAP, PROBCONS, and this manual page  have been made  freely  available as PUBLIC DOMAIN software and hence are not subject to copyright in the United States. This system and/or any portion of the source code may be used, modified, or redistributed without restrictions. AMAP, PROBCONS and this manual page are distributed WITHOUT WARRANTY, express or implied. The authors accept NO LEGAL LIABILITY OR RESPONSIBILITY for loss due to reliance on the program.
+    </para>
+    </legalnotice>
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>amap</refname>
+
+    <refpurpose>Protein multiple alignment by sequence annealing</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>amap</command>
+
+      <arg choice="opt"><option><replaceable>OPTION</replaceable></option></arg>
+
+      <arg><replaceable>MFAFILE</replaceable></arg>
+      <arg choice="opt"><replaceable>MFAFILE</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>AMAP is a tool to perform multiple alignment of peptidic sequences. It utilizes posterior decoding, and a sequence-annealing alignment, instead of the traditional progressive alignment method. It is the only alignment program that allows to control the sensitivity / specificity tradeoff. It is based on the ProbCons source code, but uses alignment metric accuracy and eliminates the consistency transformation.</para>
+
+    <para>In its default configuration, AMAP is tuned to maximize the expected Alignment Metric Accuracy (AMA) score - a new alignment accuracy measure, based on a metric for the multiple-alignment space, which integrates sensitivity and specificity into a single balanced measure. AMA is defined as the fraction of correctly aligned residues (either to another residue or to a gap) out of the total number of residues in all the sequences.</para>
+
+    <para><command>&dhpackage;</command> aligns sequences provided in MFA format. This format consists of multiple sequences. Each sequence in MFA format begins with a single-line description, followed by lines of sequence data. The description line is distinguished from the sequence data by a greater-than (<quote>&gt;</quote>) symbol in the first column.</para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>-clustalw</option>
+        </term>
+        <listitem>
+          <para>use CLUSTALW output format instead of MFA</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-c</option>
+          <option>--consistency</option> <varname>REPS</varname>
+        </term>
+        <listitem>
+          <para>use 0 &lt;= <varname>REPS</varname> &lt;= 5 (default: 0) passes of consistency transformation</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-ir</option>
+          <option>--iterative-refinement</option> <varname>REPS</varname>
+        </term>
+        <listitem>
+          <para>use 0 &lt;= <varname>REPS</varname> &lt;=1000 (default: 0) passes of iterative-refinement</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-pre</option>
+          <option>--pre-training</option> <varname>REPS</varname>
+        </term>
+        <listitem>
+          <para>use 0 &lt;= <varname>REPS</varname> &lt;= 20 (default: 0) rounds of pretraining</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>-pairs</option>
+        </term>
+        <listitem>
+          <para>generate all-pairs pairwise alignments</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>-viterbi</option>
+        </term>
+        <listitem>
+          <para>use Viterbi algorithm to generate all pairs (automatically enables <option>-pairs</option>)</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>-v</option>
+          <option>--verbose</option>
+        </term>
+        <listitem>
+          <para>Report progress while aligning (default: off)</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-annot</option> <filename>FILENAME</filename>        </term>
+        <listitem>
+          <para>write annotation for multiple alignment to <filename>FILENAME</filename></para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-t</option>
+          <option>--train</option> <filename>FILENAME</filename>
+        </term>
+        <listitem>
+          <para>compute EM transition probabilities, store in <filename>FILENAME</filename> (default: no training)</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-e</option>
+          <option>--emissions</option>
+        </term>
+        <listitem>
+          <para>also reestimate emission probabilities (default: off)</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-p</option>
+          <option>--paramfile</option> <filename>FILENAME</filename>
+        </term>
+        <listitem>
+          <para>read parameters from <filename>FILENAME</filename> (default: )</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-a</option>
+          <option>--alignment-order</option>
+        </term>
+        <listitem>
+          <para>print sequences in alignment order rather than input order (default: off)</para>
+        </listitem>
+      </varlistentry>
+      
+      <varlistentry>
+        <term><option>-g</option>
+          <option>--gap-factor</option>
+          <varname>GF</varname>
+        </term>
+        <listitem>
+          <para>use <varname>GF</varname> as the gap-factor parameter, set to 0 for best sensitivity, higher values for better specificity (default: 0.5)</para>
+        </listitem>
+      </varlistentry>
+      
+      <varlistentry>
+        <term><option>-w</option>
+          <option>--edge-weight-threshold</option>
+          <varname>W</varname>
+        </term>
+        <listitem>
+          <para>stop the sequence annealing process when best edge has lower weight than <varname>W</varname>, set to 0 for best sensitivity, higher values for better specificity (default: 0)</para>
+        </listitem>
+      </varlistentry>
+      
+      <varlistentry>
+        <term><option>-prog</option>
+          <option>--progressive</option>
+        </term>
+        <listitem>
+          <para>use progressive alignment instead of sequence annealing alignment (default: off)</para>
+        </listitem>
+      </varlistentry>
+      
+      <varlistentry>
+        <term><option>-noreorder</option>
+          <option>--no-edge-reordering</option>
+        </term>
+        <listitem>
+          <para>disable reordering of edges during sequence annealing alignment (default: off)</para>
+        </listitem>
+      </varlistentry>
+      
+      <varlistentry>
+        <term><option>-maxstep</option>
+          <option>--use-max-stepsize</option>
+        </term>
+        <listitem>
+          <para>use maximum improvement step size instead of tGf edge ranking (default: off)</para>
+        </listitem>
+      </varlistentry>
+      
+      <varlistentry>
+        <term><option>-print</option>
+          <option>--print-posteriors</option>
+        </term>
+        <listitem>
+          <para>only print the posterior probability matrices (default: off)</para>
+        </listitem>
+      </varlistentry>
+      
+      <varlistentry>
+        <term>
+	  <option>-gui</option>
+	  <varname>START</varname>
+	  <varname>STEP</varname>
+        </term>
+        <listitem>
+          <para> print output for the AMAP Display Java based GUI (default: ) starting at weight <varname>START</varname> (default: infinity) with step size <varname>STEP</varname> (default: )</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+  
+  <refsect1>
+    <title>
+      EXAMPLES
+    </title>
+    <para>
+      To run AMAP with the default options change to the <filename>align</filename> directory and type:
+    </para>
+    <para>
+        <command>% amap &lt;multi-fasta-file-name&gt;</command>
+    </para>
+    <para>
+      If no file name is provided the list of options are printed.
+    </para>
+    <para>
+      In order to use the AMAP Display run AMAP with the -gui option, and save the output to a file, then use the file as the input to AmapDisplay. For example, type:
+    </para>
+    <para>
+      <command>% align/amap -gui examples/BB12020.tfa &gt; examples/BB12020.tfa.out</command>
+    </para>
+    <para>
+      <command>% java -jar display/AmapDisplay.jar examples/BB12020.tfa.out</command>
+    </para>
+    <para>
+      (on Debian systems, the <filename>examples</filename> directory is in <filename>/usr/share/doc/amap-align/examples</filename>
+    </para>
+  </refsect1>
+  
+  <refsect1>
+    <title>
+      NOTE
+    </title>
+    
+    <para>In older versions ( &lt;&nbsp;2.0-1) of the package for &debian; systems, the <command>amap</command> command was renamed <command>amap-align</command> because there was already another tool called <command>amap</command> (which performs some computer network diagnostics). A symbolic link <command>amap-align</command> is still provided for upgrade purposes but will be removed in Debian releases posterior to Etch (Debian&nbsp;4.0).</para>
+  </refsect1>
+  
+  <refsect1>
+    <title>SEE ALSO</title>
+    <para>
+      The current version of AMAP uses the PROBCONS 1.09 code base for some of the input/output procedures, and for the calculation of posterior probabilities (see PROBCONS.README in <filename>/usr/share/doc/amap-align/</filename>). Future releases might implement the algorithm using a new independent code base.
+    </para>
+    
+    <para>
+      On &debian; systems, <citerefentry><refentrytitle>probcons</refentrytitle><manvolnum>1</manvolnum></citerefentry> is available in the probcons package.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>REFERENCES</title>
+    <para>
+      For more details on AMAP and AMA, see Schwartz, Ariel S., Myers, Eugene W., and Pachter, Lior. Alignment Metric Accuracy (Submitted for publication). For more details on sequence-annealing, see Schwartz, Ariel S. and Pachter, Lior. Multiple Alignment by Sequence Annealing (Submitted for publication).
+    </para>
+
+    <para>
+      PROBCONS was published in Do, C.B., Mahabhashyam, M.S.P., Brudno, M., and Batzoglou, S. 2005. PROBCONS: Probabilistic Consistency-based Multiple Sequence Alignment. Genome Research 15: 330-340.
+    </para>
+  </refsect1>
+  
+</refentry>
--- amap-align-2.2.orig/debian/watch
+++ amap-align-2.2/debian/watch
@@ -0,0 +1,7 @@
+## Upstream homepage vanished - deactivate watch info
+#version=3
+#http://baboon.math.berkeley.edu/amap/download/ amap\.(.*)\.tar\.gz
+#
+# Please note: The version hosted at
+#    http://code.google.com/p/amap-align/
+# is older than the Debian packaged version
--- amap-align-2.2.orig/debian/wrapper/amap-align
+++ amap-align-2.2/debian/wrapper/amap-align
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+{
+	echo "AMAP is now available under /usr/bin/amap."
+	echo "This wrapper (/usr/bin/amap-align) will be removed in the future."
+} >&2
+
+exec /usr/bin/amap "$@"
--- amap-align-2.2.orig/debian/patches/fix-gcc-4.3.diff
+++ amap-align-2.2/debian/patches/fix-gcc-4.3.diff
@@ -0,0 +1,33 @@
+Description: Allows building with gcc-4.3.
+Author: Martin Michlmayr (http://bugs.debian.org/413477)
+        Anibal Avelar (http://bugs.debian.org/468060)
+Forwarded: Ariel Schwartz <sariel@cs.berkeley.edu>
+--- a/align/Amap.cc
++++ b/align/Amap.cc
+@@ -12,6 +12,8 @@
+ #include "ProbabilisticModel.h"
+ #include "EvolutionaryTree.h"
+ #include "SparseMatrix.h"
++#include <limits>
++#include <climits>
+ #include <string>
+ #include <sstream>
+ #include <iomanip>
+@@ -23,6 +25,7 @@
+ #include <cstdlib>
+ #include <cerrno>
+ #include <iomanip>
++#include <cstring>
+ 
+ string parametersInputFilename = "";
+ string parametersOutputFilename = "no training";
+--- a/align/MultiSequenceDag.h
++++ b/align/MultiSequenceDag.h
+@@ -13,6 +13,7 @@
+ #include <map>
+ #include <queue>
+ #include <iostream>
++#include <limits>
+ #include "MultiSequence.h"
+ #include "SparseMatrix.h"
+ 
--- amap-align-2.2.orig/debian/patches/series
+++ amap-align-2.2/debian/patches/series
@@ -0,0 +1,2 @@
+fix-gcc-4.3.diff
+fix-gcc-4.6.diff
--- amap-align-2.2.orig/debian/patches/fix-gcc-4.6.diff
+++ amap-align-2.2/debian/patches/fix-gcc-4.6.diff
@@ -0,0 +1,10 @@
+--- amap-align-2.2.orig/align/SafeVector.h
++++ amap-align-2.2/align/SafeVector.h
+@@ -10,6 +10,7 @@
+ 
+ #include <cassert>
+ #include <vector>
++#include <cstddef>
+ 
+ /////////////////////////////////////////////////////////////////
+ // SafeVector
--- amap-align-2.2.orig/debian/patches/rename-amap.diff
+++ amap-align-2.2/debian/patches/rename-amap.diff
@@ -0,0 +1,18 @@
+Since version 2.0-2, this patch is not applied anymore, because the old
+amap package related to networking has been removed from Debian.
+--- a/align/Amap.cc
++++ b/align/Amap.cc
+@@ -660,7 +660,12 @@
+          << "files README and README.PROBCONS for details." << endl
+          << endl
+          << "Usage:" << endl
+-         << "       amap [OPTION]... [MFAFILE]..." << endl
++         << "       amap-align [OPTION]... [MFAFILE]..." << endl
++         << endl
++         << "Note:" << endl
++         << "On Debian systems, amap is renamed amap-align because there is already" << endl
++         << "an amap program in our archives. On other systems, it is possible that " << endl
++         << "you will find this program under its original amap name." << endl
+          << endl
+          << "Description:" << endl
+          << "       Align sequences in MFAFILE(s) and print result to standard output" << endl
