3 Installing BioPerl for Unix
5 * 1 BIOPERL INSTALLATION
6 * 2 SYSTEM REQUIREMENTS
8 * 4 ADDITIONAL INSTALLATION INFORMATION
9 * 5 PRELIMINARY PREPARATION
10 * 6 INSTALLING BIOPERL THE EASY WAY USING Build.PL
11 * 7 INSTALLING BIOPERL THE EASY WAY USING CPAN
12 * 8 WHERE ARE THE MAN PAGES?
14 * 9.1 Environment Variables
15 * 10 THE BIOPERL BUNDLE
16 * 11 INSTALLING BIOPERL SCRIPTS
17 * 12 INSTALLING BIOPERL IN A PERSONAL MODULE AREA
18 * 13 INSTALLING BIOPERL MODULES THE HARD WAY
19 * 14 USING MODULES NOT INSTALLED IN THE STANDARD LOCATION
21 * 16 BUILDING THE OPTIONAL bioperl-ext PACKAGE
22 * 16.1 CONFIGURING for BSD and Solaris boxes
27 For the most up-to-date installation instructions please see the
30 http://www.bioperl.org/wiki/Installing_BioPerl
32 BioPerl has been installed on many forms of Unix, Win9X/NT/2000/XP,
33 and on Mac OS X (see the PLATFORMS file for more details). Following
34 are instructions for installing BioPerl for Unix/Linux/Mac OS X;
35 Windows installation instructions can be found in INSTALL.WIN. For
36 installing BioPerl for Mac OS X using Fink, see:
38 http://www.bioperl.org/wiki/Getting_BioPerl#Mac_OS_X_using_fink
42 * Perl 5.6.1 or later; version 5.8 and greater are highly
43 recommended. Modules are generally tested against perl 5.8 and
46 * External modules: BioPerl uses functionality provided in other
47 Perl modules. Some of these are included in the standard perl
48 package but some need to be obtained from the CPAN site. The
49 list of external modules is included in the DEPENDENCIES file.
53 * ANSI C or GNU C compiler (gcc) for XS extensions (the bioperl-ext
54 package; see BUILDING THE OPTIONAL bioperl-ext PACKAGE, below).
56 ADDITIONAL INSTALLATION INFORMATION
58 * Additional information on BioPerl and MAC OS:
59 * OS 9 - http://bioperl.org/Core/mac-bioperl.html
60 NOTE: These are severely out-of-date and require MacPerl
61 (the latest version of which is 5.6.1rc1). As such, we do
62 not currently support BioPerl on OS 9
63 * OS X - Installing using Fink (in Getting BioPerl)
65 PRELIMINARY PREPARATION
67 This is optional, but regardless of your subsequent choice of
68 installation method, it will help to carry out the following steps.
69 They will increase the likelyhood of installation success
70 (especially of optional dependencies).
75 cpan>install Bundle::CPAN
78 * Install/upgrade Module::Build, and make it your preferred
82 cpan>install Module::Build
83 cpan>o conf prefer_installer MB
87 * Install the expat library by whatever method is
88 appropriate for your system.
90 * If your expat library is installed in a non-standard location,
94 cpan>o conf makepl_arg "EXPATLIBPATH=/non-standard/lib EXPATINCPATH=/non-standard/include"
97 INSTALLING BIOPERL THE EASY WAY USING Build.PL
99 The advantage of this approach is it's stepwise, so it's easy to stop
100 and analyze in case of any problem.
102 Download, then unpack the tar file. For example:
104 >tar xvfz BioPerl-1.6.1.tar.gz
107 Now issue the build commands:
112 If you've installed everything perfectly and all the network
113 connections are working then you may pass all the tests run in the
114 './Build test' phase. It's also possible that you may fail some tests.
115 Possible explanations: problems with local Perl installation, network
116 problems, previously undetected bug in BioPerl, flawed test script,
117 problems with CGI script using for sequence retrieval at public
118 database, and so on. Remember that there are over 900 modules in
119 BioPerl and the test suite is running more than 12000 individual
120 tests, a few failed tests may not affect your usage of BioPerl.
122 If you decide that the failed tests will not affect how you intend to
123 use BioPerl and you'd like to install anyway, or if all tests were
128 This is what most experienced BioPerl users would do. However, if
129 you're concerned about a failed test and need assistance or advice
130 then contact bioperl-l@bioperl.org. (You could provide us the detailed
131 results of the failed test(s): see the `THE TEST SYSTEM' below for
132 information on how to generate such results.)
134 To './Build install' you need write permission in the
135 perl5/site_perl/source area (or similar, depending on your
136 environment). Usually this will require you becoming root, so you will
137 want to talk to your systems manager if you don't have the necessary
140 It is also straightforward to install the package outside of the this
141 standard Perl5 location. See INSTALLING BIOPERL IN A PERSONAL MODULE
144 INSTALLING BIOPERL THE EASY WAY USING CPAN
146 You can use the CPAN shell to install BioPerl. For example:
148 >perl -MCPAN -e shell
150 Or you might have the cpan alias installed:
154 Then find the name of the BioPerl version you want:
157 CPAN: Storable loaded ok
158 Going to read /home/bosborne/.cpan/Metadata
159 Database was generated on Mon, 20 Nov 2006 05:24:36 GMT
163 Distribution B/BI/BIRNEY/bioperl-1.2.tar.gz
164 Distribution B/BI/BIRNEY/bioperl-1.4.tar.gz
165 Distribution C/CJ/CJFIELDS/BioPerl-1.6.1.tar.gz
169 cpan>install C/CJ/CJFIELDS/BioPerl-1.6.1.tar.gz
171 If you've installed everything perfectly and all the network
172 connections are working then you may pass all the tests run in the
173 './Build test' phase. It's also possible that you may fail some tests.
174 Possible explanations: problems with local Perl installation, network
175 problems, previously undetected bug in BioPerl, flawed test script,
176 problems with CGI script used for sequence retrieval at public
177 database, and so on. Remember that there are over 900 modules in
178 BioPerl and the test suite is running more than 12000 individual
179 tests, a few failed tests may not affect your usage of BioPerl.
181 If you decide that the failed tests will not affect how you intend to
182 use BioPerl and you'd like to install anyway do:
184 cpan>force install C/CJ/CJFIELDS/BioPerl-1.6.1.tar.gz
186 This is what most experienced BioPerl users would do. However, if
187 you're concerned about a failed test and need assistance or advice
188 then contact bioperl-l@bioperl.org. (You could provide us the detailed
189 results of the failed test(s): see the `THE TEST SYSTEM' below for
190 information on how to generate such results.)
192 WHERE ARE THE MAN PAGES?
194 Previously, when using Makefile.PL (no longer covered in this
195 documentation), we had to disable the automatic creation of man pages
196 because this step was triggering a "line too long" error on some OSs
197 due to shell constraints. If you want man pages installed use the
198 Build.PL installation process discussed above.
202 BioPerl can interface with some external programs for executing
203 analyses. These include clustalw and t_coffee for Multiple Sequence
204 Alignment (Bio::Tools::Run::Alignment::Clustalw and
205 Bio::Tools::Run::Alignment::TCoffee) and blastall, blastpgp, and
206 bl2seq for BLAST analyses (Bio::Tools::Run::StandAloneBlast), and to
207 all the programs in the EMBOSS suite (Bio::Factory::EMBOSS). Most
208 of the modules which 'wrap' these programs are located in the separate
209 bioperl-run distribution; however, two commonly-used modules are still
210 distributed with the BioPerl core (Bio::Tools::Run::StandAloneBlast,
211 Bio::Tools::Run::RemoteBlast).
213 Environment Variables
215 Some modules which run external programs need certain environment
216 variables set. If you do not have a local copy of the specific
217 executable you do not need to set these variables. Additionally the
218 modules will attempt to locate the specific applications in your
219 runtime PATH variable. You may also need to set an environment
220 variable to tell BioPerl about your network configuration if your site
223 Setting environment variables on unix means adding lines like the
224 following to your shell *rc file.
228 export BLASTDIR=/data1/blast
232 setenv BLASTDIR /data1/blast
234 Some environment variables include:
236 +------------------------------------------------------------------------+
237 | Env. Variable | Description |
238 |---------------+--------------------------------------------------------|
239 | |Specifies where the NCBI blastall, blastpgp, bl2seq, |
240 |BLASTDIR |etc.. are located. A 'data' directory could also be |
241 | |present in this directory as well, you could put your |
242 | |blastable databases here. |
243 |---------------+--------------------------------------------------------|
244 | |If one does not want to locate the data dir within the |
245 |BLASTDATADIR or|same dir as where the BLASTDIR variable points, a |
246 |BLASTDB |BLASTDATADIR or BLASTDB variable can be set to point to |
247 | |a dir where BLAST database indexes are located. |
248 |---------------+--------------------------------------------------------|
249 |BLASTMAT |The directory containing the substitution matrices such |
251 |---------------+--------------------------------------------------------|
252 |CLUSTALDIR |The directory where the clustalw executable is located. |
253 |---------------+--------------------------------------------------------|
254 |TCOFFEEDIR |The directory where the t_coffee executable is located. |
255 |---------------+--------------------------------------------------------|
256 | |If you access the internet via a proxy server then you |
257 | |can tell the BioPerl modules which require network |
258 | |access about this by using the http_proxy environment |
259 |http_proxy |variable. The value set includes the proxy address and |
260 | |the port, with optional username/password for |
261 | |authentication purposes |
262 | |(e.g. http://USERNAME:PASSWORD@proxy.example.com:8080). |
263 +------------------------------------------------------------------------+
267 Users of previous versions of BioPerl may remember Bundle::BioPerl.
268 You no longer need to install Bundle::BioPerl. Instead, the normal
269 installation process will ask you if you'd like to install optional
270 external module dependencies that BioPerl has.
272 A full list of BioPerl dependencies can be found in the DEPENDENCIES
273 file included with this distribution.
275 INSTALLING BIOPERL SCRIPTS
277 BioPerl comes with a set of production-quality scripts that are
278 kept in the scripts/ directory. You can install these scripts if you'd
279 like, simply answer the questions during 'perl Build.PL'.
280 The installation directory can be specified by:
283 ./Build install --install_path script=/foo/scripts
285 By default they install to /usr/bin or similar, depending on platform.
287 INSTALLING BIOPERL IN A PERSONAL MODULE AREA
289 If you lack permission to install perl modules into the standard
290 site_perl/ system area you can configure BioPerl to install itself
291 anywhere you choose. Ideally this would be a personal perl directory
292 or standard place where you plan to put all your 'local' or personal
297 >perl Build.PL --install_base /home/users/dag
301 This tells perl to install all the various parts of bioperl in the
302 desired place, e.g. creating:
304 /home/users/dag/lib/perl5/Bio/Perl.pm
306 Then in your BioPerl script you would write:
308 use lib "/home/users/dag/lib/perl5/";
311 For more information on these sorts of custom installs see the
312 documentation for Module::Build.
314 If you are used to using something like:
316 >perl Makefile.PL PREFIX=/home/users/dag
318 You can get similar behaviour by using this instead:
320 >perl Build.PL --prefix /home/users/dag
322 For more information, see Module::Build::Cookbook documentation for
323 Installing_in_the_same_location_as_ExtUtils::MakeMaker
325 You can also use CPAN to install modules in your local directory.
326 First enter the CPAN shell, then set the arguments for the commands
327 "perl Makefile.PL" and "./Build install", like this:
329 >perl -e shell -MCPAN
330 cpan>o conf makepl_arg LIB=/home/users/dag/My_Local_Perl_Modules
331 cpan>o conf mbuild_install_arg "--install_path lib=/home/users/dag/My_Local_Perl_Modules"
334 INSTALLING BIOPERL MODULES THE HARD WAY
336 As a last resort, you can simply copy all files in Bio/ to any
337 directory in which you have write privileges. This is generally NOT
338 recommended since some modules may require special configuration
339 (currently none do, but don't rely on this).
341 You will need to set "use lib '/path/to/my/bioperl/modules';" in your
342 perl scripts so that you can access these modules if they are not
343 installed in the standard site_perl/ location. See above for an
346 To get manpage documentation to work correctly you will have to
347 configure man so that it looks in the proper directory. On most
348 systems this will just involve adding an additional directory to your
349 $MANPATH environment variable.
351 The installation of the Compile directory can be similarly redirected,
352 but execute the make commands from the Compile/SW directory.
354 If all else fails and you are unable to access the perl distribution
355 directories, ask your system administrator to place the files there
356 for you. You can always execute perl scripts in the same directory as
357 the location of the modules (Bio/ in the distribution) since perl
358 always checks the current working directory when looking for modules.
360 USING MODULES NOT INSTALLED IN THE STANDARD LOCATION
362 You can explicitly tell perl where to look for modules by using the
363 Lib module which comes standard with perl.
368 use lib "/home/users/dag/lib/perl5/";
370 #<...insert whizzy perl code here...>
372 Or, you can set the environmental variable PERL5LIB:
376 setenv PERL5LIB /home/users/dag/lib/perl5/
380 export PERL5LIB=/home/users/dag/lib/perl5/
384 The BioPerl test system is located in the t/ directory and is
385 automatically run whenever you execute the './Build test' command
386 (having previously run 'Perl Build.PL'; if you have already installed
387 BioPerl answer 'no' to script installation to get nicer test output
390 For the 1.6 release and beyond, tests have been organized into groups
391 based upon the specific task or class the module being tested belongs
392 to. If you want to investigate the behavior of a specific test such as
393 the Seq test you would type:
395 >./Build test --test_files t/Seq/Seq.t --verbose
397 The ./ ensures you are using the Build script in the current directory
398 to make sure you are testing the modules in this directory not ones
399 installed elsewhere. The --test_files arguement can be used multiple
400 times to try a set of test scripts in one go. The --verbose arguement
401 outputs the detailed test results, instead of just the summary you see
402 during './Build test'.
404 The '--test-files' argument can also work as a glob. For instance, to
405 run tests on all SearchIO modules, use the following:
407 >./Build test --test_files t/SearchIO* --verbose
409 If you are trying to learn how to use a module, often the test suite
410 is a good place to look. All good extreme programmers try and write a
411 test BEFORE they write the module to insure that their module behaves
412 the way they expect. You'll notice some 'ok' and 'skip' commands in a
413 test, this is part of the Perl test suite that signifies a passed test
414 with an 'ok N', where N is the test number. Alternatively you can tell
415 Perl to skip tests. This is useful when, for example, your test
416 detects that the network is not present and thus should skip, not
417 fail, any tests that require a network connection.
419 The core developers have indicated that future releases of BioPerl
420 will require that new modules come with a test suite with some minimal
421 tests. Modules that lack adequate tests or could otherwise be
422 considered 'unstable' will be moved into a separate developer
423 distribution until adequate tests are added and the API stablizes.
425 BUILDING THE OPTIONAL bioperl-ext PACKAGE
427 The bioperl-ext package contains C code and XS extensions for various
428 alignment and trace file modules (Bio::Tools::pSW for DNA
429 Smith-Waterman, Bio::Tools::dpAlign for protein Smith-Waterman,
430 Bio::SearchDist for EVD fitting of extreme value, Bio::SeqIO::staden).
432 This Installation may work out-of-the box for most platforms except
433 BSD and Solaris boxes. For other platforms skip this next paragraph.
434 Of note, the code for bioperl-ext has not been updated along with the
435 rest of bioperl, so one may expect to see some issues. If so, please
436 report them to the BioPerl mailing list. Patches for these modules are
439 CONFIGURING for BSD and Solaris boxes
441 You should add the line -fPIC to the CFLAGS line in
442 Compile/SW/libs/makefile. This makes the compile generate position
443 independent code, which is required for these architectures. In
444 addition, on some Solaris boxes, the generated Makefile does not make
445 the correct -fPIC/-fpic flags for the C compiler that is used. This
446 requires manual editing of the generated Makefile to switch case. Try
447 it out once, and if you get errors, try editing the -fpic line
451 Move to the directory bioperl-ext. This is available as a separate
452 package released from ftp://bioperl.org/pub/bioperl/DIST. This is
453 where the C code and XS extension for the bp_sw module is held and
454 execute these commands: (possibly after making the change for BSD and
455 Solaris, as detailed above)
457 perl Makefile.PL # makes the system specific makefile
458 make # builds all the libaries
459 make test # runs a short test
460 make install # installs the package correctly.
462 This should install the compiled extension. The Bio::Tools::pSW module
463 will work cleanly now.