As a bioinformatician, I spend a lot of time generating, interpreting and presenting trees.
One of the most powerful ways to get some added value out of a tree is to be able to compare the phylogeny with the accessory gene content, to see if there is something going on with the mobile genetic elements that isn’t reflected in the core genome tree.
Kat Holt has a great post on different ways of doing this, and I recently got up and running with one of those methods and thought I would write it down before I forgot.
The method is ete2, a python library produces nicely annotated trees.
First things first, installation. It is not straightforward because there is a GUI element which requires a program called QT, a widely used and powerful GUI engine/design tool. However, as in many things brew makes life simpler. If the instructions on the ete2 guide don’t work for you, try this instead (more details on this site).
brew install qt (takes a while)
brew install sip
brew install pyqt
You will also need to ‘brew install mysql’ and ‘pip install MySQL-python’ if you don’t have this already.
Then you can ‘pip install ete2’ and you should be golden!
There are a few gotchas, namely that the order of the heatmap must be the same as the ordering in the tree, and as Kat Holt pointed out, if you want the tree to be ladderised, you will have to do this in e.g. figtree and then export the tree with the ‘saving as currently displayed box’ ticked.
Then, hopefully, when you run Alex’s script, a GUI will open containing something like the above (white = presence, black = absence, blue-red something in between), with your tree and associated features of interest. Hooray!