Phylogeny

Phylogeny

Phylogeny

The tree of 2,399,238 samples from the 2024-08 release can be downloaded from OSF, or browsed interactively on taxonium.

Note this includes all samples, not just high-quality samples.

Construction

Marker gene alignment

Broadly followed this approach: https://pubmed.ncbi.nlm.nih.gov/16513982/.

The alignment was constructed using 120 bacterial marker genes from GTDB. Each sample was annotated with pyrodigal, then pyhmmer was used to align the predicted genes with the profile HMMs for each marker gene. These alignments were concatenated to create a global alignment for all samples.

Tree

The tree was built by a divide-and-conquer approach. Representatives were picked using gemsparcl, resulting in 21593 top-level clusters. These were used to build a backbone tree. For each cluster with at least three samples, a tree was built within the cluster, including its nearest neighbour in the backbone tree as an outgroup. These subtrees were then grafted to the backbone tree using the same root between the outgroup as in the subtree and backbone tree. All trees were built with VeryFastTree.

Each cluster was assigned to a species using GTDB-tk. The full taxonomic designation was filled out using TaxonKit. These are copied across all members of each cluster.

Subsetting

An example of some R code to subset the tree to an order (e.g. Mycobacteriales):

library(ape)
atb_tree <- read.tree("ATB_tree_202408/ATB_tree_202408.nwk")
ATB_tax <- read.csv("ATB_tree_202408/ATB_tree_202408_taxonomic_assignments_GTDB.csv")

# subset
myco <- ATB_tax[ATB_tax$Order == "Mycobacteriales", 1]
myco_tree <- keep.tip(atb_tree, myco)

# write
write.tree(myco_tree, "ATB_myco_order.nwk")
write.table(ATB_tax[ATB_tax$Order == "Mycobacteriales", ], file = "ATB_myco_meta.csv", quote = F, row.names = F, col.names = T, sep = ",")