Balancing Selection Emerges as a Major Force in the Klebsiella pneumoniae Pangenome

Accessory genes in bacterial species are often treated as genomic extras: sequences that appear in some strains, disappear in others, and drift through populations with unclear purpose. This preprint argues against that dismissive view. In a large Klebsiella pneumoniae analysis, investigators found that many accessory genes carry a signature consistent with long-term balancing selection rather than simple drift or short-lived gain and loss.

The study introduces a practical way to separate selective forces acting on accessory DNA. Instead of relying only on gene presence or absence, the approach compares synonymous nucleotide diversity against a neutral coalescent expectation conditioned on gene frequency. Synonymous changes are expected to accumulate in a roughly clock-like manner, so they can serve as a proxy for how long an accessory gene has remained in the pangenome. When observed synonymous diversity exceeds expectation, the pattern points toward balancing selection. When it falls below expectation, directional selection becomes the more plausible explanation.

A Frequency-Based Test for Hidden Selective Pressure

The conceptual move here is important. Accessory genes are not all maintained for the same reason, and treating them as a single class can blur biologically distinct processes. Some genes may persist because they help bacteria survive in a host, evade phage pressure, or adapt to changing ecological niches. Others may be transient passengers with little or no benefit. By linking diversity to gene frequency, the new test offers a way to ask not just whether a gene is present, but why it has remained present long enough to accumulate variation.

The analysis focused on 260 representative K. pneumoniae genomes and excluded accessory genes likely introduced multiple times, reducing the risk that horizontal transfer would confound the interpretation. Across 4,071 accessory genes examined, 1,174 genes, or 28.8%, showed elevated diversity consistent with balancing selection. Only 30 genes, 0.7%, showed a deficit consistent with directional selection.

Those numbers matter because they suggest that adaptive maintenance of accessory DNA is not a marginal phenomenon. A substantial fraction of the pangenome appears to be shaped by selection that preserves polymorphism rather than sweeping one variant to fixation. In bacterial populations, that pattern can arise when different alleles perform best in different hosts, niches, or ecological conditions, allowing multiple versions to coexist over time.

Colonization and Immune Evasion Signals Stand Out

Among the genes flagged by this framework were loci previously shown experimentally to aid gut colonization. Their appearance in the balancing-selection class fits a biologically coherent model: if a gene improves persistence in some host contexts but imposes a cost in others, both alleles may be retained across the species long enough for diversity to build. In a pathogen such as K. pneumoniae, that kind of trade-off could help explain why certain accessory genes remain common without becoming universal.

The same pattern extended to CRISPR-Cas genes. Their retention under balancing selection is consistent with the constant arms race between bacteria and mobile genetic elements. Phage exposure is rarely uniform across environments, and the benefit of immune defense machinery can vary dramatically depending on local viral pressure. A gene that is useful in one ecological setting may be less advantageous in another, preserving multiple allelic states across the species.

A smaller set of genes showed directional selection, including the anti-phage defense system AbiE. In this case, the signal points in the opposite direction: selection appears to favor a specific variant rather than maintaining diversity. The contrast between balanced polymorphism and directional sweeps inside the same pangenome reinforces the central message of the work. Accessory genes do not obey one evolutionary script.

Why Synonymous Diversity Can Reveal Evolutionary Time

The logic behind the method rests on a simple but powerful assumption: synonymous substitutions are less likely to be affected by protein-level selection than nonsynonymous changes, so they can retain information about genealogical history. If an accessory gene has circulated through the population for a long period, it should accumulate more synonymous diversity than a recently acquired gene at the same frequency. Deviations from that expectation become informative. Elevated diversity suggests persistence under balancing selection, while suppressed diversity suggests recent fixation or a selective sweep.

This approach could become especially useful in bacterial genomics, where horizontal gene transfer makes traditional population-genetic inference difficult. Gene presence alone rarely captures the evolutionary dynamics of an accessory locus. Frequency helps, but it does not tell the whole story. Adding synonymous diversity creates a richer readout of how selection shapes the pangenome over time.

The preprint also illustrates a broader point about bacterial adaptation. Selection does not act only on core housekeeping genes or on dramatic resistance determinants. It also molds the accessory genome, where traits tied to colonization, competition, immunity, and environmental flexibility may remain in play for long periods. In that setting, balancing selection can preserve functional diversity without driving one variant to extinction.

What This Means for Pangenome Biology

The main value of the study lies in classification. It gives researchers a way to distinguish genes maintained by long-term balancing selection from those better explained by directional selection or transient carriage. That distinction is essential for interpreting pangenomes, especially in pathogens with complex ecological lifecycles. A gene retained because it helps under fluctuating pressures should be studied differently from one that recently rose to dominance through a selective sweep.

The work is still a preprint and has not undergone peer review, so the framework will need scrutiny in independent datasets and across other bacterial species. Even so, the logic is compelling and the results are internally coherent. Accessory genes in Klebsiella pneumoniae appear to be shaped by a much wider spectrum of selection than simple gain-or-loss models usually allow.

The remaining question is not whether selection acts on accessory genes, but how often different forms of selection operate side by side in the same species. This preprint suggests that balancing selection may be a dominant force in keeping key accessory loci in circulation, while directional selection acts more selectively on narrower sets of defense genes. The next step is to test whether the same pattern holds beyond K. pneumoniae and whether clinically relevant traits follow the same evolutionary rules across other bacterial pathogens.


Reporting by Dr. A. Nikhil Krishnan, MBBS for Medicine World Foundation, with additional data provided by bioRxiv (Biomedical Preprints).
PRIMARY CLINICAL EVIDENCE & REGISTRY DATA