Installing Manatee on a Debian system

Manatee is a web-based tool (Apache 2 and MySQL) for the manual annotation of genomes. Officially, installation on only Fedora Core 3, Mandrake 10 and Solaris is supported. However, installation on a Debian system is reasonably straightforward although as with any large software package, there are a few “gotchas” to look out for. This page documents my installation experience.

1 Hardware

My machine is a Tyan GS12 server with a 3.2 GHz P4 CPU, 2 GB RAM and 2 x 250 GB HDD (in a bootable RAID 1 array).

2 Software

Debian 3.1r0 (sarge/stable), Apache 2.0, MySQL 4.1, Manatee version 2.2.29.2.

3 Installation and Configuration

Apache 2.0

If you selected “web server” during the Debian base install, Apache 2.0 will already be installed and running. Otherwise just:

 apt-get install apache2

Configuration of Apache 2.0 is a little different from 1.3. The file /etc/apache2/httpd.conf is deprecated - the main configuration file is /etc/apache2/apache2.conf. Configuration of individual websites uses files with the same syntax, stored in /etc/apache2/sites-available and symlinked to /etc/apache2/sites-enabled.
For Manatee, you need to edit /etc/apache2/apache2.conf. At the bottom of the file, insert:

 setenv WEBSERVER_TMP /tmp/
 ScriptAlias /tigr-scripts/ /usr/lib/cgi-bin/
 Alias /webserver_tmp/ "/tmp/"
 DocumentRoot /var/www/

Things to look out for: (1) /usr/lib/cgi-bin is the standard Debian CGI location, (2) webserver_tmp can be any location with sufficient space suitable for temporary files - don't forget the quotes! (3) you need to specify DocumentRoot here as well as in your sites-enabled file, otherwise Manatee won't know where to put its web files and they will end up in the root directory (i.e. /tdb).

That's about it for Apache 2.0.

MySQL 4.1

If you chose “database server” during the Debian base install, you will have postgresql, not mysql. Just do:

 apt-get install mysql-server-4.1

and everything that you need will be installed. Remember to create a password for the root user immediately following installation.

GD 2

The gd2 graphics libraries should be as easy as:

 apt-get install libgd2 libgd2-dev

Expat

Similarly, install expat with:

 apt-get install expat

Perl modules

The Manatee documentation lists the following modules:

 CGI, DBI, XML::Parser, XML::Simple, XML::Writer, Tree::DAG_Node, File::Spec,
 GD, GD::Text, GD::Graph, Storable, Date::Manip, Log::Log4perl, DBD::mysql, HTML::Template

They forgot to mention that you also need XML::Twig.
I installed the majority of these quite easily using CPAN:

 perl -MCPAN -e 'install <module name>'

with a couple of exceptions. File::Spec and Storable were already on my system but I saw strange errors when I tried to install again. Just ignore any errors. You can always try, e.g. 'locate File/Spec' if you suspect a module already exists.
DBD::mysql is somewhat notorious for not installing due to failed tests. You can go to your /root/.cpan/build/DBD-mysql-x.xxxxx directory and run 'perl Makefile.PL; make; make install'. Or you can use the Debian package, 'apt-get install libdbd-mysql-perl'. In fact, many Perl modules have been packaged for Debian if you prefer this approach.

Manatee

Grab Manatee from Sourceforge and unpack the tarball using 'tar -zxvf'. Change into the 'manatee directory'. Run configure with the following options:

 ./configure APACHEBIN=/usr/sbin HTTPD=/usr/sbin/apache2 MYSQLBIN=/usr/bin MYSQLD=/usr/sbin/mysqld

Some notes on that: (1) these are the standard Debian locations for the apache2 and mysqld binaries, (2) you must specify all the options, (3) the Manatee installation should recognise that you are running Apache 2 and then locate and read /etc/apache2/apache2.conf, (4) Debian has no separate httpd binary - the HTTPD daemon is /usr/sbin/apache2.

Now do 'make; make install'. There'll be a pause and a message about finding the Perl path. You should find that you now have the following directories:

 /var/www/tdb/prok_manatee
 /var/www/tdb/euk_manatee
 /usr/lib/cgi-bin/prok_manatee
 /usr/lib/cgi-bin/euk_manatee

If you don't, something went wrong with the configure. Try again.

Manatee standard databases

Manatee requires 2 mysql databases to work, named 'egad' and 'common'. There's also a demo genome database named 'gvc' and an associated directory of flat files, 'GVC'. Ensure that you have the latest egad and common databases, or your select queries will complain about missing tables. Latest updates can be obtained from the downloads page.

MySQL database tarballs are in lower case (gvc.tgz, common.tgz, egad.tgz). Download them to /var/lib/mysql and install as follows:

 cd /var/lib/mysql
 tar -zxvf <database.tgz>
 chown -R mysql.mysql <database>
 rm <database.tgz>
 mysql -u root -p -e 'flush tables'

/var/lib/mysql is the standard Debian location for MySQL databases. Remember that the database files must be owned by the mysql user and group, or else you will get 'table is read only' errors.

The Manatee flat files can go wherever you like. Mine reside in /usr/local/share/databases/manatee/search_data, e.g. /usr/local/share/databases/manatee/search_data/GVC for the demo 'gvc' data.

Manatee config files

You need to edit /usr/lib/cgi-bin/prok_manatee/conf/Manatee.conf and /usr/lib/cgi-bin/euk_manatee/conf/Manatee.conf. Here are the key lines from my files:

 Prok:Mysql:localhost
 ANNOTATION_DIR=/usr/local/share/databases/manatee/search_data
 IPRSCAN_DIR=/usr/local/share/databases/iprscan
 GZCAT=/bin/zcat
 GUNZIP=/bin/gunzip
 CLUSTALW=/usr/bin/clustalw

Some notes on that: (1) Manatee originally wrote 'Prok:Mysql:hostname'. In all likelihood, your MySQL permissions do not use the hostname of your server, so change it to 'localhost', (2) nobody has gzcat…, (3) you can 'apt-get install clustalw' and it will install to /usr/bin/, otherwise from source it may be in /usr/local/bin. I have both and it doesn't work with Manatee for me at the present time, (4) iprscan is an optional (and very large) extra.

Adding your own databases and users

Obtain your files from TIGR. Assuming that your genome flat files are ABCD.tgz, simply unpack into your search_data directory creating a directory named search_data/ABCD. Unpack your MySQL files, abcd.tgz into /var/lib/mysql, to create /var/lib/mysql/abcd. Remember to change their ownership to mysql.mysql and flush tables.

To add a user, 'bob', with password 'xyz123', who has full rights to genome abcd and the demo gvc database:

 mysql -u root -p -e "grant all on abcd.* to bob@localhost identified by 'xyz123' with grant option"
 mysql -u root -p -e "grant all on gvc.* to bob@localhost identified by 'xyz123' with grant option"
 mysql -u root -p -e "grant select on egad.* to bob@localhost identified by 'xyz123'"
 mysql -u root -p -e "grant select on common.* to bob@localhost identified by 'xyz123'"

Ready to go

Point your browser to 'http://yourserver/tdb/prok_manatee'. If all went well, user 'bob' can login to genome 'abcd' or 'gvc' and start annotating.

 
manatee_hacks.txt · Last modified: 2007/08/20 13:27 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki