Installing genometools for MacOS

I was trying to build genometools on my Mac laptop accoring to the INSTALL instructions but with no success.

I used genometools a lot for validating and fixing gff3 files. We had gt installed on the institute clusters but I wished to have it also on my Mac laptop so I can also work offline. To install genometools it’s easy for Debian and Ubuntu users through apt-get install but for Mac I need to build according to their instructions in the INSTALL file:

Building GenomeTools on Mac OS X (>= 10.6):

Make sure the command line developer tools are installed:

$ xcode-select --install

With these installed, you are ready to build GenomeTools without
AnnotationSketch support (cairo=no). To build GenomeTools with AnnotationSketch,
you can use Homebrew ( to install the necessary dependencies
required for building:

$ brew install caskroom/cask/brew-cask
$ brew cask install xquartz
$ brew install cairo
$ brew install pango

To start the build process, invoke make as stated above.

I tried to install dependencies using brew and still got an error after make:

src/annotationsketch/graphics_cairo.c:29:10: fatal error: 'pango/pangocairo.h' file not found

Then I tried make cairo=no and got another error:

Undefined symbols for architecture x86_64:
  "_gt_lua_open_annotationsketch", referenced from:
      _gt_lua_open_lib in libgenometools.a(gt_lua.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bin/gt] Error 1

It’s a bit frustrating and then I had a look at the Issue tracker on the github page. I found this: and the user said:

Nevermind I see its brew install genome tools. I wish this was clarified in the readme.

Yes, the actual easy way to use brew install genometools I hope they had put this in the instructions tool!

Now I can use:

gt gff3validator INPUT.gff
gt gff3 [-retainids] [-tidy yes] [-sort] [-addintrons] INPUT.gff -o OUTPUT.gff
gt stat [-intronlengthdistri] INPUT.gff
Z. Lu avatar
Z. Lu
Data science, bioinfo, scripting, parasites, retro, plain text.
comments powered by Disqus