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