Tuesday, November 12, 2013

Install Ensembl API and BioPerl 1.2.3 on Your System

I'm going to work on a project that requires lots of queries on Ensembl databases so I wanted to install Ensembl API to begin with. Since it's programmed in Perl, I will be using Perl in this project.

There is a nice tutorial on Ensembl website for API installation. Here I will describe some steps.

1. Download the API and BioPerl

Go to Ensembl FTP ftp://ftp.ensembl.org/pub/ and download "ensembl-api.tar.gz" or click here

Go to BioPerl downloads page http://bioperl.org/DIST/old_releases/ download stable 1.6.1 1.2.3 version (in tar.gz)

2. Place your in a source directory

On Ubuntu, you can use the code below to generate your source folder, extract the downloads and then move the content to your source folder

mkdir ~/src
tar xvfz ensembl-api.tar.gz
mv ensembl ~/src/ensembl
mv ensembl-compara ~/src/ensembl-compara
mv ensembl-functgenomics ~/src/ensembl-functgenomics
mv ensembl-tools ~/src/ensembl-tools
mv ensembl-variation ~/src/ensembl-variation
tar xvfz BioPerl-1.2.3.tar.gz
mv BioPerl-1.2.3 ~/src/bioperl-1.2.3

3. Set your environment variables so tat Perl 5 can find the source directory and files inside

gedit ~/.bashrc

Add following lines to at the end of .bashrc;

PERL5LIB=${HOME}/src/bioperl-1.2.3
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

source ~/.bashrc

4. Check if the installation is successful

perl ~/src/ensembl/misc-scripts/ping_ensembl.pl

If you get "Installation is good. Connection to Ensembl works and you can query the human core database", it's done.

For more information and the steps in installation on Mac and Windows see the original tutorial.

No comments: