I'm planning to discuss UniFrac in a series of posts (first here). But before moving further into it, I would like to define another statistic called the Phylogenetic-test or P-test. This test is available in UniFrac, but it was introduced earlier by Andrew Martin (Martin
2002 PMID 12147459
).Consider the same phylogenetic tree as in the first post. Here, the environment (sample) labels for a few of the sequences have been exchanged to provide a bit more heterogeneity in the tree.
The criterion of parsimony is employed to characterize the tree with respect to the labels, by computing the minimum number of "changes" (switches from one community to another), to explain the observed distribution. For example, we can imagine (in some theoretical sense) to have started with a blue label, and switched to red (and then to blue again) as indicated on the left; or alternatively, to have started with red and changed to blue, on the right. Here, the minimum number of changes needed to "explain" the tree is four.
The significance of the result is evaluated by label randomization (as for UniFrac itself), and the result is referred to as a P-test. If the randomization tests yield a statistic as extreme as that for the actual sample less than 5% of the time, then the distribution is considered to be significant. For a sample where one environment is distinct from another, fewer label switches are required. With completely separate distributions, the number of changes needed is one.