Difference between revisions of "GBrowse 2.0 HOWTO"

From GMOD
Jump to: navigation, search
(Introduction)
(For Users of GBrowse 1.X)
Line 15: Line 15:
 
=For Users of GBrowse 1.X=
 
=For Users of GBrowse 1.X=
  
GBrowse 2.0 is largely backward compatible with GBrowse 1.X, but you will need to do some modest work in order to port existing sources to the new system. This section tells you what you should now.
+
GBrowse 2.0 is largely backward compatible with GBrowse 1.X, but you will need to do some modest work in order to port existing sources to the new system. This section tells you what you need to know.
 +
 
 +
==Apache Environment Variables==
 +
 
 +
GBrowse 1.X found the location of its configuration files by consulting a hard-coded variable located in the CGI script itself. This made it hard to move the configuration files around. In contrast, GBrowse 2.0 finds its configuration directory by consulting an environment variable named GBROWSE_CONF that is set by Apache. You must add a '''SetEnv'' directive in the Apache configuration file in order to create this variable and pass it through. Usually this directive will be located in the "cgi-bin" <Directory> section as follows:
 +
 
 +
  <Directory /usr/lib/cgi-bin>
 +
    SetEnv GBROWSE_CONF /etc/GBrowse2
 +
    ... # other stuff # ...
 +
  </Directory>
 +
 
 +
Other environment variables that can be set in the Apache configuration file include:
 +
 
 +
;'''GBROWSE_DOCS'''
 +
:Location of GBrowse's static HTML files and images in the file system (e.g. "/var/www/gbrowse2")
 +
;'''GBROWSE_ROOT'''
 +
:Location of GBrowse's static HTML files and images in URL space (e.g. "/gbrowse2")
 +
;'''GBROWSE_MASTER'''
 +
:Name of the GBrowse master configuration file located in the configuration directory, "GBrowse.conf" by default.
 +
;'''PERL5LIB'''
 +
:Colon-delimited list of directories to search for Perl modules. Useful if some modules, such as bioperl, are installed in non-standard locations.
 +
 
 +
The Build script will guide you through selecting most of these options when you run "./Build config". You can then create a suitable fragment of Apache configuration file code to cut and paste into its configuration file by running ''./Build apache_config''.

Revision as of 23:46, 18 October 2008

This document is a work in progress. It describes how to install and configure GBrowse 2.0

Introduction

GBrowse 2.0 is a complete rewrite of the original GBrowse version. In addition to making the code base more maintainable, GBrowse 2.0 adds the following major features:

  • User Interface: The user interface uses AJAX to provide a smoother user experience. Tracks turn on and off immediately, and updates affect only the tracks that have changed.
  • More rational configuration: Most configuration options have been moved into a single shared configuration file. This allows data source-specific files to be shorter and more concise. This also increases the performance for sites that use hundreds of configuration files to display annotations on multiple species because only the global configuration file and the source-specific configuration file need to be read.
  • Multiple database support: You can now declare multiple databases for each data source and attach them to different tracks. This allows you to add and remove genome annotation data sets far more easily than in earlier versions.
  • Slave renderer support: If you have a multi-CPU processor, or access to several machines, you can distribute the tasks of reading the databases and rendering tracks across multiple processes and machines via a series of "slave" renderers. This greatly increases performance.

For Users of GBrowse 1.X

GBrowse 2.0 is largely backward compatible with GBrowse 1.X, but you will need to do some modest work in order to port existing sources to the new system. This section tells you what you need to know.

Apache Environment Variables

GBrowse 1.X found the location of its configuration files by consulting a hard-coded variable located in the CGI script itself. This made it hard to move the configuration files around. In contrast, GBrowse 2.0 finds its configuration directory by consulting an environment variable named GBROWSE_CONF that is set by Apache. You must add a 'SetEnv directive in the Apache configuration file in order to create this variable and pass it through. Usually this directive will be located in the "cgi-bin" <Directory> section as follows:

 <Directory /usr/lib/cgi-bin>
   SetEnv GBROWSE_CONF /etc/GBrowse2
   ... # other stuff # ...
 </Directory>

Other environment variables that can be set in the Apache configuration file include:

GBROWSE_DOCS
Location of GBrowse's static HTML files and images in the file system (e.g. "/var/www/gbrowse2")
GBROWSE_ROOT
Location of GBrowse's static HTML files and images in URL space (e.g. "/gbrowse2")
GBROWSE_MASTER
Name of the GBrowse master configuration file located in the configuration directory, "GBrowse.conf" by default.
PERL5LIB
Colon-delimited list of directories to search for Perl modules. Useful if some modules, such as bioperl, are installed in non-standard locations.

The Build script will guide you through selecting most of these options when you run "./Build config". You can then create a suitable fragment of Apache configuration file code to cut and paste into its configuration file by running ./Build apache_config.