HOWTO:Bioperl-live on Mac OS X

From QiuLab
Revision as of 03:03, 10 March 2011 by imported>Yozen (Created new page. Added hopefully mistake-free tutorial.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This document tries to provide a step-by-step procedure for installing bioperl-live (using the version control system called 'git') on to your personal machine running Mac OS X.

Optionally, you can also install the latest release for perl available for Mac OS X using the MacPorts project (a great way of getting much UNIX software on your Mac).

You need only to be familiar enough with using the terminal in Mac OS X to use this tutorial.

Note: I do not own a Mac of my own. If you experience issues or encounter something not described here, please email me and I will do my best to help.

Install MacPorts and Git

  1. Visit http://www.macports.org/install.php and scroll down to the section labeled "Mac OS X Package (.pkg) Installer". Depending on what version of OS X you are running, click on the appropriate version name (i.e., Snow Leopard for 10.6) to download the .pkg file.
  2. After downloading, double-click on the .pkg and follow the on-screen instructions.
  3. After installation is completed, you may have to log out and log in again.
  4. Now open the terminal. The quickest way to access it would be to open Spotlight (press Command+Space) and start typing Terminal.
  5. In the terminal, run
    sudo port install git-core
    This may take a long time.

Install bioperl-live

Git is needed to get the latest version of bioperl, referred to as "bioperl-live" as it is under active development. Here, we will use git to install a local copy of it.

  1. Create a directory called lib in your home directory (like in most other UNIX systems, your home directory is named after your username).
  2. From the terminal, navigate to that directory:
    cd ~/lib
  3. Now, use git to get bioperl-live:
    git clone git://github.com/bioperl/bioperl-live.git
    This will create a directory called "bioperl-live" in your lib directory.
  4. Finally, open the file ~/.profile in the terminal using what ever text editor you prefer. If you like using a graphical editor, Mac has one called TextEdit. The .profile file is hidden, and is found in your home directory.
  5. Add the following line to the end of that file:
    export PERL5LIB="${PERL5LIB}:${HOME}/lib/bioperl-live"
    and save it and close it.
  6. Exit the terminal with the exit command.
  7. Open the terminal again to verify bioperl was installed:
    perl -MBio::Perl -le 'print Bio::Perl->VERSION;'
    (This will output the "version" number for bioperl).

You may need to log out and log back in again for the bioperl-live path to be seen by perl. Otherwise, you can close the terminal and open a new one and see if that works.


Keep things up to date

bioperl-live is constantly worked on, and so will probably need updating fairly regularly. You can always do this from the terminal:

cd ~/lib/bioperl-live
git pull

If you use MacPorts a lot, you will find that software can also get outdated. Here is how you can update MacPorts and anything installed through it:

sudo ports selfupdate # updates MacPorts
sudo ports outdated # Checks if anything you installed with MacPorts needs updating
sudo ports upgrade outdated # Upgrades ALL things needing updates
sudo ports upgrade git # Upgrades only git and things it needs. (For any other package: use the package name instead of git).


OPTIONAL: Install latest perl release

  1. Open a terminal.
  2. Run this command:
sudo port install perl5
  1. Follow any instructions (I do not recall if there are any). This may also take a long time.

You should have the latest perl by now. Verify that it is at least 5.10 by running:

perl -v

Further reading/More resources

  1. The MacPorts guide (quite in-depth)
  2. Bioperl's UsingGit page. They have lots more information on git than I dare mention. Useful for people who are interested on working in Bioperl.