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