Installing Bioperl's large collection of modules isn't too difficult. It usually goes fairly painlessly, even though there are a few extra installation steps due to the additional outside programs and Perl modules on which Bioperl depends. You will probably want to use Perl's CPAN to fetch and install Bioperl.
INSTALL is a good document that covers Bioperl installation on Unix/Linux, Windows, and Mac operating systems. It's part of the Bioperl distribution and is located at http://bioperl.org/Core/Latest/INSTALL. This location may change, but it's easy to find from the Download link on the main Bioperl web page. If you're going to install Bioperl, I recommend you read this document first; here, I'll give an overview of what's available and add a few additional comments that may help with installation.
Here's how to get Bioperl on different platforms:
On Unix/Linux, if you download the tar file from the web site, you merely need to untar it and go through the configure and make process by hand, as described in the INSTALL file that comes with the distribution.
If you have a Microsoft Windows machine with ActiveState's Perl (http://www.activestate.com), there's a PPM file available for Bioperl; at the time of this writing, it's at http://bioperl.org/ftp/DIST/Bioperl-1.2.1.ppd.
There is also a CVS repository for Bioperl from which you can fetch the most current versions of the modules. But be careful: some newer versions of the modules are implementing new features and have more bugs than are found in some of the older, more stable releases. The details of how to install from CVS are also available at the Bioperl web page.
All these methods for installing Bioperl are fine, but probably the most common way for Perl programmers to install sets of modules is by way of CPAN. I discussed CPAN in Chapter 1, but it's worth discussing again as it relates to Bioperl.
To install Bioperl, you start by typing the following at the command line:
perl -MCPAN -e shell;
This gives the CPAN shell prompt:
It's often the case that a module you want to install may require other modules for its proper operation, and perhaps one or more of these additional modules have not yet been installed. The CPAN system includes a way to check to see what other modules are required, and you can configure it to automatically follow and install missing prerequisites.
Especially with a large collection of modules like Bioperl, you may expect to see such prerequisites crop up. When I asked my CPAN session how it was configured:
cpan> o conf
one of the lines of output from that query was:
I couldn't find a way to list the options within my CPAN session, so I took a look at the CPAN documentation in another window with perldoc CPAN, searched for the string prerequisites_policy, and read the following:
prerequisites_policy what to do if you are missing module prerequisites ('follow' automatically, 'ask' me, or 'ignore')
To handle the prerequisites automatically, I configured my CPAN session like so:
cpan> o conf prerequisites_policy follow
Now, if you have a slow Internet connection, setting the option this way can be a problem, because some prerequisites may take a long time to install, and you'll be stuck waiting for everything to finish. In that case, you may prefer to be asked about each prerequisite, so you can see if you have the needed time to do the installation. Plan on the process taking at least a couple of hours. My experience using both a dial-up modem and a cable modem from a home office is that the time involved was not too onerous.
As you probably know by now, you can see a summary of CPAN session commands by typing help:
cpan> help Display Information command argument description a,b,d,m WORD or /REGEXP/ about authors, bundles, distributions, modules i WORD or /REGEXP/ about anything of above r NONE reinstall recommendations ls AUTHOR about files in the author's directory Download, Test, Make, Install... get download make make (implies get) test MODULES, make test (implies make) install DISTS, BUNDLES make install (implies test) clean make clean look open subshell in these dists' directories readme display these dists' README files Other h,? display this menu ! perl-code eval a perl command o conf [opt] set and query options q quit the cpan shell reload cpan load CPAN.pm again reload index load newer indices autobundle Snapshot force cmd unconditionally do cmd cpan>
To find the Bioperl distribution, I typed:
cpan> i /bioperl/
and got the following output:
cpan> i /bioperl/ CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on Sun, 27 Apr 2003 04:12:50 GMT Bundle Bundle::BioPerl (C/CR/CRAFFI/Bundle-BioPerl-2.04.tar.gz) Distribution B/BI/BIRNEY/bioperl-0.05.1.tar.gz Distribution B/BI/BIRNEY/bioperl-0.6.2.tar.gz Distribution B/BI/BIRNEY/bioperl-0.7.0.tar.gz Distribution B/BI/BIRNEY/bioperl-1.0.2.tar.gz Distribution B/BI/BIRNEY/bioperl-1.0.tar.gz Distribution B/BI/BIRNEY/bioperl-1.2.1.tar.gz Distribution B/BI/BIRNEY/bioperl-1.2.tar.gz Distribution B/BI/BIRNEY/bioperl-db-0.1.tar.gz Distribution B/BI/BIRNEY/bioperl-ext-0.6.tar.gz Distribution B/BI/BIRNEY/bioperl-gui-0.7.tar.gz Distribution C/CR/CRAFFI/Bundle-BioPerl-2.04.tar.gz Module Bio::LiveSeq::IO::BioPerl (B/BI/BIRNEY/bioperl-1.2.1.tar.gz) 13 items found cpan>
From looking at the Bioperl web page, I knew that the Bundle::BioPerl had extra useful modules in it that Bioperl uses.
I started the installation by first installing the Bundle:
cpan> install Bundle::BioPerl
This process fetched the module code from a CPAN repository, unpacked it, tested it, and installed it, including its prerequisites (without questions asked because I set the follow option as described earlier in this section).
Somewhat fortified by my success, I decided to go for broke and install the main Bioperl distribution.
From the search output from my CPAN query, i /bioperl/, just shown, I saw that the highest numbered release was 1.2.1. Just to be sure it was the latest release, I also spent some time at the Bioperl web site reading the news about the latest releases, so I was quite sure it was what I wanted.
I also spent some time reading the INSTALL file, and I knew that I was generally in good shape. I had a new-enough version of Perl (Version 5.8.0) and was on one of the standard supported platforms.
I installed it on a notebook computer with an Intel 686 processor that had the RedHat Linux 7.2 operating system. The computer and the operating system were about two years old, old enough that I did do some looking around on the Bioperl web site to see if there were any advisories about which versions of Linux were recommended or advised against.
In general, modern computer systems are complex, and they change rapidly. Operating systems and hardware have a replacement cycle of about two years. Some of this is planned obsolescence; some is legitimate technical progress. Whatever the cause, the result is that a system such as the one I'm describing needs several pieces to be in sync. The hardware, operating system software, Perl version, and Bioperl version have to coexist; other pieces such as the C compiler, web browser, web server, and so forth may also cause problems. Hence my interest in checking to see if there were any advisories on these topics.
However, I didn't see any warnings about my particular platform. And since I had recently installed the latest version of Perl with success, I felt I had performed due diligence and that I should go ahead and try to install the Bioperl modules.
To do so, I typed:
cpan> install B/BI/BIRNEY/bioperl-1.2.1.tar.gz
There followed a great amount of activity as CPAN got the distribution from the Internet and tested the various modules. After a time, the tests were complete; a few of them had failed, and CPAN decided not to install the modules. Since only a handful of module tests failed, I looked at the output on my screen and decided that the failures were only in peripheral parts of Bioperl I didn't have an immediate use for, and if I ever did need them, I could fix them later.
So, to finish the installation, I forced CPAN to do the installation despite the presence of some test failures:
cpan> force install B/BI/BIRNEY/bioperl-1.2.1.tar.gz
This resulted in the modules and the documentation being installed.