Demoing the Tree of Life in MicrobeTrace
By: Tony Boyles
Tags: Bioinformatics, Phylogenetics, Evolutionary Biology, Data Visualization

MicrobeTrace can ingest Phylogenetic Trees (as Newick Files). It does this by computing a patristic distance matrix, which it then translates into a link list. This is exactly backwards from the original Microbetrace pipeline, which took a set of sequences, computed a link list and then assembled that into a distance matrix (which could then be used to compute a phylogenetic tree with neighbor joining). To show this process, let’s look at the Tree of life.

To start, let’s consider the Tree of life as, well, a Tree:

Screenshot from https://observablehq.com/@mbostock/tree-of-life.

What we see here is a phylogenetic tree, colored by Domain. It will be useful to note the distribution: The Bacteria (in blue) dominate the tree, constituting roughly 3/4 of the represented species. The remaining quarter is split between the Archaea and Eukaryota, with slightly more representatives of Eukaryota (orange) than Archaea (green).

Now, these colors are specified in the code, rather than programmatically inferred from the data themselves. We can perform that inference, using MicrobeTrace. To start, let’s load the same data into MicrobeTrace.

Note that I’ve set Node Labels to “ID”. All other settings are default.

Under MicrobeTrace’s default settings (which will cut off all links with a distance greater than 0.015), we see a little bit of clustering amongst highly related species. However, we can do better. Let’s look at the distance histogram:

This is taken from the MicrobeTrace Histogram View. However, to actually change the threshold, you’ll view the much smaller threshold histogram, which looks like this:

What we see here is distances sorted into two big humps. So, what does the network look like if we include all the links from the first hump, but none from the second hump?

We can see that the second set of distances represents the genetic distances between two disparate clusters. This distinction is, generally, between Bacteria and everything else. But “everything else” is sort of a weird group. Let’s see of we can find the distance threshold which can separate the Archaea from the Eukarya.

In general, when looking for meaningful breaks in genetic distances, you should set your thresholds to local minima, usually in descending order. So, some good candidates in the histogram look like:

Note that the arrows are read from right to left!

We spun off the two clusters by setting the distance threshold around A (a Patristic Distance between roughly 2.7 and 3.6). So, the next thing to try would be the Patristic Distance corresponding to B, or roughly 2.1. When we do that…

Voila! One cluster for Each Domain. (I manually set “Color Nodes By” to “Cluster”, and set the colors to match the corresponding groups in the Original Tree of Life.)

This is cool, but not especially interpretable. To fix this, we can either ratchet down the genetic distance threshold to the next minima, or we can prune the links using Nearest Neighbor. Let’s give Nearest Neighbor a try:

Showing only the Nearest Neighbor Links, we can see long branches of highly related species, as indicated by the names. For example, the a Blue Branch in the center right representing species of Streptococcus, and an adjacent sub-cluster of Lactobacillus.

It should be emphasized that this network represents genetic proximity, and not evolutionary descent. Where the tree had branches to represent most recent common ancestors, the network only represents species at the taxon-level. Recognizing this, however, we are still able to tease out gross relations (e.g. taxonomic domains) that aren’t obvious from the tree unless they’re explicitly defined (in this case, by color).

So, the punchline it that Trees and Networks are two different routes up the same analytical mountain, and sometimes one is easier than the other. That’s why MicrobeTrace enables both, and interoperability between them. So, go make Networks of Trees! Go make Trees of Networks! And, as always, go make me some new Bug Reports and Feature Requests!