HOWTO:Bioperl-live on Mac OS X

From QiuLab
Jump to navigation Jump to search

Warning: These instructions may be outdated. Mac OS X 10.6 and 10.7 users should follow the directions here while 10.8 users should follow the generic UNIX instructions here.

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, you can run it using this command:
    open -a TextEdit ~/.profile
    More experienced users can use a command line text editor.
  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 port selfupdate # updates MacPorts
sudo port outdated # Checks if anything you installed with MacPorts needs updating
sudo port upgrade outdated # Upgrades ALL things needing updates
sudo port 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

Note: It has been pointed out that following the instructions above automatically installs the latest perl. This is left here in case anyone wanted to know how to do only this.

  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.