Archive Ensembl HomeArchive Ensembl Home
Home > Help & Documentation

Perl API Installation

Introduction

All data sets in the Ensembl system are stored in relational databases (MySQL). For each of the Ensembl databases the project provides a specific Perl API. As Ensembl takes also advantage of code provided by the BioPerl project; installation of the BioPerl package is included in these instructions.

Installation Procedure

There are two ways of installing the Perl API. You can check it out using CVS (Concurrent Versioning System) if you have that available, or you can simply download the files in gzipped TAR format from our CVS website, as detailed below:

  1. Create an installation directory

    $ cd
    $ mkdir src
    $ cd src
    
  2. Download the API packages you need:

    N.B. We recommend waiting until a few days after a release before downloading the new API (or re-downloading after a few days), as there may be post-release bug fixes added to the code.

  3. Download BioPerl 1.2.3

  4. Unpack the downloaded files. In the Unix command line, type:

    $ tar xvfz filename.tar.gz
    

    (substituting the name of each file). In Windows, you will need an unzipping utility such as 7-Zip.

  5. Set up your environment

    You have to tell Perl where to find the modules you just installed. You can do this by using the use lib clause in your script but if you want to make these modules available for all your scripts, the best way is to add them into the PERL5LIB environment variable.

    • Under bash, ksh, or any sh-derived shell:

      PERL5LIB=${PERL5LIB}:${HOME}/src/bioperl-live
      PERL5LIB=${PERL5LIB}:${HOME}/src/ensembl/modules
      PERL5LIB=${PERL5LIB}:${HOME}/src/ensembl-compara/modules
      PERL5LIB=${PERL5LIB}:${HOME}/src/ensembl-variation/modules
      PERL5LIB=${PERL5LIB}:${HOME}/src/ensembl-functgenomics/modules
      export PERL5LIB
      
    • Under csh or tcsh:

      setenv PERL5LIB ${PERL5LIB}:${HOME}/src/bioperl-live
      setenv PERL5LIB ${PERL5LIB}:${HOME}/src/ensembl/modules
      setenv PERL5LIB ${PERL5LIB}:${HOME}/src/ensembl-compara/modules
      setenv PERL5LIB ${PERL5LIB}:${HOME}/src/ensembl-variation/modules
      setenv PERL5LIB ${PERL5LIB}:${HOME}/src/ensembl-functgenomics/modules
      
    • Under Windows (assuming you installed the APIs in C:\src\):

      set PERL5LIB=C:\src\bioperl-live;C:\src\ensembl\modules;C:\src\ensembl-compara\modules;C:\src\ensembl-variation\modules;C:\src\ensembl-functgenomics\modules
      

Additional Tips for Windows users

  • You will of course need Perl installed to use the API! This is available free of charge from ActiveState.
  • You will also need to install the DBD::MySQL package using PPM (Perl Package Manager), a command-line tool which is bundled with ActivePerl.
  • If the existing mysql-driver ("libmysql.dll") doesn't work, replace it - e.g. with the one distributed with "php-5-2-3-win32-installer.msi"

Additional Modules

Additional modules for accessing GO data may be found here: