Tip:
Highlight text to annotate it
X
Hi there, I'm Andy Yates and I'm the Ensembl support coordinator.
and one of the developers of the Ensembl API.
Today I'm going to show you how to install the Ensembl API on your computer.
All the commands used in this tutorial are available at this URL
if you want to copy and paste them.
You can also browse our web site's online documentation
at www.ensembl.org/info/docs/api
The guide also assumes that you're using Linux or Mac OS X.
Windows users should look for more instructions from our web site.
You need to have Perl installed in order to use the API.
Let's make sure we have it before starting the installation.
We're going to type the command perl -v.
As you can see here we've got perl 5 installed, version 14 sub-version 2,
more commonly known as Perl 5.14.2.
That's perfect for Ensembl.
You'll also need DBD and DBI MySQL installed to
allow Perl to work with MySQL databases.
Let's create a directory for the Ensembl API modules we're about to install.
So we're going to make sure we're in our home directory.
Now we're going to make a directory called source and change into it using the cd command.
As you can see there is nothing in this directory.
First we need download BioPerl.
As of the recording of this video, Ensembl requires BioPerl 1.2.3.
So let's download it from GitHub using the command wget,
unzip it and then rename the directory.
You'll need to download BioPerl from the following URL.
BioPerl is quite a hefty distribution so this will take a reasonable amount of time.
Great, we've managed to download BioPerl
I'm just going to do a quick directory listing to confirm that it's there.
Now we'll unzip.
Another quick directory listing.
And now we're going to rename the BioPerl directory
to the directory name Bioperl-1.2.3.
A final directory listing confirms that BioPerl is there and ready to go.
If you have Git installed you can use it to download the Ensembl packages you need.
If you do not have Git, you can skip this section.
To test if you have Git we're going to try to execute the command and ask for its version.
We do this by typing in git --version,
the double dash here is very important.
As you can see we have Git version 1.7.9.5 which is perfect for installing Ensembl.
We're now going to run five clones:
one per Ensembl project and one for the Ensembl tools.
You want to clone Ensembl from the following URL.
Type it into your commands terminal and press Return.
These projects are very large so they will take some time to download.
Great. We have Ensembl,
now we can repeat the process once for Variation.
We can also repeat it for Compara.
We can also repeat it for FuncGen.
And finally Tools.
A quick directory listing shows that we have
the Ensembl, Ensembl Compara, Ensembl FuncGen
Ensembl Variation and Ensembl Tools projects download.
Whenever you clone Ensembl projects, we'll always check you out onto the latest stable release.
We do offer an alternative system called the Ensembl Git Tools project.
This automates the cloning process and many other common processes
you may want to perform on our repositories.
These commands are available from GitHub
at https://github.com/Ensembl/ensembl-git-tools.
If you don't have Git installed you can always download the API from our FTP site.
It's available as a tarball and contains all the required APIs to run Ensembl.
The file is quite large and it will take significant amount of time to download.
To download we'll use the wget command
and go to ftp.ensembl.org/pub/ensembl-API.tar.gz
and press Return. This now downloading it.
You can see that the tarball is currently 68MB.
This tarball is updated nightly for the current Ensembl release
so you can always be sure of getting the latest code whenever you download from this tarball.
Now that it's finished, we need to decompress the API into the local directory.
To do so we'll use the tar command
and the command line flags zxf
z means decompression, x means extract
and f allows us to specify the tarball we want to act upon.
We press Return and in a few moments we will have
a selection of directories decompressed onto our file system.
If we use the ls command you can see that the directories on now available.
Now we've downloaded all the Ensembl Perl modules,
we need to tell the Perl interpreter where to find them.
To do so we need to add these modules onto the PERL5 environment variable.
How we do so depends on your current shell.
To check your shell type in ECHO $SHELL in all capital letters and press Return.
As you can see here my shell is currently bash.
To add the Ensembl modules onto my PERL5LIB in bash
I'm going to use the Nano text editor
and I'm also going to edit the .profile file in my home directory.
As you can see here there are a number of lines
exporting the Ensembl modules and the BioPerl modules onto my PERL5LIB.
These will not be in your .profile
and you should copy and paste them from the accompanying material with this video.
Once copied and pasted in press Ctrl+O and Return to write the file to disk
and Ctrl+X to exit out of Nano.
If you're cshell user you should edit the .cshrc file in your home directory.
We'll use the Nano text editor and as you can see there are a number of lines here
exporting Bioperl and the Ensembl modules onto your PERL5LIB.
Again you should copy and paste these lines from the accompanying material with this video.
Please also pay attention to the difference in how you actually export environment variables between the two shells.
Again to exit and write the file out of Nano, hold down Ctrl+O, Return to write the file
and CTRL+X to exit out of Nano.
Now we need to source the file we've just edited.
Since I'm in bash I will do this by saying .~/.profile and press Return.
To check this has worked, I will echo PERL5LIB as shown here
and as you can see, the Ensembl modules are now available on my PERL5LIB.
Now Ensembl is available on our PERL5LIB
we're going to try and ping Ensembl to make sure we can communicate.
To do so we're going to use a script that ships with Ensembl called ping_ensembl.
To access this script we will cd into the Ensembl directory
and then into the misc-scripts directory.
We'll then type in ./ping_ensembl.pl and press Return.
If there are any problems during the installation of the API
the ping-ensembl script will tell you of those problems.
As you can see success means that you get the following message saying installation is good
connection to Ensembl works and you can query the human core database.
Well, thanks very much for watching
If you have any questions or comments, please feel free to leave them
at the email address shown below.