1 # $Id: INSTALL.WIN,v 1.25 2006-12-06 17:42:27 cjfields Exp $
3 Installing Bioperl on Windows
9 * 3 Installation using the Perl Package Manager
11 * 3.1 GUI Installation
12 * 3.2 Comand-line Installation
14 * 4 Installation using CPAN or manual installation
17 * 7 Bioperl on Windows
20 * 8.1 Setting environment variables
21 * 8.2 Installing bioperl-db
24 * 10 bioperl-db in Cygwin
26 * 12 MySQL and DBD::mysql
28 * 14 Directory for temporary files
34 This installation guide was written by Barry Moore, Nathan Haigh
35 and other Bioperl authors based on the original work of Paul Boutros. The
36 guide was updated for the BioPerl wiki by Chris Fields and Nathan
39 Please report problems and/or fixes to the BioPerl mailing list.
41 An up-to-date version of this document can be found on the BioPerl wiki:
43 http://www.bioperl.org/wiki/Installing_Bioperl_on_Windows
47 Only ActivePerl >= 5.8.8.819 is supported by the Bioperl team. Earlier
48 versions may work, but we do not support them.
50 One of the reason for this requirement is that ActivePerl >= 5.8.8.819 now
51 use Perl Package Manager 4 (PPM4). PPM4 is now superior to earlier
52 versions and also includes a Graphical User Interface (GUI). In short,
53 it's easier for us to produce and maintain a package for installation via
54 PPM and also easier for you to do the install! Proceed with earlier
55 versions at your own risk.
57 To install ActivePerl:
59 1) Download the ActivePerl MSI from ActiveState
61 2) Run the ActivePerl Installer (accepting all defaults is fine).
63 Installation using the Perl Package Manager
67 1) Start the Perl Package Manager GUI from the Start menu.
69 2) Go to Edit >> Preferences and click the Repositories tab. Add a
70 new repository for each of the following:
73 +----------------------------------------------------------------+
75 |--------------------------+-------------------------------------|
76 |BioPerl-Release Candidates|[37]http://bioperl.org/DIST/RC |
77 |--------------------------+-------------------------------------|
78 |BioPerl-Regular Releases |[38]http://bioperl.org/DIST |
79 |--------------------------+-------------------------------------|
80 |Kobes |[39]http://theoryx5.uwinnipeg.ca/ppms|
81 |--------------------------+-------------------------------------|
82 |Bribes |[40]http://www.Bribes.org/perl/ppm |
83 +----------------------------------------------------------------+
86 3) Select View >> All Packages.
88 4) In the search box type bioperl.
90 5) Right click the latest version of Bioperl available and choose
93 5a) From bioperl 1.5.2 onward, all 'optional' pre-requisites will
94 be marked for installation. If you see that some of them complain
95 about needing a command-line installation (eg. XML::SAX::ExpatXS),
96 and you want those particular pre-requisites, stop now (skip step
97 6) and see the 'Command-line Installation' section.
99 6) Click the green arrow (Run marked actions) to complete the
102 Comand-line Installation
104 1) Follow steps 1) and 2) from 'GUI Installation' above, if you
105 haven't done so already.
107 2) Open a cmd window by going to Start >> Run and typing 'cmd' and
110 3) Type the following into the cmd window:
116 (where the number matches the bioperl version needed) You can use '-force'
117 to force install if needed.
119 Installation using CPAN or manual installation
121 Installation using PPM is preferred since it is easier, but if you run
122 into problems, or a ppm isn't available for the version/package of bioperl
123 you want, or you want to choose which optional dependencies to install,
124 you can install manually by downloading the appropriate package or by
125 using CPAN. In fact both methods ultimately need nmake to be
126 installed, CPAN to be upgraded to >= v1.81, Module::Build to be installed
127 (>= v0.2805) and Test::Harness to be upgraded to >= v2.62:
131 2) Double-click to run it, which extracts 3 files. Move both
132 NMAKE.EXE and the NMAKE.ERR files to a place in your PATH; if set
133 up properly, you can move these to your Perl bin directory,
134 normally C:\Perl\bin.
136 1) Open a cmd window by going to Start >> Run and typing 'cmd'
137 into the box and pressing return.
139 2) Type 'cpan' to enter the CPAN shell.
141 3) At the cpan> prompt, type 'install CPAN' to upgrade to the
144 4) Quit (by typing 'q') and reload cpan. You may be asked some
145 configuration questions; accepting defaults is fine.
147 5) At the cpan> prompt, type 'o conf prefer_installer MB' to tell
148 CPAN to prefer to use Build.PL scripts for installation. Type 'o
149 conf commit' to save that choice.
151 6) At the cpan> prompt, type 'install Module::Build'.
153 7) At the cpan> prompt, type 'install Test::Harness'.
155 You can now follow the unix instructions for installing using CPAN, or
158 8) Download the .zip version of the package you want.
160 9) Extract the archive in the normal way.
162 10) In a cmd window 'cd' to the directory you extracted to. Eg. if
163 you extracted to directory 'Temp', 'cd Temp\bioperl-1.5.2_100'
165 11) Type 'perl Build.PL' and answer the questions appropriately.
167 12) Type 'perl Build test'. All the tests should pass, but if they
168 don't, let us know. Your usage of Bioperl may not be affected
169 by the failure, so you can choose to continue anyway.
171 13) Type 'perl Build install' to install Bioperl.
175 Bioperl is a large collection of Perl modules (extensions to the
176 Perl language) that aid in the task of writing Perl code to deal
177 with sequence data in a myriad of ways. Bioperl provides objects for
178 various types of sequence data and their associated features and
179 annotations. It provides interfaces for analysis of these sequences with a
180 wide variety of external programs (BLAST, FASTA, clustalw and
181 EMBOSS to name just a few). It provides interfaces to various types of
182 databases both remote (GenBank, EMBL etc) and local (MySQL,
183 Flat_databases flat files, GFF etc.) for storage and retrieval of
184 sequences. And finally with its associated documentation and
185 mailing lists, Bioperl represents a community of bioinformatics
186 professionals working in Perl who are committed to supporting both
187 development of Bioperl and the new users who are drawn to the project.
189 While most bioinformatics and computational biology applications are
190 developed in UNIX/Linux environments, more and more programs are
191 being ported to other operating systems like Windows, and many users
192 (often biologists with little background in programming) are looking for
193 ways to automate bioinformatics analyses in the Windows environment.
195 Perl and Bioperl can be installed natively on Windows NT/2000/XP.
196 Most of the functionality of Bioperl is available with this type of
197 install. Much of the heavy lifting in bioinformatics is done by programs
198 originally developed in lower level languages like C and Pascal
199 (e.g. BLAST, clustalw, Staden etc). Bioperl simply acts as
200 a wrapper for running and parsing output from these external programs.
202 Some of those programs (BLAST for example) are ported to Windows.
203 These can be installed and work quite happily with Bioperl in the native
204 Windows environment. Some external programs such as Staden and the
205 EMBOSS suite of programs can only be installed on Windows by using
206 Cygwin and its gcc C compiler (see Bioperl in Cygwin, below).
207 Recent attempts to port EMBOSS to Windows, however, have been mostly
210 If you have a fairly simple project in mind, want to start using Bioperl
211 quickly, only have access to a computer running Windows, and/or don't mind
212 bumping up against some limitations then Bioperl on Windows may be a
213 good place for you to start. For example, downloading a bunch of sequences
214 from GenBank and sorting out the ones that have a particular
215 annotation or feature works great. Running a bunch of your sequences
216 against remote or local BLAST, parsing the output and storing it
217 in a MySQL database would be fine also.
219 Be aware that most Bioperl developers are working in some type of a
220 UNIX environment (Linux, OS X, Cygwin). If you have
221 problems with Bioperl that are specific to the Windows environment, you
222 may be blazing new ground and your pleas for help on the Bioperl mailing
223 list may get few responses (you can but try!) - simply because no one
224 knows the answer to your Windows specific problem. If this is or becomes a
225 problem for you then you are better off working in some type of UNIX-like
226 environment. One solution to this problem that will keep you working on a
227 Windows machine it to install Cygwin, a UNIX emulation environment for
228 Windows. A number of Bioperl users are using this approach successfully
229 and it is discussed in more detail below.
233 There are a couple of ways of installing Perl on a Windows machine. The
234 most common and easiest is to get the most recent build from
235 ActiveState, a software company that provides free builds of Perl for
236 Windows users. The current (October 2006) build is ActivePerl 5.8.8.819.
237 Bioperl also works on Perl 5.6.x, but due to installation problems etc,
238 only ActivePerl 5.8.8.819 or later is supported for WinXP installation.
239 To install ActivePerl on Windows:
241 1) Download the ActivePerl MSI from
242 http://www.activestate.com/Products/ActivePerl/.
244 2) Run the ActivePerl Installer (accepting all defaults is fine).
246 You can also build Perl yourself (which requires a C compiler) or download
247 one of the other binary distributions. The Perl source for building it
248 yourself is available from CPAN, as are a few other binary
249 distributions that are alternatives to ActiveState. This approach is not
250 recommended unless you have specific reasons for doing so and know what
251 you're doing. If that's the case you probably don't need to be reading
254 Cygwin is a UNIX emulation environment for Windows and comes with
255 its own copy of Perl.
257 Information on Cygwin and Bioperl is found below.
261 Perl is a programming language that has been extended a lot by the
262 addition of external modules.
264 These modules work with the core language to extend the functionality of
267 Bioperl is one such extension to Perl. These modular extensions to
268 Perl sometimes depend on the functionality of other Perl modules and this
269 creates a dependency. You can't install module X unless you have already
270 installed module Y. Some Perl modules are so fundamentally useful that the
271 Perl developers have included them in the core distribution of Perl - if
272 you've installed Perl then these modules are already installed. Other
273 modules are freely available from CPAN, but you'll have to install them
274 yourself if you want to use them. Bioperl has such dependencies.
276 Bioperl is actually a large collection of Perl modules (over 1000
277 currently) and these modules are split into seven packages. These seven
280 +------------------------------------------------------------------------+
281 | Bioperl Group | Functions |
282 |----------------------+-------------------------------------------------|
283 |bioperl (the core) |Most of the main functionality of Bioperl |
284 |----------------------+-------------------------------------------------|
285 |bioperl-run |Wrappers to a lot of external programs |
286 |----------------------+-------------------------------------------------|
287 |bioperl-ext |Interaction with some alignment functions and the|
289 |----------------------+-------------------------------------------------|
290 |bioperl-db |Using Bioperl with BioSQL and local relational |
292 |----------------------+-------------------------------------------------|
293 |bioperl-microarray |Microarray specific functions |
294 |----------------------+-------------------------------------------------|
295 |bioperl-pedigree |manipulating genotype, marker, and individual |
296 | |data for linkage studies |
297 |----------------------+-------------------------------------------------|
298 |bioperl-gui |Some preliminary work on a graphical user |
299 | |interface to some Bioperl functions |
300 +------------------------------------------------------------------------+
302 The Bioperl core is what most new users will want to start with. Bioperl
303 (the core) and the Perl modules that it depends on can be easily installed
304 with the perl package Manager PPM. PPM is an ActivePerl utility for
305 installing Perl modules on systems using ActivePerl. PPM will look online
306 (you have to be connected to the internet of course) for files (these
307 files end with .ppd) that tell it how to install the modules you want and
308 what other modules your new modules depends on. It will then download and
309 install your modules and all dependent modules for you.
311 These .ppd files are stored online in PPM repositories. ActiveState
312 maintains the largest PPM repository and when you installed ActivePerl PPM
313 was installed with directions for using the ActiveState repositories.
314 Unfortunately the ActiveState repositories are far from complete and other
315 ActivePerl users maintain their own PPM repositories to fill in the gaps.
316 Installing will require you to direct PPM to look in three new
317 repositories as detailed in Installation Guide.
319 Once PPM knows where to look for Bioperl and it's dependencies you simply
320 tell PPM to search for packages with a particular name, select those of
321 interest and then tell PPM to install the selected packages.
325 You may find that you want some of the features of other Bioperl groups
326 like bioperl-run or bioperl-db. Currently, plans include setting up PPM
327 packages for installing these parts of Bioperl; check this by doing a
328 Bioperl search in PPM. If these are not available, though, you can use
329 the following instructions for installing the other distributions.
331 For this you will need a Windows version of the program make
334 http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe
336 You will also want to have a willingness to experiment. You'll have to
337 read the installation documents for each component that you want to
338 install, and use nmake where the instructions call for make, like so:
345 'nmake test' will likely produce lots of warnings, many of these can be
346 safely ignored (these stem from the excessively paranoid '-w' flag in
347 ActivePerl). You will have to determine from the installation documents
348 what dependencies are required, and you will have to get them, read their
349 documentation and install them first. It is recommended that you look
350 through the PPM repositories for any modules before resorting to using
351 nmake as there isn't any guarantee modules built using nmake will work.
352 The details of this are beyond the scope of this guide. Read the
353 documentation. Search Google. Try your best, and if you get stuck consult
354 with others on the BioPerl mailing list.
356 Setting environment variables
358 Some modules and tools such as Bio::Tools::Run::StandAloneBlast and
359 clustal_w, require that environment variables are set; a few examples
360 are listed in the INSTALL document. Different versions of Windows utilize
361 different methods for setting these variables. NOTE: The instructions that
362 comes with the BLAST executables for setting up BLAST on Windows are
363 out-of-date. Go to the following web address for instructions on setting
364 up standalone BLAST for Windows:
365 http://www.ncbi.nlm.nih.gov/staff/tao/URLAPI/pc_setup.html
367 * For Windows XP, go here. This does not require a reboot but all
368 active shells will not reflect any changes made to the environment.
369 * For older versions (Windows 95 to ME), generally editing the
370 C:\autoexec.bat file to add a variable works. This requires a reboot.
373 set BLASTDB=C:\blast\data
375 For either case, you can check the variable this way:
377 C:\Documents and Settings\Administrator>echo %BLASTDB%
380 Some versions of Windows may have problems differentiating forward and
381 back slashes used for directories. In general, always use backslashes (\).
382 If something isn't working properly try reversing the slashes to see if it
385 For setting up Cygwin environment variables quirks, see an example
388 Installing bioperl-db
390 bioperl-db now works for Windows w/o installing CygWin. This has
391 primarily been tested on WinXP using MySQL5, but it is expected that other
392 bioperl-db supported databases (PostgreSQL, Oracle) should work.
394 You will need Bioperl rel. 1.5.2, a relational database (I use MySQL5 here
395 as an example), and the Perl modules DBI and DBD::mysql, which
396 can be installed from PPM as desribed above (make sure the additional
397 repositories for Kobes and Bribes are added, they will have the latest
398 releases). Do NOT try using nmake with these modules as they will not
399 build correctly under Windows! The PPM builds, by Randy Kobes, have been
400 modified and tested specifically for Windows and ActivePerl.
402 NOTE: we plan on having a PPM for bioperl-db available along with the
403 regular bioperl 1.5.2 release PPM. We will post instructions at that
404 time on using PPM to install bioperl-db.
406 To begin, follow instructions detailed in the Installation Guide for
407 adding the three new repositories (Bioperl, Kobes and Bribes). Then
408 install the following packages:
413 The next step involves creating a database. The following steps are for
416 >mysqladmin -u root -p create bioseqdb
417 Enter password: **********
419 The database needs to be loaded with the BioSQL schema, which can be
420 downloaded as a tarball here.
422 >mysql -u root -p bioseqdb < biosqldb-mysql.sql
423 Enter password: **********
425 Download bioperl-db from CVS. Use the following to install the
431 Now, for testing out bioperl-db, make a copy of the file
432 DBHarness.conf.example in the bioperl-db test subdirectory (bioperl-db\t).
433 Rename it to DBHarness.biosql.conf, and modify it for your database setup
434 (particularly the user, password, database name, and driver). Save the
435 file, change back to the main bioperl-db directory, and run 'nmake test'.
436 You may see lots of the following lines,
439 Subroutine Bio::Annotation::Reference::(eq redefined at C:/Perl/lib/overload.pm line 25,
441 Subroutine new redefined at C:\Perl\src\bioperl\bioperl-live/Bio\Annotation\Reference.pm line 80,
445 which can be safely ignored (again, these come from ActivePerl's paranoid
446 '-w' flag). All tests should pass. NOTE : tests should be run with
447 a clean database with the BiOSQL schema loaded, but w/o taxonomy loaded
454 It is recommended that you load the taxonomy database using the script
455 load_ncbi_taxonomy.pl included in biosql-schema\scripts. You will need to
456 download the latest taxonomy files. This can be accomplished using the
457 -download flag in load_ncbi_taxonomy.pl, but it will not 'untar' the file
458 correctly unless you have GNU tar present in your PATH (which most Windows
459 users will not have), thus causing the following error:
461 >load_ncbi_taxonomy.pl -download -driver mysql -dbname bioseqdb -dbuser root -dbpass **********
462 The system cannot find the path specified.
463 Loading NCBI taxon database in taxdata:
464 ... retrieving all taxon nodes in the database
465 ... reading in taxon nodes from nodes.dmp
466 Couldn't open data file taxdata/nodes.dmp: No such file or directory rollback ineffective with
467 AutoCommit enabled at C:\Perl\src\bioperl\biosql-schema\scripts\load_ncbi_taxonomy.pl line 818.
468 Rollback ineffective while AutoCommit is on at
469 C:\Perl\src\bioperl\biosql-schema\scripts\load_ncbi_taxonomy.pl line 818.
470 rollback failed: Rollback ineffective while AutoCommit is on
472 Use a file decompression utility like 7-Zip to 'untar' the files in
473 the folder (if using 7-Zip, this can be accomplished by right-clicking on
474 the file and using the option 'Extract here'). Rerun the script without
475 the -download flag to load the taxonomic information. Be patient, as this
476 can take quite a while:
478 >load_ncbi_taxonomy.pl -driver mysql -dbname bioseqdb -dbuser root -dbpass **********
480 Loading NCBI taxon database in taxdata:
481 ... retrieving all taxon nodes in the database
482 ... reading in taxon nodes from nodes.dmp
483 ... insert / update / delete taxon nodes
484 ... (committing nodes)
485 ... rebuilding nested set left/right values
486 ... reading in taxon names from names.dmp
487 ... deleting old taxon names
488 ... inserting new taxon names
492 Now, load the database with your sequences using the script
493 load_seqdatabase.pl, in bioperl-db's bioperl-db\script directory:
495 C:\Perl\src\bioperl\bioperl-db\scripts\biosql>load_seqdatabase.pl -drive mysql
496 -dbname bioseqdb -dbuser root -dbpass **********
497 Loading NP_249092.gpt ...
500 You may see occasional errors depending on the sequence format, which is a
501 non-platform-related issue. Many of these are due to not having an updated
502 taxonomic database and may be rectified by updating the taxonomic
503 information as detailed in load_ncbi_taxonomy.pl's POD.
505 Thanks to Baohua Wang, who found the initial Windows-specific problem in
506 Bio::Root::Root that led to this fix, to Sendu Bala for fixing
507 Bug #1938, and to Hilmar Lapp for his input.
511 Cygwin is a Unix emulator and shell environment available free at
512 http://www.cygwin.com. Bioperl v. 1.* supposedly runs well within Cygwin,
513 though the latest release has not been tested with Cygwin yet. Some
514 users claim that installation of Bioperl is easier within Cygwin than
515 within Windows, but these may be users with UNIX backgrounds. A note on
516 Cygwin: it doesn't write to your Registry, it doesn't alter your system or
517 your existing files in any way, it doesn't create partitions, it simply
518 creates a cygwin/ directory and writes all of its files to that directory.
519 To uninstall Cygwin just delete that directory.
521 One advantage of using Bioperl in Cygwin is that all the external modules
522 are available through CPAN - the same cannot be said of ActiveState's PPM
525 To get Bioperl running first install the basic Cygwin package as well as
526 the Cygwin perl, make, binutils, and gcc packages. Clicking the View
527 button in the upper right of the installer window enables you to see
528 details on the various packages. Then start up Cygwin and follow the
529 Bioperl installation instructions for UNIX in Bioperl's INSTALL file
530 (for example, THE BIOPERL BUNDLE and INSTALLING BIOPERL THE EASY WAY USING
535 This package is installed using the instructions contained in the package,
536 without modification. Since postgres is a package within Cygwin this is
537 probably the easiest of the 3 platforms supported in bioperl-db to
538 install (postgres, Mysql, Oracle).
542 If you can, install Cygwin on a drive or partition that's
543 NTFS-formatted, not FAT32-formatted. When you install Cygwin on
544 a FAT32 partition you will not be able to set permissions and ownership
545 correctly. In most situations this probably won't make any difference but
546 there may be occasions where this is a problem.
548 If you're trying to use some application or resource outside of Cygwin
549 directory and you're having a problem remember that Cygwin's path syntax
550 may not be the correct one. Cygwin understands /home/jacky or
551 /cygdrive/e/cygwin/home/jacky (when referring to the E: drive) but the
552 external resource may want E:/cygwin/home/jacky. So your *rc files may end
553 up with paths written in these different syntaxes, depending.
557 You may want to install a relational database in order to use BioPerl
558 db, BioSQL or OBDA. The easiest way to install Mysql is to use
559 the Windows binaries available at http://www.mysql.com. Note that
560 Windows does not have sockets, so you need to force the Mysql connections
561 to use TCP/IP instead. Do this by using the -h, or host, option from the
562 command-line. Example:
564 >mysql -h 127.0.0.1 -u <user> -p<password> <database>
566 Alternatively you could install postgres instead of MySQL, postgres is
567 already a package in Cygwin.
569 One known issue is that DBD::mysql can be tricky to install in Cygwin
570 and this module is required for the bioperl-db, Biosql, and
571 bioperl-pipeline external packages. Fortunately there's some good
574 * Instructions included with DBD::mysql:
576 http://search.cpan.org/src/JWIED/DBD-mysql-2.1025/INSTALL.html#windows/cygwin
578 * Additional instructions if you run into any problems; this
579 information is more up-to-date, covers post-2.9 DBD::mysql quirks in
582 http://rage.against.org/installingdbdmysqlInCygwin
586 Note that expat comes with Cygwin (it's used by the modules
587 XML::Parser and XML::SAX::ExpatXS, which are used by certain
590 Directory for temporary files
592 Set the environmental variable TMPDIR, programs like BLAST and
593 clustalw need a place to create temporary files. e.g.:
595 setenv TMPDIR e:/cygwin/tmp # csh, tcsh
596 export TMPDIR=e:/cygwin/tmp # sh, bash
598 This is not the syntax that Cygwin understands, which would be something
599 like /cygdrive/e/cygwin/tmp or /tmp, this is the syntax that a Windows
602 If this variable is not set correctly you'll see errors like this when you
603 run Bio::Tools::Run::StandAloneBlast:
605 ------------- EXCEPTION: Bio::Root::Exception -------------
606 MSG: Could not open /tmp/gXkwEbrL0a: No such file or directory
614 If you want use BLAST we recommend that the Windows binary be obtained
615 from NCBI (ftp://ftp.ncbi.nih.gov/blast/executables/LATEST/ - the
616 file will be named something like blast-2.2.13-ia32-win32.exe). Then
617 follow the Windows instructions in README.bls. You will also need to set
618 the BLASTDIR environment variable to reflect the directory which holds the
619 blast executable and data folder. You may also want to set other variables
620 to reflect the location of your databases and substitution matrices if
621 they differ from the location of your blast executables; see
622 Installing Bioperl for Unix for more details.
626 Although we've recommended using the BLAST and MySQL binaries
627 you should be able to compile just about everything else from source code
628 using Cygwin's gcc. You'll notice when you're installing Cygwin that many
629 different libraries are also available (gd, jpeg, etc.).