12.10 Building a phylogenetic tree

Using the distance matrix, we can now:

  • Build a neighbor joining tree using the nj() function
  • Use HQ166910 as the outgroup to root the tree (with the root() function)
  • Use the ladderize() function to re-orient the tree into a tidier format for plotting
# build a neighbor joining tree
tree <- nj(D)
# manually "root" the tree by setting HQ166910 as an outgroup
tree <- root(tree, which(ids == "HQ166910"))
# rotate tree at nodes to make it look tidier (i.e., "ladderized")
tree <- ladderize(tree)

# plot the tree
ggtree(tree) +
  theme_tree2() +
  geom_tiplab(label = names, size = 4) +
  xlim(0, 1.2)

On the tree, we can see that the 2019-nCov sample (MT093631.2 Severe acute respiratory syndrome coronavirus 2) groups most closely with Bat coronavirus RaTG13.


Do you think this similarity is sufficient to confirm a bat origin of SARS-CoV-2?

Although the distance between SARS-CoV-2 and RaTG13 in the phylogeny looks small, it’s a large distance in phylogenetic space. Without sampling more deeply within intermediate strains between RaTG13 and SARS-CoV-2, we don’t know whether it passed through other mammalian species before being transmitted to humans.