Installing Circos on OS X 10.13.5
This is intend to document the steps which helps me successfully install Circos software in my Mac OS X 10.13.5. This document is not my original, and is largely modified from several existing guide/tutorial pages (among them, one important guide I modified from is here).
Despite the beautiful image Circos can produce, installing Circos software on Mac is a problem for many new users. Hopefully this guide provides a step-by-step guide that helps you install Circos on your Mac (tested on OS X 10.13.5).
I have googled quite a lot, and thought this would be helpful for others who might run into similar problems.
Step1 install Homebrew
Open your terminal, you will see computer-name:/ username$.
run the script below:
$ ruby -e “$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)”
Step2 Install the prerequisites for Circos
Perl (if you have OS X 10.13.5, you should have installed the perl in the system, checking this by typing scripts: $ which perl or, $ perl -v)
You need to get freetype first because when you are installing gd, it will get libpng and jpeg for you automatically.
$ brew install freetype
$ brew install gd –with-freetype
Step 3 Install Perl modules
Perl has a module manager called CPAN. In order to install modules, you have to access CPAN.
$ sudo cpan
You will see the command line changed to cpan >. Issue the following command below to install all the modules Circos needs, except GD.
cpan > install Config::General
cpan > install Font::TTF
cpan > install List::MoreUtils
…(similarly for all these following functions) Math::Bezier Math::VecStat Math::Round Params::Validate Readonly Regexp::Common Set::IntSpan Text::Format
After installing the modules, you will need to download the perl GD module on your own and compile it.
Then, exit CPAN by typing exit.
Step4 Download and compile GD manually
$ curl -O http://www.cpan.org/authors/id/L/LD/LDS/GD-2.50.tar.gz
Extract and compile the content
$ tar xvfz GD-2.50.tar.gz
$ cd GD-2.50
$ perl Makefile.pl
$ make install
Step5 Install circos now
$ curl -O http://circos.ca/distribution/circos-0.69-6.tgz
$ tar xvf circos-0.69-6.tgz
$ sudo ln -s your-path-of-circos-0.69-6/bin/circos /usr/local/bin/circos
Step6 Test circos by run the script
$ (at the directory of /circos-0.69-6/example/, just directly type the following) ./run
Step7 Check the error message by opening file run.out, then use CPAN to install missing perl modules
The error message typically tells you which perl modules are missing, you just need to follow the message to install the missing perl modules by CPAN install commands as described above,
e.g. if you miss module Config::General, then you need to type this in your terminal: cpan > install Config::General
Step8 Rerun circos in step7 again
It should be successful by now, congrats! Now you can start having some fun with beautiful Circos graphs.