~ It's a long way from Amphioxus

Installing BioPerl-1.6.901 on the SUG@R cluster of Rice University

BioPerl is a nice collection of Perl modules designed for bioinformatics analysis. Making a good use of BioPerl can greatly facilitate our research. The current version of BioPerl is 1.6.901. The steps are as follows>>

Rather than using the default Perl from the cluster server, I would like to have Perl installed locally on my SUG@R $HOME directory, which will make the downstream procedures much easier. So this is the first thing I need to do. The installing steps are generally the same as I installed Python 2.7 before (See this post).

1) Under my SUG@R $HOME directory, download the current version of Perl and decompress it. ActivePerl is a good choice and can be downloaded from here.

2) Enter this directory and run the shell script “./install.sh”. The installation script will prompt you a few questions. The first two questions are about license agreements, the default answer is [no]. We need to answer yes or simply y for proceeding installation. The third question is about the target installation directory. The default directory is [/opt/ActivePerl-5.14], I changed it into “/users/NetID/local/ActivePerl-5.14”. The following two question will be ask you whether want to install HTML documentation and whether want to confirm installation. The default value is [Yes]. So just press enter will be OK. Now, Perl-5.14 is successfully installed under our specified directory.

3) the next step will be set the PATH environment variable to the installation directory’s bin/ subdirectory. Since I want our installed Perl-5.14 to permanently override the default version of Perl on SUG@R, I will just edit the .bash_profile file under my $HOME directory and add the following lines.

8) Now we are finally ready to install BioPerl using CPAN.Invoke CPAN shell first.

> perl -MCPAN -e shell

Then find the name of the most recent Bioperl version:

cpan> d /bioperl/

Then install the most recent version, for me it is BioPerl-1.6.901.tar.gz.

cpan> install CJFIELDS/BioPerl-1.6.901.tar.gz

Wait after the installation process to finish and exit CPAN shell by typing ‘q’ command.

9) Now BioPerl should already be successfully installed on SUG@R. Let’s write a small script to test it, for example the following one which I found from here.

use Bio::Perl;
# this script will only work if you have an internet connection on the
# computer you're using, the databases you can get sequences from
# are 'swiss', 'genbank', 'genpept', 'embl', and 'refseq'
$seq_object = get_sequence('embl',"AI129902");
write_sequence(">roa1.fasta",'fasta',$seq_object);

Then run it to see if our installed BioPerl really works. If everything is fine, we should see a file named “roa1.fasta” is generated, which includes the header information and nucleotide sequence in FASTA format. Hooray, it works for me!