Installing Bioperl 0.7 on MacOS 9 running MacPerl 5.004

Contact: Todd Richmond (todd@andrew2.stanford.edu)

Before getting started

Before you start, needless to say, you should have MacPerl installed on your machine. You should also grab Chris Nandor’s CPAN-mac scripts for unpacking and installing perl modules. Go to Pudge’s Pad (http://pudge.net/macperl/ ) and follow the cpan-mac link at the bottom of the page. This will take you to SourceForge, where you can download the cpan-mac package (v 0.50). Follow the directions to install and configure this package.

Most perl modules are distributed as tarred and gzipped files. Stuffit Expander can deal with both of these file formats, but sometimes has problems. I recommend using MacGzip and Suntar instead. You can find both by using Versiontracker (http://www.versiontracker.com ). Do a search for both. You should find MacGzip 1.13. and Suntar 2.2.1. Both are small, freeware programs and definitely worth having. One of the issues you’ll have working with perl modules is line-endings. Make sure that Suntar or whatever program you’re using automatically converts Unix line-endings to Mac line-endings. Otherwise use Versiontracker to find a utility to help you do the conversions.

One change I recommend is changing the location of your MacPerl temporary directory. The current default is the invisible ‘Temporary Items’ folder. Being invisible, it’s hard to manually clean up leftover temporary files that sometimes get left behind.
  1. Make a folder called ‘tmp’ some place on your hard disk (i.e. in your Documents folder)
  2. Go to MacPerl->Edit->Preferences
  3. Click on Environment
  4. Delete the existing TMPDIR variable
  5. Respecify the TMPDIR location
  6. Add Variable
  7. Specify TMPDIR for Name
  8. Click on folder and choose the ‘tmp’ folder above

External dependencies

The bioperl package requires a number of other modules. Before you install bioperl, you’ll have to install them. The list of packages is given below. Some will not work on Macs, but they are listed for reference below. Consult the list if bioperl complains that they are not installed.

XML::Parser

  1. Go to the MacPerl Module Porters: Module List (http://pudge.net/cgi-bin/mmp.plx ). At the bottom of the page is a link to the XML::Parser binary (http://www.perl.com/CPAN/authors/id/A/AS/ASANDSTRM/XML-Parser-2.27-bin-1-MacOS.tgz).
  2. Download, unzip and untar the file. A folder called “XML-Parser-2.27-bin-1-MacOS” will be created. Drop this unto the installme.plx script and the files should be copied to the correct place.
  3. To check the installation, go into the ‘t’ folder of the XML-Parser folder and run each of the test scripts using MacPerl. On a Unix machine, it’s possible to do a very simple “make”, “make test”, “make install” sequence that preps an installation, tests it first, and then installs it. On Macs we have to install first, test later. There are 13 test in total for XML::Parser. To run the tests, open each “.t” file in MacPerl and choose the run command under the Script menu. If you're going to be running a lot of tests, it's conventient to use command-R, to open and run the script with a single command. The result of the test will be output to the MacPerl standard output window. The first line will show the number of tests that will be run (i.e. 1..13). Then, if everything is installed correctly, you'll see a series of “ok 1”,“ok 2”, etc. If the test fails, the output will say “not ok 1”, sometimes followed by some sort of explanation. For XML::Parser, some of the test scripts have already had the path separators changed from the Unix ‘/’ to Mac ‘:’, and the originals have been renamed .t.orig. You can ignore those original files. For other tests scripts you may have to make manual changes to help the test script find the example files. See the bioperl installation below for an example. For XML::Parser, to make sure the test scripts work properly, you’ll have to move the “samples” folder into the “t” folder so that the test scripts can find the files. “parament.t” will fail – it’s trying to find “foo.dtd” but the filepath is hard-coded in. To get this to work, hand-edit the “parament.t ”; look for foo.dtd and remove the ‘:t:’ from in front of the filename.

XML::Writer

  1. Go to CPAN (http://search.cpan.org) and search for XML::Writer.
  2. Download XML-Writer-0.4.tar.gz and install as described above.
  3. The tests for XML::Writer require IO::File. It should already be installed as part of the standard Mac distribution.

XML::Node

  1. Download XML-Node-0.10.tar.gz from CPAN
  2. Install
  3. Passes all three tests

XML::Parser::PerlSAX

  1. Download libxml-perl-0.07.tar.gz from CPAN
  2. Install
  3. Only 2 of the tests from the 6 test scripts fail. Not sure if this will affect Bioperl usage.

IO::Scalar

  1. Download IO-stringy-1.219.tar.gz from CPAN
  2. Install
  3. Five out of the 27 tests for IO::Scalar fail. Since it is needed by Bio::Tools::Blast::Run::Webblast, and it’s not clear that will work with MacPerl, it’s best not to worry about it for now.

IO::String

  1. Not going to work on Macs becauses IO-String requires perl 5.005_03 (requires the self-tie patch?)

File::Temp

  1. Not going to work on Macs, requires 5.005 (and a few other dependencies)

File::Spec

  1. Not listed as a dependency but still necessary
  2. Download File-Spec-0.82.tar.gz  from CPAN
  3. Some of the VMS tests fail, but this doesn’t matter for us.

Carp

  1. Some of the modules use Carp to give some error messages. Unfortunately the version of Carp distributed with MacPerl is too old to support “cluck”.
  2. Download perl source (perl-5.6.1-TRIAL2 or whatever is current) from CPAN. Yes, you have to download the whole thing – I haven’t been able to find Carp distributed outside of the standard source distribution.
  3. Find the lib folder in the perl source, and copy Carp.pm and the Carp folder to your MacPerl lib folder.

AcePerl

  1. Can ignore unless you’re going to do something with AceDB.

Installing Bioperl 0.7

Download the bioperl package, either from CPAN (http://search.cpan.org) or directly from the bioperl.org site (http://bioperl.org). (If you want the most up-to-date package, you can install one of the Mac CVS programs and get the latest source directly from http://cvs.bioperl.org ) Unzip and untar the file, which should give a bioperl folder. Drop this folder on cpan-mac’s installme.plx script, and it will go to work copying files to the correct location. You will see a bunch of warnings if you have not installed all the packages above. You will still see some even if you did – you can probably ignore them.

Checking the installation

Now check the BioPerl tests. Go through and do a global search-and-replace on all of the ‘.t’ files and replace the string “t” with “:t”. Then make a copy of the entire ‘t’ folder and place it in the ‘t’ folder. This is necessary because normally test scripts are run one level up and without this change, the test scripts will not be able to find the example data files in the ‘t’ folder.
AAChange.t
All tests pass
AAReverseMutate.t
All tests pass
AlignIO.t
All tests pass
Allele.t
All tests pass
Annotation.t
All tests pass
Blast.t
1..24 pass, skips the remainder
BPbl2seq.t
All tests pass
BPlite.t
All tests pass
BPpsilite.t
1..8 pass, then halts with
# Can't use an undefined value as an ARRAY reference.
File 'Disk2:bioperl:bioperl-live:t:BPpsilite.t'; Line 56

ok $last_iteration2->newhits->[1] =~ /ARATH/;# " Hit not found in phiblast report";
Sorry – no fix for this...
Chain.t
Test 5 fails.
not ok 5
# Test 5 got: '' (Disk2:bioperl:bioperl-live:t:Chain.t at line 45)
# Expected: '1'
Clustalw.t
Skips tests – command line clustalw isn’t available on Macs
CodonTable.t
All tests pass
DB.t
Requires IO::String. Should gracefully exit, but sometimes doesn’t
DNAMutation.t
All tests pass
exception.t
All tests pass
game.t
All tests pass
GDB.t
Fails. Fetching sequences from remote databases doesn’t work for Mac users. Appears to be a problem with HTML parser
Genpred.t
All tests pass
GFF.t
All tests pass
hmmer.t
All tests pass
HSP.t
All tests pass
HTML.t
All tests pass
Index.t
Fails. Uses DB_File which is not current on MacOS
largefasta.t
Requires MacOS patch for LargePrimarySeq.pm. Download the Mac version of LargePrimarySeq.pm from ftp://cellwall.stanford.edu/public/bioperl and place in the Bio:Seq folder in your MacPerl lib folder.
largepseq.t
Requires same MacOS patch as largefasta.t
LiveSeq.t
All tests pass
Location.t
All tests pass
multiple_fasta.t
All tests pass
Mutation.t
All tests pass
Mutator.t
All tests pass
OddCodes.t
All tests pass
PrimarySeq.t
All tests pass
Range.t
All tests pass
RangeI.t
All tests pass
RestrictionEnzyme.t
All tests pass
RNAChange.t
All tests pass
RootI.t
All tests pass
Sbjct.t
All tests pass
SearchDist.t
Skips tests gracefully because external dependency not found
Seq.t
All tests pass
SeqAnal.t
All tests pass
SeqAnalysisParser.t
Need to patch sub loader() in Bio::Factory::FactoryDriver.pm
Find:
my $io = new Bio::Root::IO();
# catfile comes from IO
$load = $io->catfile((split(/::/,$load)));

change last line of code to:
$load = $io->catfile(':',(split(/::/,$load)));

All tests pass with this patch
SeqDiff.t
All tests pass
SeqFeature.t
All tests pass
SeqIO.t
All tests pass
SeqPattern.t
All tests pass
SeqStats.t
All tests pass
SeqUtils.t
All tests pass
Sigcleave.t
All tests pass
Sim4.t
All tests pass
SimilarityPair.t
All tests pass
SimpleAlign.t
All tests pass
Species.t
All tests pass
StandAloneBlast.t
Skips tests – no standalone Blast
TCoffee.t
Requires change as specified in SeqAnalysisParser.t
Skips tests 5..9 – Tcoffee not installed
Tempfile.t
All tests pass (assuming tmp directory cleared out of all old temporary files from failed attempts of other tests)
Tools.t
All tests pass
UnivAln.t
All tests pass
Variation_IO.t
Only the first 16 tests pass. Remainder require IO::String???
WWW.t
All tests pass


Email: todd@andrew2.stanford.edu
  Last updated on: March 2, 2001