It took a little finagling to build the Python module egglib for population genetic analyses. Here’s how I did it.
Platform on which this was tested:
- OS X 10.7
- Apple Xcode command line tools
- Many tools install via Homebrew
Pre-requisites for Bio++
Install the following via brew:
- cmake –
brew install cmake
- doxygen –
brew install doxygen
Building and installing Bio++
Create a temporary directory to build the libraries
1
|
|
Download and unzip the libraires
We just need three of the Bio++ libraries:
- bpp-core
- bpp-seq
- bpp-popgen
Use curl
from the command line to download the libraries:
1 2 3 4 |
|
And then unzip each library:
1 2 |
|
Building individual Bio++ libraries
Build the libraries in the following order:
- bpp-core
1 2 3 4 |
|
- bpp-seq
1 2 3 4 |
|
- bpp-popgen
1 2 3 4 |
|
Pre-requisites for egglib
These aren’t required but we might as well install them.
First, let’s “tap” the Homebrew science packages:
1
|
|
Then install all the following via brew:
- gsl –
brew install gsl
- clustalw –
brew install clustal-w
- muscle –
brew install muscle
- paml –
brew install paml
- phyml –
brew install phyml
- primer3 –
brew install primer3
- phylip –
brew install phylip
Building and installing egglib
Download the following source packages from the egglib sourceforge site:
- egglib-cpp-2.1.5.tar.gz
- egglib-py-2.1.5.tar.gz
Move these to a temporary directory (e.g. ~/tmp/egglib
) and unzip them (tar xvzf ....
).
Build the egglib c++ library
1 2 3 4 |
|
Build the egglib Python library
When I tried to build the egglib Python library, setup.py
wasn’t finding the appropriate version of gcc for some reason. Here’s how I fixed that (note the addition of the CC
environment variable before the setup.py
call):
1 2 3 |
|
Test your installation of egglib
Confirm that egglib import’s correctly:
1 2 3 4 5 6 |
|