GBrowse 2.0 Prerequisites

From GMOD
Revision as of 17:58, 16 August 2010 by Lstein (Talk | contribs)

Jump to: navigation, search

Before installing GBrowse, you will need to install some prerequisites on your system. Most prerequisites come as prepackaged binaries which can be installed from the command line or via GUI tools. This document describes the prerequisites for Linux, Mac OSX, and Microsoft Windows systems.

Linux systems

The following prerequisites are needed to run GBrowse on Linux systems:

Applications and Libraries

Although not required for basic operation, you will probably want at least one relational database backend. One or both of:

Those who want to obtain the best performance should consider the mod_perl, or FastCGI Apache modules:

Those who wish to generate publication-ready PDFs from GBrowse tracks should install the inkscape package:

These applications can be installed from source code or from binary packages using one of the binary packaging systems described below.

Perl Modules

GBrowse depends on the following standard Perl libraries:

  • Module::Build
  • GD
  • Bio::Perl (version 1.6.0 or higher)
  • Bio::Graphics
  • JSON
  • LWP
  • Storable
  • IO::String
  • Capture::Tiny
  • File::Temp
  • Digest::MD5
  • CGI::Session
  • Statistics::Descriptive

In addition, the following optional Perl libraries are recommended:

  • GD::SVG (for PDFs and editable high-resolution images)
  • DBI (for relational database access)
  • DBD::mysql (for MySQL database backends)
  • DBD::Pg (for PostgreSQL database access)
  • DB_File::Lock (for load balancing in rendering slavesstrongly)
  • File::NFSLock (if two or more servers are sharing the same NFS-mounted directory for sessions)
  • Template (to run the population allele frequency visualization demo)

It is easiest to use the Perl CPAN shell to install these modules. If you use the CPAN shell to install GBrowse, then the required modules will be installed automatically, however the optional ones will still need to be installed by hand:

% perl -MCPAN -e shell
cpan shell -- CPAN exploration and modules installation (v1.9301)
cpan[2]> install GD::SVG
cpan[3]> install DBI
cpan[4]> install DB_File::Lock
...etc...

Please install libgd2 and your distribution's compiler tools (e.g. "libc6-dev" on Debian systems) before you attempt to install Bio::Graphics::Browser from the CPAN shell. Otherwise it will fail at the GD library installation step.

Binary Packages

If you use a modern Linux distribution, most prerequisites are available as binary packages. There are two common package managers, Debian (DEB) and RedHat Package Manager (RPM). The next section shows you how to use command-line package management tools to install the prerequisites.

DEB Systems (apt)

Distributions on which apt is installed by default include Ubuntu (and its variants), Debian, and Mint. To install all prerequisites except for BioPerl, run the following commands as the root or using sudo (comments begin with the # sign). Some of these packages may already be installed on your system.

#Utilities to help with fetching components distributed in source code
sudo apt-get install wget
sudo apt-get install cvs
sudo apt-get install subversion
sudo apt-get install libc6-dev
sudo apt-get install build-essential
sudo apt-get install libpng12-dev

#apache2
sudo apt-get install apache2

#libgd2 and its Perl library
sudo apt-get install libgd-gd2-perl

#other Perl modules
sudo apt-get install libmodule-build-perl
sudo apt-get install libio-string-perl
sudo apt-get install libcapture-tiny-perl
sudo apt-get install libcgi-session-perl
sudo apt-get install libwww-perl
sudo apt-get install libstatistics-descriptive-perl
sudo apt-get install libjson-perl libjson-any-perl

#optionally...
sudo apt-get install mysql-server mysql-client libdbd-mysql-perl libmysqlclient-dev
sudo apt-get install postgresql libdbd-pg-perl
sudo apt-get install libapache2-mod-perl2
sudo apt-get install libapache2-mod-fastcgi  # or libapache2-mod-fcgid
sudo apt-get install libfcgi-perl
sudo apt-get install inkscape
sudo apt-get install libsvg-perl
sudo apt-get install perl-doc
sudo apt-get install libtemplate-perl

All these installation steps must be executed as root (shown here using sudo).

If you wish to generate publication-ready images, you may install the optional GD::SVG library using the CPAN shell:

sudo perl -MCPAN -e 'install GD::SVG'

If you wish to use the CPAN shell to install GBrowse, then you are all done, and can return to the GBrowse 2.0 HOWTO. Otherwise, you should install Bio::Perl and Bio::Graphics using the CPAN shell:

sudo perl -MCPAN -e 'install Bio::Perl'
sudo perl -MCPAN -e 'install Bio::Graphics'

You're done installing prerequisites! You can now go back to GBrowse 2.0 HOWTO and follow the installation instructions for your platform.

RPM Systems (yum)

This includes Fedora, RedHat, SuSE, Mandriva, PCLinuxOS, and CentOS. Most of these distributions have the command line package management tool yum which is used in the following command examples. These commands will need to be run as root (or equivalently by using sudo in the manner shown above):

#Utilities to help with fetching components distributed in source code
yum install wget
yum install cvs
yum install subversion

#apache2
yum install httpd

#libgd2 and its Perl library
yum install gd-devel
yum install perl-GD

#other Perl modules
yum install perl-Module-Build
yum install perl-CPAN
yum install perl-IO-String
yum install perl-Capture-Tiny
yum install perl-CGI-Session
yum install perl-JSON perl-JSON-Any
yum install perl-libwww-perl

#optionally...
yum install mysql-server mysql-libs perl-DBD-MySQL
yum install postgresql postgresql-server perl-DBD-Pg
yum install mod_perl
yum install mod_fcgid
yum install fcgi-perl
yum install inkscape
yum install perl-GD-SVG

If you plan to use the CPAN shell to install GBrowse, then you are all done, and can return to the GBrowse 2.0 HOWTO. Otherwise, you should install Bio::Perl and Bio::Graphics using the CPAN shell:

sudo perl -MCPAN -e 'install Bio::Perl'
sudo perl -MCPAN -e 'install Bio::Graphics'

You're done installing prerequisites! You can now go back to GBrowse 2.0 HOWTO and follow the installation instructions for your platform.

MacOSX

These instructions apply to Macintosh OSX version 10.5, using the fink binary installer. First, download and install Fink. Next open up the terminal window and type the following commands as the root user or with sudo (as shown):

#Utility to help components distributed in source code
sudo fink install wget

#libgd2 and its Perl library
sudo fink install gd2 gd2-bin
sudo perl -MCPAN -e 'install GD'

#other Perl modules
sudo perl -MCPAN -e 'install IO::String'
sudo perl -MCPAN -e 'install CGI::Session'
sudo perl -MCPAN -e 'install JSON'
sudo perl -MCPAN -e 'install JSON::Any'

#optionally.
sudo fink install mysql
'''more to come here'''
sudo perl -MCPAN -e 'install GD::SVG'

this section is unfinished

If it isn't already activated, turn the Apache server on by activating Control Panel->Sharing->Web Sharing.