3 Installing Bioperl for Unix
5 * 1 BIOPERL INSTALLATION
6 * 2 SYSTEM REQUIREMENTS
8 * 4 ADDITIONAL INSTALLATION INFORMATION
10 * 6 PRELIMINARY PREPARATION
11 * 7 INSTALLING BIOPERL THE EASY WAY USING CPAN
12 * 8 INSTALLING BIOPERL THE EASY WAY USING 'Build.PL'
13 * 9 WHERE ARE THE MAN PAGES?
14 * 10 EXTERNAL PROGRAMS
16 * 10.1 Environment Variables
18 * 11 INSTALLING BIOPERL SCRIPTS
19 * 12 INSTALLING BIOPERL IN A PERSONAL MODULE AREA
20 * 13 INSTALLING BIOPERL MODULES THE HARD WAY
21 * 14 USING MODULES NOT INSTALLED IN THE STANDARD LOCATION
23 * 16 BUILDING THE OPTIONAL bioperl-ext PACKAGE
25 * 16.1 CONFIGURING for BSD and Solaris boxes
30 Bioperl has been installed on many forms of Unix,
31 Win9X/NT/2000/XP, and on Mac OS X (see the PLATFORMS file for more
32 details). Following are instructions for installing Bioperl for
33 Unix/Linux/Mac OS X; Windows installation instructions can be found
34 in INSTALL.WIN. For installing Bioperl for Mac OS X using Fink, see:
36 http://www.bioperl.org/wiki/Getting_BioPerl#Mac_OS_X_using_fink
40 * Perl 5.6.1 or later; version 5.8 and greater are recommended.
42 * External modules: Bioperl uses functionality provided in other
43 Perl modules. Some of these are included in the standard perl package
44 but some need to be obtained from the CPAN site. The list of external
45 modules is included in the DEPENDENCIES file.
49 * ANSI C or GNU C compiler (gcc) for XS extensions (the
50 bioperl-ext package; see BUILDING THE OPTIONAL bioperl-ext
53 ADDITIONAL INSTALLATION INFORMATION
55 * Additional information on Bioperl and MAC OS:
56 * OS 9 - http://bioperl.org/Core/mac-bioperl.html
57 * OS X - http://www.tc.umn.edu/~cann0010/Bioperl_OSX_install.html
58 (outdated, but useful for libgd installation notes)
59 * OS X - Installing using Fink (in Getting BioPerl)
63 Users of previous versions of Bioperl may remember Bundle::BioPerl.
64 You no longer need to install Bundle::BioPerl. Instead, the normal
65 installation process will ask you if you'd like to install the
66 optional external module dependencies that Bioperl has.
68 A full list of BioPerl dependencies can be found inf the DEPENDENCIES
69 file included with this distribution.
71 PRELIMINARY PREPARATION
73 This is optional, but regardless of your subsequent choice of installation
74 method, it will help to carry out the following steps. They will increase
75 the likelyhood of installation success (especially of optional
81 cpan>install Bundle::CPAN
84 * Install/upgrade Module::Build, and make it your preferred installer:
87 cpan>install Module::Build
88 cpan>o conf prefer_installer MB
92 * Install the expat and libgd libraries by whatever method is
93 appropriate for your system. If you install libgd in a non-standard
94 location, that is fine: when installing the perl module that needs it
95 you will be asked where you installed it.
97 * If your expat library is installed in a non-standard location, tell
101 cpan>o conf makepl_arg "EXPATLIBPATH=/non-standard/lib EXPATINCPATH=/non-standard/include"
104 INSTALLING BIOPERL THE EASY WAY USING CPAN
106 You can use the CPAN shell to install Bioperl. For example:
108 >perl -MCPAN -e shell
110 Or you might have the cpan alias installed:
114 Then find the name of the Bioperl version you want:
117 CPAN: Storable loaded ok
118 Going to read /home/bosborne/.cpan/Metadata
119 Database was generated on Mon, 20 Nov 2006 05:24:36 GMT
120 Distribution B/BI/BIRNEY/bioperl-1.2.tar.gz
121 Distribution B/BI/BIRNEY/bioperl-1.4.tar.gz
122 Distribution S/SE/SENDU/bioperl-1.5.2_100.tar.gz
126 cpan>install S/SE/SENDU/bioperl-1.5.2_100.tar.gz
128 If you've installed everything perfectly and all the network connections
129 are working then you may pass all the tests run in the './Build test' phase.
130 It's also possible that you may fail some tests. Possible explanations:
131 problems with local Perl installation, network problems, previously
132 undetected bug in Bioperl, flawed test script, problems with CGI
133 script used for sequence retrieval at public database, and so on. Remember
134 that there are over 800 modules in Bioperl and the test suite is running
135 more than 12000 individual tests, a few failed tests may not affect your
138 If you decide that the failed tests will not affect how you intend to use
139 Bioperl and you'd like to install anyway do:
141 cpan>force install S/SE/SENDU/bioperl-1.5.2_100.tar.gz
143 This is what most experienced Bioperl users would do. However, if you're
144 concerned about a failed test and need assistance or advice then contact
145 bioperl-l@bioperl.org.
147 INSTALLING BIOPERL THE EASY WAY USING Build.PL
149 The advantage of this approach is it's stepwise, so it's easy to stop and
150 analyze in case of any problem.
152 Download, then unpack the tar file. For example:
154 >gunzip bioperl-1.5.2_100.tar.gz
155 >tar xvf bioperl-1.5.2_100.tar
156 >cd bioperl-1.5.2_100
158 Now issue the build commands:
163 If you've installed everything perfectly and all the network connections
164 are working then you may pass all the tests run in the './Build test' phase.
165 It's also possible that you may fail some tests. Possible explanations:
166 problems with local Perl installation, network problems, previously
167 undetected bug in Bioperl, flawed test script, problems with CGI script
168 using for sequence retrieval at public database, and so on. Remember that
169 there are over 800 modules in Bioperl and the test suite is running more
170 than 12000 individual tests, a few failed tests may not affect your usage
173 If you decide that the failed tests will not affect how you intend to use
174 Bioperl and you'd like to install anyway, or if all tests were fine, do:
178 This is what most experienced Bioperl users would do. However, if you're
179 concerned about a failed test and need assistance or advice then contact
180 bioperl-l@bioperl.org.
182 To './Build install' you need write permission in the perl5/site_perl/source
183 area (or similar, depending on your environment). Usually this will require
184 you becoming root, so you will want to talk to your systems manager if you
185 don't have the necessary privileges.
187 It is also straightforward to install the package outside of the this
188 standard Perl5 location. See INSTALLING BIOPERL IN A PERSONAL MODULE
191 WHERE ARE THE MAN PAGES?
193 When using Makefile.PL (no longer covered in this documentation), we had
194 to disable the automatic creation of man pages because this step was
195 triggering a "line too long" error on some OSs due to shell constraints.
196 If you want man pages installed use the Build.PL installation process
201 Bioperl can interface with some external programs for executing analyses.
202 These include clustalw and t_coffee for Multiple Sequence Alignment
203 (Bio::Tools::Run::Alignment::Clustalw and
204 Bio::Tools::Run::Alignment::TCoffee) and blastall, blastpgp, and
205 bl2seq for BLAST analyses (Bio::Tools::Run::StandAloneBlast), and
206 to all the programs in the EMBOSS suite (Bio::Factory::EMBOSS).
208 Environment Variables
210 Some modules which run external programs need certain environment
211 variables set. If you do not have a local copy of the specific executable
212 you do not need to set these variables. Additionally the modules will
213 attempt to locate the specific applications in your runtime PATH variable.
214 You may also need to set an environment variable to tell BioPerl about
215 your network configuration if your site uses a firewall.
217 Setting environment variables on unix means adding lines like the
218 following to your shell *rc file.
222 export BLASTDIR=/data1/blast
226 setenv BLASTDIR /data1/blast
228 Some environment variables include:
230 +------------------------------------------------------------------------+
231 | Env. Variable | Description |
232 |---------------+--------------------------------------------------------|
233 | |Specifies where the NCBI blastall, blastpgp, bl2seq, |
234 |BLASTDIR |etc.. are located. A 'data' directory could also be |
235 | |present in this directory as well, you could put your |
236 | |blastable databases here. |
237 |---------------+--------------------------------------------------------|
238 | |If one does not want to locate the data dir within the |
239 |BLASTDATADIR or|same dir as where the BLASTDIR variable points, a |
240 |BLASTDB |BLASTDATADIR or BLASTDB variable can be set to point to |
241 | |a dir where BLAST database indexes are located. |
242 |---------------+--------------------------------------------------------|
243 |BLASTMAT |The directory containing the substitution matrices such |
245 |---------------+--------------------------------------------------------|
246 |CLUSTALDIR |The directory where the clustalw executable is located. |
247 |---------------+--------------------------------------------------------|
248 |TCOFFEEDIR |The directory where the t_coffee executable is located. |
249 |---------------+--------------------------------------------------------|
250 | |If you access the internet via a proxy server then you |
251 | |can tell the Bioperl modules which require network |
252 | |access about this by using the http_proxy environment |
253 |http_proxy |variable. The value set includes the proxy address and |
254 | |the port, with optional username/password for |
255 | |authentication purposes |
256 | |(e.g. http://USERNAME:PASSWORD@proxy.example.com:8080). |
257 +------------------------------------------------------------------------+
259 INSTALLING BIOPERL SCRIPTS
261 Bioperl comes with a set of production-quality scripts that are
262 kept in the scripts/ directory. You can install these scripts if you'd
263 like, simply answer the questions during 'perl Build.PL'.
264 The installation directory can be specified by:
267 ./Build install --install_path script=/foo/scripts
269 By default they install to /usr/bin or similar, depending on platform.
271 INSTALLING BIOPERL IN A PERSONAL MODULE AREA
273 If you lack permission to install perl modules into the standard
274 site_perl/ system area you can configure Bioperl to install itself
275 anywhere you choose. Ideally this would be a personal perl directory or
276 standard place where you plan to put all your 'local' or personal perl
281 >perl Build.PL --install_base /home/users/dag
285 This tells perl to install all the various parts of bioperl in the desired
286 place, e.g. creating:
288 /home/users/dag/lib/perl5/Bio/Perl.pm
290 Then in your Bioperl script you would write:
292 use lib "/home/users/dag/lib/perl5/";
295 For more information on these sorts of custom installs see the documentation
298 If you are used to using something like:
300 >perl Makefile.PL PREFIX=/home/users/dag
302 You can get similar behaviour by using this instead:
304 >perl Build.PL --prefix /home/users/dag
306 For more information, see Module::Build::Cookbook documentation for
307 Installing_in_the_same_location_as_ExtUtils::MakeMaker
309 You can also use CPAN to install modules in your local directory. First
310 enter the CPAN shell, then set the arguments for the commands
311 "perl Makefile.PL" and "./Build install", like this:
313 >perl -e shell -MCPAN
314 cpan>o conf makepl_arg LIB=/home/users/dag/My_Local_Perl_Modules
315 cpan>o conf mbuild_install_arg "--install_path lib=/home/users/dag/My_Local_Perl_Modules"
318 INSTALLING BIOPERL MODULES THE HARD WAY
320 As a last resort, you can simply copy all files in Bio/ to any directory
321 in which you have write privileges. This is generally NOT recommended
322 since some modules may require special configuration (currently none do,
323 but don't rely on this).
325 You will need to set "use lib '/path/to/my/bioperl/modules';" in your perl
326 scripts so that you can access these modules if they are not installed in
327 the standard site_perl/ location. See above for an example.
329 To get manpage documentation to work correctly you will have to
330 configure man so that it looks in the proper directory. On most systems
331 this will just involve adding an additional directory to your $MANPATH
332 environment variable.
334 The installation of the Compile directory can be similarly redirected, but
335 execute the make commands from the Compile/SW directory.
337 If all else fails and you are unable to access the perl distribution
338 directories, ask your system administrator to place the files there for
339 you. You can always execute perl scripts in the same directory as the
340 location of the modules (Bio/ in the distribution) since perl always
341 checks the current working directory when looking for modules.
343 USING MODULES NOT INSTALLED IN THE STANDARD LOCATION
345 You can explicitly tell perl where to look for modules by using the
346 Lib module which comes standard with perl.
351 use lib "/home/users/dag/lib/perl5/";
353 #<...insert whizzy perl code here...>
355 Or, you can set the environmental variable PERL5LIB:
359 setenv PERL5LIB /home/users/dag/lib/perl5/
363 export PERL5LIB=/home/users/dag/lib/perl5/
367 The Bioperl test system is located in the t/ directory and is
368 automatically run whenever you execute the './Build test' command
369 (having previously run 'Perl Build.PL'; if you have already installed
370 Bioperl answer 'no' to script installation to get nicer test output
372 Alternatively if you want to investigate the behavior of a specific test
373 such as the Seq test you would type:
375 >./Build test --test_files t/Seq.t --verbose
377 The ./ ensures you are using the Build script in the current directory to
378 make sure you are testing the modules in this directory not ones
379 installed elsewhere. The --test_files arguement can be used multiple times
380 to try a set of test scripts in one go. The --verbose arguement outputs
381 the detailed test results, instead of just the summary you see during
384 If you are trying to learn how to use a module, often the test suite is a
385 good place to look. All good extreme programmers try and write a test
386 BEFORE they write the module to insure that their module behaves the way
387 they expect. You'll notice some 'ok' and 'skip' commands in a test, this
388 is part of the Perl test suite that signifies a passed test with an 'ok
389 N', where N is the test number. Alternatively you can tell Perl to skip
390 tests. This is useful when, for example, your test detects that the
391 network is not present and thus should skip, not fail, any tests that
392 require a network connection.
394 BUILDING THE OPTIONAL bioperl-ext PACKAGE
396 The bioperl-ext package contains C code and XS extensions for
397 various alignment and trace file modules (Bio::Tools::pSW for DNA
398 Smith-Waterman, Bio::Tools::dpAlign for protein Smith-Waterman,
399 Bio::SearchDist for EVD fitting of extreme value,
402 This Installation may work out-of-the box for most platforms except BSD
403 and Solaris boxes. For other platforms skip this next paragraph. Of note,
404 the code for bioperl-ext has not been updated along with the rest of bioperl,
405 so one may expect to see some issues. If so, please report them to the
406 BioPerl mailing list.
408 CONFIGURING for BSD and Solaris boxes
410 You should add the line -fPIC to the CFLAGS line in
411 Compile/SW/libs/makefile. This makes the compile generate position
412 independent code, which is required for these architectures. In addition,
413 on some Solaris boxes, the generated Makefile does not make the correct
414 -fPIC/-fpic flags for the C compiler that is used. This requires manual
415 editing of the generated Makefile to switch case. Try it out once, and if
416 you get errors, try editing the -fpic line
420 Move to the directory bioperl-ext. This is available as a separate package
421 released from ftp://bioperl.org/pub/bioperl/DIST. This is where the C
422 code and XS extension for the bp_sw module is held and execute these
423 commands: (possibly after making the change for BSD and Solaris, as
426 perl Makefile.PL # makes the system specific makefile
427 make # builds all the libaries
428 make test # runs a short test
429 make install # installs the package correctly.
431 This should install the compiled extension. The Bio::Tools::pSW
432 module will work cleanly now.