Zientzilaria

Covering the bioinformatics niche and much more

Alternative Way of Installing Circos on OS X

| Comments

On my last post about installing Circos on OS X, we have dealt with the traditional way of creating the required libraries for Circos to run. Most of the comments that post gets are related to difficulties of GD in getting some of the libraries correct (either PNG or JPEG). I have tested another way of installing these libraries and running Circos properly.

In the past, MacPorts was the main source of pre-compiled libraries and programs for OS X that could be installed directly from the CLI, something like Debian’s apt-get. But, at the same time, it was a nice tool to have, MacPorts had a lot of problems and sometimes couldn’t find the proper files, or even won’t complete the installation. Lately, Homebrew has been gaining a lot of ground replacing MacPorts and it’s a very easy tool to use. Homebrew has a list of recipes to download, compile and symlink software ohn OS X (you might have problems here and there, but it’s quite stable).

I used an OS X Virtual Machine to install Circos’ required libraries in order to avoid conflicts to my currently installed versions.

Starting the terminal, we first need to install Homebrew, just run:

1
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

We can also run

1
brew doctor

to check for problems, but you should be ready to go. We don’t need to install all libraries for GD, just make Homebrew install GD and all requirements will be fulfilled:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$ brew install gd
==> Installing gd dependency: libpng
==> Downloading http://downloads.sf.net/project/libpng/libpng15/older-releases/1.5.14/libpng-1.5.14.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/libpng/1.5.14
==> make install
🍺  /usr/local/Cellar/libpng/1.5.14: 15 files, 1.0M, built in 14 seconds
==> Installing gd dependency: jpeg
==> Downloading http://www.ijg.org/files/jpegsrc.v8d.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/jpeg/8d
==> make install
🍺  /usr/local/Cellar/jpeg/8d: 18 files, 768K, built in 14 seconds
==> Installing gd
==> Downloading https://bitbucket.org/libgd/gd-libgd/downloads/libgd-2.1.0.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/gd/2.1.0 --with-png=/usr/local/opt/libpng --without-freetype --with-jpeg=/usr
==> make install
🍺  /usr/local/Cellar/gd/2.1.0: 32 files, 1.0M, built in 18 seconds

Check for all the other missing Perl modules, install them with cpan

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
cpan$ install Config::General
-output omitted-

cpan$ install Graphics::ColorObject
-output omitted-

cpan$ install Math::Bezier
-output omitted-

cpan$ install Math::VecStat
-output omitted-

cpan$ install Readonly
-output omitted-

cpan$ install Set::IntSpan
-output omitted-

and install Perl’s GD interface manually

Installing GD on perl
1
2
3
4
5
6
srctemp$ curl -O http://www.cpan.org/authors/id/L/LD/LDS/GD-2.49.tar.gz (if curl fails copy and past on your browser)
srctemp$ tar -xzvf GD-2.49.tar.gz
srctemp$ cd GD-2.49
srctemp/GD-2.49$ perl Makefile.PL
srctemp/GD-2.49$ make
srctemp/GD-2.49$ sudo make install

and you should be good to go.

Comments