Difference between revisions of "GBrowse MacOSX HOWTO"

From GMOD
Jump to: navigation, search
m (The Fink Way)
(The Fink Way)
Line 13: Line 13:
 
===The Fink Way===
 
===The Fink Way===
  
#Make sure you have installed the most recent version of Fink,available from [http://fink.sourceforge.net|http://fink.sourceforge.net].
+
#Make sure you have installed the most recent version of Fink,available from [http://fink.sourceforge.net http://fink.sourceforge.net].
 
#Open up a command window, and install the following Fink packages:
 
#Open up a command window, and install the following Fink packages:
  

Revision as of 22:59, 16 April 2007

INSTALLING GBROWSE ON MACOSX SYSTEMS

GBrowse runs well on both PowerPC and Intel Macs running OS X. These instructions describe how to install GBrowse on these platforms.

Prerequisites

GBrowse has a number of prerequisites, including BioPerl, GD, and the MySQL database. You can install these prerequisites using the Fink precompiled binary package manager, or from source code.

The Fink Way

  1. Make sure you have installed the most recent version of Fink,available from http://fink.sourceforge.net.
  2. Open up a command window, and install the following Fink packages:
  % fink install mysql  (optional, only if you want to to run a mysql backend)
  % fink install gd2

You will need to be logged in as the superuser ("root"), or to use "sudo" for the commands: e.g. "sudo fink install mysql".

You do not need to install BioPerl, GD, or any other Perl packages using fink. Go directly to #Installing GBrowse using the net installer.

The Manual Way

1. Make sure you have installed Mac OS X Developer tools that come on the distribution CD. Include X11 and the X11 SDK in the tools you install. To confirm that you have the tools, open a command window and type:

      % which gcc
      % which autoconf
      % which xmkmf
      % which pkg-config

If any of these commands returns with the error message "command not found," then you should (re)install the developer tools.

2. Install MySQL (optional; only if you want to run a mysql backend)

Go to http://www.mysql.org/downloads/mysql/5.0.html#macosx-dmg, download and run the appropriate OSX installer for your version of the operating system. Note that there are separate installers for OS X versions 10.3 and upward on PowerPC 32-bit, 64-bit and Intel platforms.

3. Install libgd

This is where many people get stuck because MacOSX is ships with an older version of libgd that does not work properly with GBrowse. To add to the confusion, OSX 10.3 and earlier has older developer tools that can't build the new libgd correctly.

Worry not; just follow the recipe.

1. Make sure your PATH environment variable includes /usr/local/bin by running the command:
      % echo $PATH
If you do not see /usr/local/bin listed, either create or edit a file called .bash_login in your home folder (note the leading ".", which hides this file from directory listings), and add the following line to the bottom:
      export PATH="/usr/local/bin:$PATH"
2. Make sure that you have at least version 2.58 of the autoconf tool installed. Run the command:
      % autoconf -V
This will print out the version number. It must be 2.58 or higher. If the version is too low, then upgrade autoconf like this:
Download version 2.58 or higher from http://ftp.gnu.org/gnu/autoconf/. It's best to use 2.58 because it is known to work.
Unpack autoconf, enter the distribution directory and type:
          % ./configure --prefix=/usr
          % make
          % sudo make install
3. Install libpng
Get the latest libpng from http://www.libpng.org. Look for the version "with config script."
Unpack libpng, enter the distribution directory and type:
          % ./configure
          % make
          % sudo make install
4. Install libgd
Get the latest libgd from http://www.libgd.org.
Unpack libgd, enter the distribution directory and type:
          % ./configure
          % make
          % sudo make install
If "make" fails with errors about not being able to compile gdft.c, then reconfigure with the following commands:
          % ./configure --without-fontconfig --without-freetype
          % make
          % sudo make install
Do not try to fix this problem by reinstalling freetype unless you are very brave; you will likely to make things worse.

Now go directly to step (C).

Installing GBrowse using the net installer

Whether you installed the non-Perl prerequisites with Fink or manually, you will now use the GBrowse net installer to install BioPerl, GD and other perl-based prerequisites. You will need a working Internet connection for this step.

Find the gbrowse_netinstall.pl script in the bin/ subdirectory of the GBrowse distribution, or get it off the web from the "GBrowse network install script" located here:

  http://www.gmod.org/wiki/index.php/GBrowse#Installation

Download the script to your home directory, name it "gbrowse_netinstall.pl" and run the following command as the root user or using "sudo":

  % perl gbrowse_netinstall.pl

This will install the correct versions of GD, BioPerl, and all dependencies. During the process you will be asked to respond to various questions. It is safe to choose the defaults.

D) Activate Apache

  You may need to turn on the local web server if it isn't activated
  already: 
 
    Apple Menu -> System Preferences ->  Sharing. 
    Activate "Personal Web Sharing".
    You may wish to adjust your firewall settings to control 
    access to your machine's web server from the Internet.

E) Test the browser

  Open http://localhost/gbrowse and click the link for the example
  yeast chromosome 1 database.

F) Install Perl MySQL driver (optional; only if you want to run the

  mysql backend)
 If you have Mysql running and wish to take advantage of the GBrowse
 Mysql interface, then you will need to install the Perl DBD::mysql
 driver.
 From the command line, type:
 % perl -MCPAN -e 'install DBD::mysql'
 If you get a lot of errors about not having read/write privileges on
 the test database, download the DBD::mysql package from CPAN
 (http://www.cpan.org), unpack it, and follow the directions for
 building it manually.
 There is one other issue to take care of. The bp_bulk_load_gff.pl
 file, which is used to load gff files into a mysql database is
 located in /usr/local/bin/. The script uses /usr/tmp as the
 temporary directory; but this doesn't exist on the Mac. Edit line
 347 of  bp_bulk_load_gff.pl to look like this:
 my $tmpdir = $ENV{TMPDIR} || $ENV{TMP} || '/tmp';

AUTHORS:

Lincoln Stein <lstein@cshl.edu>. Adapted from instructions contributed by Yair Benita <y.benita@wanadoo.nl>.