Easy trees and heatmaps with iTOL v3
/September 2017 edit: This method involves PhyloT, which has adopted a subscription model. Trees smaller than 10 items can be assembled freely, but for everything else, you may want to consider other options - or consider paying PhyloT.
If you're a well-organized biologists, you may have to work with phylogenetic trees frequently. You may even have to assemble them yourself. I find that trees look nice alongside heatmaps: that way, one part of a figure defines groups while the other part shows how they differ across a whole dataset.
Some difficulty can arise when combining large trees with large heatmaps. It's nearly trivial to produce one or the other (here are some of my recent examples for heatmaps in R, at least) but we prefer to keep the order of groups in the heatmap identical to that in the tree.
The Interactive Tree of Life (iTOL) may solve this problem for you and everyone else. It hit version 3 sometime over the past few months, finally making the transition to HTML5 and adding a full suite of annotation options. Starting with a tree like the following, users can just drag and drop annotation files into the browser window.
Here's an example tree:
#NEXUS begin trees; tree 'phyloT_generated_tree' = (((((((((((((((((((((((((((((((Mus_musculus)Mus)Mus,(Rattus_norvegicus)Rattus)Murinae)Muridae)Muroidea)Sciurognathi)Rodentia)Glires,((((((((Homo_sapiens)Homo,(Pan_troglodytes)Pan)Homininae)Hominidae)Hominoidea)Catarrhini)Simiiformes)Haplorrhini)Primates)Euarchontoglires)Boreoeutheria)Eutheria)Theria)Mammalia,(((((((((((((((Gallus_gallus)Gallus)Phasianinae)Phasianidae)Galliformes)Galloanserae)Neognathae)Aves)Coelurosauria)Theropoda)Saurischia)Dinosauria)Archosauria)Archelosauria)Sauria)Sauropsida)Amniota)Tetrapoda)Dipnotetrapodomorpha)Sarcopterygii)Euteleostomi)Teleostomi)Gnathostomata)Vertebrata)Craniata)Chordata)Deuterostomia)Bilateria)Eumetazoa)Metazoa)Opisthokonta)Eukaryota)cellular_organisms); end;
And here's an example of a data file used to add a heatmap:
DATASET_HEATMAP SEPARATOR TAB DATASET_LABEL label2 COLOR #ff0000 FIELD_LABELS X Y Z COLOR_MIN #ff0000 COLOR_MAX #0000ff DATA Gallus_gallus 1 1 1 Rattus_norvegicus 1 1 0 Mus_musculus 0 0 1 Homo_sapiens 1 1 1 Pan_troglodytes 0 1 0
We get the following result:
Or, for a larger example with more data (not shown):
The new iTOL can still be used with PhyloT to build trees, so now a full tree + heatmap combination could be assembled in very little time.