Wednesday, 17 April 2013

How to read a phylogenetic tree

This week I have been preparing my last phylogenetics lectures and practical of the year. Something that is quite clear when marking student work is that many students have no idea how to read a phylogenetic tree and identify the key features about it that aid interpretation. To help combat this, here is my basic guide of "How to read a phylogenetic tree".

Topology

The first and possibly most important thing about any tree is the topology - the branching order. It's easy to get distracted by the direction or style of the tree (e.g. curved branches versus straight) but none of these things matter for the topology. The key thing here is the path taken from one node to the other and how the species (or molecules but I will just refer to species here for clarity) cluster together. The "direction" of the tree and whether the (terminal) "leaf" nodes are at the top, bottom, left or right is not important. (I'll come back to this below, for "rooting") Likewise, the vertical ordering of nodes is not inherently important - whether a particular node appears at the top, bottom or somewhere in the middle of the tree is largely a matter of preference that will depend on the purpose of the tree and the story you are using it to tell.

In fact, it is easier to look at the branches in a tree, as nodes can be rearranged in a way that can at first appear confusing. These four trees, for example, all have the same topology:
Each branch can be thought of as dividing the tree in two and splitting the species into two accordingly. If two trees share a topology, their branches will make the same splits, even if their (in this case) vertical ordering is different. Trace, for example, the path from A to D. This is easiest first in the top left tree. The branch leading directly to A splits the tree into A:BCDE. The next splits AB from CDE. (This has the root, which I will come to, below.) Now, moving back out from the root to the tip, we travel along a branch that splits ABE:CD before finally the branch leading only to D and splitting it from ABCE. Tracing the path of A to D in any of the other three trees will take exactly the same route. Any other tip to tip journeys will likewise be the same in these four trees.

This is particularly important when comparing trees, particularly big ones. I have seen people invest a lot of time and effort (and sometimes manuscript space) speculating about the differences between two particular trees when, in fact, they were really the same tree and there was no difference. Alternatively, the topology might be the same but the differences might just be due to where the tree was rooted, which I will return to.

Branch Lengths

Once the topology is clear, the next things to look at are the branch lengths, as these can give key insights into how the tree can be interpreted and, sometimes, even the methods behind the tree. There are two key things to look at in this respect: (1) the distance between (not necessarily connected) internal nodes, shown with the red arrows below, and (2) the root-to-tip distances for each terminal node, shown by the coloured arrows in the figure below:
If the spacing is even (i.e. all the red arrows are the same length) then it is highly likely that branch lengths are not being shown and the tree is only displaying the toplogy. This can be confirmed by (a) the lack of a scale bar, and (b) a bias towards internal nodes towards the tips. (In the left tree, the node joining AB is aligned with that joining CD, not the deeper CDE ancestor.) If the spacing is not even then branch lengths are being shown. These should really be accompanied by a scale bar (although the figure about does not have any).

If branch lengths are being shown, the next thing to look at is the total root-to-tip distance for each terminal node. (The coloured arrows in the figure above.) If these are all the same length, as in the right-hand tree, it is highly likely that a molecular clock has been assumed (if it's a molecular phylogeny). If it hasn't been assumed - and the methods should provide enough details to know - then the molecule in question is just evolving in an incredibly clock-like fashion. More usually, these root-to-tip distances will not all be the same. If the tree is topology-only, as in the left-hand tree, the equal root-to-tip distances do not mean anything and no conclusions about rates can be reached.

Rooting

Evolutionary trees are (almost) always starting with an ancestor and then dividing, so you can always identify the root (if there is one) as the point where all the branches converge. Historically, it was drawn at the bottom like a real tree (as with the great Molluscan tree in OUMNH and the OneZoom Tree of Life Explorer). These days, it is usually drawn on the left as in these diagrams but I have seen trees with the root at the top, bottom or even on the right. (The latter is usually only used when mirroring another tree.) I have posted before on how to root a phylogenetic tree, so I won't go over that again here. The rooting method should be given in the methods but, when it is missing, you can often guess from the shape of the tree and using the root-to-tip branch lengths again:
Unrooted trees are pretty obvious when shown in the "radiation" style. If the tree is rooted, it is almost certainly either midpoint rooted or outgroup rooted (see "how to root a phylogenetic tree"). Midpoint rooting can be identified by virtue of the fact that the two longest root-to-tip distances will (a) be the same length and (b) be either side of the root. If either of these conditions is broken, it is not midpoint rooted and is probably outgroup rooted. (Note that if both conditions are met, it is still possible that the tree is outgroup rooted. Indeed, if the evolutionary rates are fairly consistent, outgroup rooting and midpoint rooting should be the same.)

Ideally, a rooted tree should have the root marked. Sometimes, however, it is left off, as in the bottom left. This can be confusing as tree visualising programs will often display trees in the "traditional" style even when they are not rooted. This is particularly a problem when branch lengths are not shown as it will not be at all obvious when the tree is rooted or not. The time that I see this catch people out most is when making a Maximum Parsimony tree using the popular software, MEGA - these trees are displayed randomly rooted and without branch lengths by default.

Reliability and Confidence Metrics

It is always important to consider how reliable the rooting method used is likely to be if conclusions are being reached regarding the direction of particular evolutionary events. Despite this, it's pretty rare for the root position to have a direct confidence measure associated with it (although I am sure there are ways to do it). What is common, however, is to have confidence metrics for the internal branches, which are usually placed above (or sometimes below) the branch next to the descendant node (in red, below). (Branch lengths, when shown, are normally below and nearer the middle of the branch.)
Bayesian and Maximum Likelihood methods quite often produce branch probabilities as part of the method but otherwise the most common method is "bootstrapping", which is a random sampling method. I will save bootstrapping and branch tests for future posts. My one tip for now: always remember that bootstrap values are associated with branches and not nodes.

Phylogenetic checklist

In summary, my checklist for reading a phylogenetic tree: topology ⇒ branch lengths? ⇒ molecular clock? ⇒ rooting ⇒ branch confidence metrics.

Tuesday, 16 April 2013

Something to cure the Monday Blues

I'm not sure why I find nature's blues so appealing. I suspect it is because blue creatures are clearly there to stand out - it is unlikely to be camouflage - and therefore usually also somewhat flamboyant. This is combined with the fact that my mild red-green colour deficiency reduces the equivalent wow-factor of reds. Anyway, whatever the reason, here are a couple of great blue animals. The first is Homarus americanus, the American lobster, which is featuring in an undergrad practical I am running next week - or, at least, some DNA sequences are. (Picture from World Register of Marine Species.)

The second is even more spectacular: a close-up of a blue damselfly, which is part of a set of amazing photos in an item at The Telegraph website, Bug-eyed: macro photographs of insects by Ireneusz Irass Waledzik. Isn't it adorable‽ It's well worth checking out the complete set.

Tuesday, 9 April 2013

Evidence-based medicine needs your help!

This is turning into a week of petitions, with another important cause that needs more signatories. This time, is not rhino horn or pangolin scale quackery that's the target, though, it's real evidence-based medicine.

I've blogged before about Ben Goldacre's book, Bad Pharma, and how legal loopholes allow big drug companies to get away with heinous crimes of data massage and selective reporting of clinical trial results. The AllTrials campaign to make clinical trial data more available and transparent is in full swing and has the backing of hundreds of organisations including big names like the MRC, NHS and, encouraging, GSK. This is a big one, not just because the issue at stake is so important to all of us but also because it stands a real chance of success.

They have tens of thousands of signatures at the moment but want to break a million and get support from more international companies and professional bodies. If you haven't signed already, please do. If you have, please encourage others to do likewise. As Ben Goldacre and Tracey Brown wrote in an email recently:
"We are on the threshold of significant change, but we now urgently need help from all of you to make this a reality."

Monday, 8 April 2013

Save the Pangolins!

The picture on the right is a pretty shoddy one I took in the Royal Ontario Museum in Toronto (more on that later) to remind me to write a post about pangolins because I think they're great. (There's a better Wikipedia photo by Valerius Tygart, below, of a tree pangolin). This is not really what I had in mind but it will do until I get to write a proper one, as there is currently a Care2 petition to the Prime Minister of Vietnam to crack down on the illegal trade in pangolins. It's not just rhinos that are endangered due to the supposed healing qualities of their body parts. (Pangolin scales, like rhino horns, are nothing more exotic than keratin - like finger nails.)

I'm not sure how much good these things do but the Thai Prime Minister vowed to end the ivory trade last month following a large WWF campaign, so it can't do any harm. Look at this guy and tell me that the world wouldn't be diminished without him* - then sign the petition:

*In the interests of full disclosure: (a) the tree pangolin shown is not one of the two threatened species - the Sundra pangolin and the Chinese pangolin - in Vietnam, and (b) I don't know if it's a he.

Saturday, 6 April 2013

Geek architecture at Cold Spring Harbor Laboratory

As well as the geeky sculptures, the Cold Spring Harbor Laboratory has some good geeky architecture. The tower of the Beckman Laboratory (above) stood out to me as a geneticist, with the four nucleotide abbreviations (g, a, t, c) on its four faces. There was a bit of a missed opportunity with the staircase in the middle, though, which is just a spiral up a central column rather than a double helix (right). Oh well.

As it happens, the conference was too engaging to do much exploration, so I'm not sure if it's a repeating theme across campus. If I get to go back, I will have to find out. Even if there isn't, though, it's a charming place to wander about. Apparently, it used to be a whaling station and many of the labs are in what look like large colonial houses, such as the Luke Building (below).

Wednesday, 3 April 2013

Aboriginal-style stegosaurus


Another ArtStudio creation, this is an attempt to combine two of my favourite things - Aboriginal art and dinosaurs! Given that I am not Aboriginal, I can't really call it Aboriginal art but I don't know what the technical name for this style is.