
Near optimal alignment web
Version:  rel-2-1
2004/06/14 19:12:08  
==========================

This document describes the setup procedures necessary running the near 
optimal alignment generation and display software from a website.  
The website primarily consists of a single CGI script that runs the 
noptalign program and constructs an applet or webstart page for the display.  

For the CGI script to run, you will need the following Perl modules installed:

	BioPerl  (http://bioperl.org)
	LWP      (http://cpan.org)
	CGI      (http://cpan.org)

Additionally, you will need the jar files from the noptdisplay software and
the noptalign program must be built and available for use.   

We have only ever used this software on the Apache web server.

Installation
------------

Installation is almost as simple as creating a directory accessible to apache
and copying the software in.  Almost.  So, begin by creating such a directory.
For example:

	% mkdir /var/www/html/noptalign

Next copy the following files into the directory just created:
	
	nopdisplay-applet.jar
	piccolo.jar
	reduced-biojava.jar
	start.pl  (may have to be renamed start.cgi, depending on Apache)
	index.html
	problems.html
	java_options.html

Now create a directory where temporary files can be created.  This directory
is used for creating the applet and jnlp (webstart) files as well as the
alignment sets created and the GFF file found.  For instance:

	% mkdir /var/www/html/noptalign/tmp

Next, copy the following jar files into the tmp directory.  These are the
jars that will be used by webstart.

	noptdisplay.jar
	batik-awt-util.jar
	batik-dom.jar
	batik-svg-dom.jar
	batik-svggen.jar
	batik-util.jar
	batik-xml.jar
	piccolo.jar
	reduced-biojava.jar

Now edit the start.pl file and change the following variables to reflect
the proper locations:

	$NOPTALIGN = '/usr/local/bin/noptalign';
	$webBase = 'http://example.com/noptalign';
	$webTmp = 'http://example.com/noptalign/tmp';
	$tmp = '/var/www/html/noptalign/tmp';

These variable declarations are at the top of the start.pl file and are marked
with comments.  $NOPTALIGN is simply the path to the noptalign executable.
$webBase is the base URL for the project.  $webTmp is the URL of the temp
directory and $tmp is the path to the same temp directory.

These variables should be all that need to be changed.  You are on your own if
you want to change the presentation of the page.


Examples
--------

If you want the examples to run from your server, then you will need to 
manually edit the example.html and example.jnlp files so that all locations
are correct.  Once this is done, then simply copy all of the example files 
(including example.alignment and example.features) into the $tmp directory 
created above.  Then copy all of the jars in the noptdisplay-X.X/lib 
directory (described above) into the $tmp directory as well. Note that neither
the ant jars nor the noptdisplay-applet.jar are necessary, but they won't
hurt anything.
