Narrated walkthrough

What if a phylogenetic tool could produce the same placements as pplacer, but use more than three times less memory and run more than thirty times faster? gPlace is designed to do exactly that, even under a user-specified memory limit.

paperi.ai
0:00 / 0:00

gPlace: fast, memory-bounded phylogenetic placement with results identical to pplacer

Chaumeil, P.-A.; Parks, D. H.

Biochemistry, Genetics and Molecular Biology

10:15 AI
Read the paper
Abstract

Phylogenetic placement methods such as pplacer attach query sequences to a fixed reference tree, thereby establishing their evolutionary relationships to the reference sequences. These relationships can then be used to infer taxonomic classifications or likely metabolic functions. gPlace is a drop-in replacement for pplacer that produces identical results while reducing memory requirements by >3-fold and computation time by >30-fold under typical usage. These improvements are achieved by storing less data per node and streamlining the calculations used to position each query sequence. gPlace can also run within a user-specified memory limit by processing only a portion of the reference tree at a time. Consequently, it can efficiently place sequences on large reference trees that would be impractical for pplacer to process. We demonstrate the importance of these improvements by evaluating gPlace as a replacement for pplacer in GTDB-Tk and CheckM, two tools widely used in genome-resolved metagenomic studies. gPlace is released under the GNU General Public License v3.0 and is available at https://github.com/cmc-aau/gPlace.

Transcript

What if a phylogenetic tool could produce the same placements as pplacer, but use more than three times less memory and run more than thirty times faster? gPlace is designed to do exactly that, even under a user-specified memory limit.

Phylogenetic placement methods such as pplacer attach query sequences to a fixed reference tree, thereby establishing their evolutionary relationships to the reference sequences. These relationships can then be used to infer taxonomic classifications or likely metabolic functions.

gPlace is a drop-in replacement for pplacer that produces identical results while reducing memory requirements by more than three-fold and computation time by more than thirty-fold under typical usage. gPlace can also run within a user-specified memory limit by processing only a portion of the reference tree at a time.

Phylogenetic placement methods such as pplacer and the Evolutionary Placement Algorithm were developed to place short sequences into single-gene reference trees and have since been used to place genome assemblies into trees inferred from concatenated marker genes. Longer alignments, combined with rapidly growing reference trees, have made placement increasingly demanding in memory and runtime.

For bacteria, GTDB-Tk classifies genomes by using pplacer to place them into a Genome Taxonomy Database reference tree inferred from a roughly five-thousand-column concatenated alignment of one hundred twenty marker genes. This tree has grown by roughly thirty-four percent annually to one hundred eighty-nine thousand eight hundred one species in R11-RS232, and placing genomes into a tree of this size with pplacer requires nine hundred twelve gibibytes of memory.

GTDB-Tk version two reduces this memory requirement by placing bacterial genomes first into a backbone tree and then into class-level subtrees, but the largest class-level tree now requires one hundred forty gibibytes. gPlace addresses this challenge with a computationally efficient placement algorithm that runs within a user-specified memory bound while producing placements identical to those of pplacer.

The memory required by pplacer is dominated by the partial likelihood vectors it caches for every node of the reference tree. Each node holds three vectors: a distal vector, the partial likelihood of the subtree below the node; a proximal vector, the partial likelihood of the rest of the tree; and a supernode vector.

The supernode vector combines the distal and proximal vectors at the midpoint of the edge above the node, which pplacer uses to rank candidate edges before optimizing edge lengths. For a reference tree with N internal nodes, L leaf nodes, and an alignment of length A, pplacer requires three times N plus L times A times twenty times eight bytes.

gPlace keeps only the distal and proximal vectors, and only for internal nodes. This reduces memory requirements to two times N times A times twenty times eight bytes, a three-fold reduction on bifurcating trees, and more on multifurcating trees.

The vectors that are no longer stored are cheap to rebuild, and supernode vectors are computed eight edges at a time as needed, then discarded. These vectors are rebuilt using the same operations in the same order as in pplacer, so they are identical to those pplacer stores.

The distal and proximal likelihood vectors can still exceed available memory for large reference trees. To address this, gPlace can partition the reference tree into connected pieces, termed tiles, and hold only one tile in memory at a time, with tile size chosen so that placement stays within a user-specified memory limit.

Every likelihood computed within a tile is still a full-tree likelihood, unlike in divide-and-conquer methods, which place queries on subtrees. The figure’s labels show five connected tiles, ranging from seven to eleven edges, while the caption specifies a twelve-edge maximum.

In the central example, tile two is the only black, in-memory region; the surrounding branches are gray, indicating that the rest of the tree is not held in memory. Scoring and ranking the edges of the reference tree, the first step of pplacer’s search, dominates its runtime.

When placing ten thousand genomes on the GTDB R08-RS214 bacterial tree with sixty-four processes, scoring and ranking took eighty-one percent of pplacer’s total runtime: three hours and forty minutes of four hours and thirty minutes. gPlace reduces computation time primarily by optimizing this step, placing the same genomes fifty-one-fold faster in five minutes and twenty seconds.

Scoring all genomes together allows per-character contributions to be tabulated, as in the preplacement lookup table described for EPA-ng. Whereas EPA-ng stores this table for every edge, gPlace builds it for a few edges at a time and then discards it, so it adds no appreciable memory.

Within a given alignment column, q depends only on the genome’s amino acid, so all genomes with the same amino acid in that column receive the same contribution. gPlace computes, for each edge, a table holding the contribution of each of the twenty-four possible characters at each column and scores each genome by summing one table entry per column.

For Q genomes, pplacer computes Q times E times m dot products and logarithms, whereas gPlace computes E times A times C regardless of Q. The table requires fewer operations once Q exceeds A times C divided by m, which is roughly thirty-two genomes for GTDB alignments. For ten thousand genomes, the table requires roughly three hundred ten-fold fewer operations.

Without the table optimization, gPlace required one hour and four minutes to score and rank edges, three-point-four-fold faster than pplacer. The table made ranking a further nineteen-fold faster, taking three minutes and twenty-four seconds.

Most of the remaining difference lies in preparing the reference tree: forty-eight minutes for pplacer and fifty-one seconds for gPlace. gPlace computes only the distal and proximal vectors of internal nodes, while faster edge-length optimization and other changes account for less than one percent of the time saved.

Figure One compares phylogenetic placement tools in three ways: their versions and licensing, runtime versus peak memory, and agreement with pplacer across increasingly novel bacterial genomes. The benchmark placed ten thousand genomes into a reference tree with 189,801 leaves, using 64 processes; panel C separates identical placements, same-edge placements with different values, different edges in the same taxon, and placements in another taxon.

This matters because the figure makes the trade-offs between computational requirements and phylogenetic agreement visible, especially for novel taxa. Figure two explains why gPlace uses less cached likelihood-vector storage than pplacer.

Panels A and B show that pplacer stores distal, proximal, and supernode vectors for every node, whereas gPlace stores only distal and proximal vectors for internal nodes and rebuilds leaf and supernode vectors as needed. Panel C plots calculated and measured memory across GTDB trees, while panel D reports gPlace’s peak memory as the number of processes and query genomes changes, making the storage tradeoff and scaling behavior explicit.

In panel C, the curves cross the horizontal table-cost lines near the marked break-even region at roughly thirty-two query genomes, then separate dramatically as the query set grows; at ten thousand genomes, the arrow indicates about three hundred ten times fewer operations. Panel D shows the same pattern by stage: the ranking bars differ by a factor of three-point-four without the table, and nineteen with it.

CheckM estimates the completeness and contamination of genome assemblies and relies on phylogenetic placement to establish a suitable set of marker genes for estimating genome quality. The reference tree used by CheckM is much smaller than those used by GTDB-Tk, with only five thousand two hundred forty-two leaves, though it has a longer alignment of six thousand nine hundred eighty-eight amino acids.

Replacing pplacer with gPlace in CheckM version one-point-three-point-two reduced wall-clock time one-point-one- to two-point-seven-fold, depending on the number of query genomes and processes. Replacing pplacer with gPlace reduced peak memory approximately three-fold in nearly all configurations, across the tested query-genome and process settings.

Together, these results demonstrate that tools relying on pplacer can benefit when pplacer is replaced with gPlace in practical use. In panel B, the right-hand memory plots show the filled placement-step points clustering near ten to twelve gigabytes for gPlace, while the open whole-run points for pplacer sit around thirty to fifty gigabytes.

The time bars also show the colored placement portion shrinking substantially, especially in the one-thousand-genome rows. The benefits of gPlace as a drop-in replacement for pplacer were evaluated through its impact on GTDB-Tk and CheckM, two widely used bioinformatics tools.

gPlace makes large-scale phylogenetic placement substantially more practical by storing and recomputing likelihood information strategically, while preserving pplacer’s placements and reducing both memory use and runtime.

CC BY 4.0 · A derivative work by Paperi · AI-generated script, voice and captions · pages and figures unaltered

Made with Paperi.

Drop in a research PDF — get a narrated video walkthrough like this one, with highlights that follow the narration. Free to start.

Try it with your paper →