Evolutionary inference reveals global natural histories and predicted pathways of antimicrobial resistance in Klebsiella pneumoniae Authors: Olav N. L. Aga, Sabrina J. Moyo, Joel Manyahi, Upendo Kibwana, Iren H. Löhr, Nina Langeland, Bjørn Blomberg, Iain G. Johnston, Melissa Vazquez Hernandez, Melissa Vazquez Hernandez, Melissa Vazquez Hernandez, Melissa Vazquez Hernandez Published: 2026 ABSTRACT Antimicrobial resistance (AMR) is a substantial and growing global health burden. Understanding, and predicting, its evolution in specific pathogens will help responses across scales from individual patient cases to large-scale policy. Here, we use global data on AMR features, predicted from 47k Klebsiella pneumoniae genomes, with hypercubic transition path sampling to infer the evolutionary pathways by which AMR features in K. pneumoniae (KpAMR) are acquired across 102 countries, territories, and areas. We identify “globally consistent” evolutionary behaviors that hold across countries, and “globally divergent” behaviors including carbapenem and fluoroquinolone resistance that vary across countries. We show how these divergent dynamics covary both with public health superregion and drug use policy, and reveal competing evolutionary pathways within and between countries. Using newly sequenced data across several decades from sub-Saharan Africa, we show that this inferred global roadmap of KpAMR evolution successfully predicts prospective evolutionary dynamics. Together, we hope that the ability to characterize and predict evolutionary dynamics of AMR acquisition, connected to socio-economic and drug policy predictors, will help strengthen our understanding of AMR evolution worldwide. Introduction Antimicrobial resistance (AMR), the resistance of microbial pathogens to the medicines we use to treat them, is a major threat to global health. Antibiotic resistance, the resistance of bacteria to antibacterials, is an important subset of AMR. In 2019 and 2021, 1.27m and 1.14m deaths, respectively, were attributable to bacterial AMR (many more were associated with AMR), with highest rates in sub-Saharan Africa [1,2]. The evolution of genetic and phenotypic features that cause AMR in bacterial pathogens is the focus of tremendous research interest, from basic biology through epidemiology, clinical studies, and health policy. Klebsiella pneumoniae (Kp) is a gram-negative bacterium and a major cause of nosocomial infections across settings. (Related species and subspecies of Kp form the KpSC (species complex); in this report, we will focus on K. pneumoniae sensu stricto). Kp is found in multiple environmental niches and can both cause opportunistic infections in hospitalized patients and community acquired infections, including severe infections caused by hypervirulent strains [3]. Kp has been identified as an important trafficker for antibiotic resistance genes from different ecological niches into several other clinically important pathogenic bacteria [4]. Kp contributes significantly to the global burden of AMR. In 2021, 45,600 and 36,000 deaths were attributed to carbapenem and fluoroquinolone-resistant Kp, respectively. In 2021, Kp accounted for 12.7% of all deaths attributable to AMR in the population over 5 years old and 19.4% of AMR-attributable deaths in children under five years [2]. Given the substantial health burden associated with the evolution of AMR in Kp, large-scale data-driven research has explored the genomic structure of, and AMR features in, Kp populations [3,5–8]. Here, we consider a complementary perspective: the evolutionary pathways by which these features are acquired [9]. Many related subquestions here can broadly be unified as: from a global perspective, in what orders are AMR features acquired over different instances of pathogen evolution? For example, given a newly observed isolate in the clinic with a given set of AMR features, can we predict which drug resistance(s) will evolve next (and thereby inform treatment guidelines accordingly)? And can we identify which extrinsic features—from physical environment, demography, drug policy, or others—influence the evolutionary acquisition of AMR? These questions require approaches that can use the expanding volumes of AMR data to make and train descriptive and predictive evolutionary models. The factors shaping evolutionary pathways of AMR are increasingly studied with a combination of modeling and bioinformatic approaches [10], including connections with drug use [11], the role of structure and heterogeneity in bacterial populations [12], and evolutionary connections between AMR features [13]. However, the large sets of potentially coupled features involved in typical AMR systems are often challenging to address using traditional methods from evolutionary biology. For example, an often-studied dataset of Mycobacterium tuberculosis isolates contains susceptibility-resistance information for a panel of 10 different drugs [14]. Comparative methods like the Mk (Markov k-state) model often struggle for more than around 7 potentially coupled characters under study [15]. An alternative class of methods for studying the evolution of multiple characters—evolutionary accumulation modeling or EvAM—has emerged jointly from the cancer and evolution literatures [16,17], but has traditionally considered relatively few characters in independent samples, while AMR research questions often involve many different drug resistance features in samples connected by phylogenetic relationships where presence may be due to inheritance from a common ancestor rather than independent acquisitions [9,18,19]. Hypercubic transition path sampling (HyperTraPS) is an EvAM approach designed to incorporate phylogenetic information into the (Bayesian) inference of evolutionary pathways for multiple interacting characters [20–22]. Other EvAM approaches including TreeMHN [23], HyperHMM [24], and HyperMk [15], also support phylogenetically coupled data, but we focus on HyperTraPS here because of its flexibility and support for relatively large numbers of features [20]. In this article, we harness large-scale global datasets on AMR in Kp (KpAMR) with HyperTraPS to learn the structure and variability of evolutionary pathways of drug resistance in Kp across the globe, as well as the extrinsic factors shaping these pathways. Results Local and global inferred pathways of AMR evolution in Klebsiella To learn and compare the likely pathways by which KpAMR is acquired in different countries, we obtained a dataset of 47,721 genomes from 102 different countries, territories and areas, and extracted details of the presence or absence of genes corresponding to each of 22 AMR classes, using Pathogenwatch and Kleborate [5,25] (Methods; Fig 1A and 1B). We refer to presence/absence of resistance genes for each of these classes as binary “resistance characters” (“character” referring to a particular property of a species in evolutionary biology). The set of characters we consider, following Kleborate, is given in the Fig 1 caption; in this report, we will use the shorthand defined there, grouping genes by drug resistance class (and Lahey class for β-lactamases) [25,27,28]. Using global genomic data on KpAMR to learn evolutionary pathways. (A) We use 47,721 Klebsiella pneumoniae (Kp) isolates from around the world, with (i) country-specific counts of isolates given by color and years of isolation given in (ii). (B) UpSet plot giving counts of the 30 most common KpAMR character profiles across these isolates (bar colors give number of acquired characters). (C) (i) Example source data from Romania, with 118 Kp isolates connected via a putative phylogeny derived from LIN codes (see Methods) and assigned presence (dark pixel) or absence (white pixel) markers for resistance to each of 22 antibiotic groups. (ii) A subset of the hypercubic transition graph inferred by HyperTraPS for Romanian data. Each edge’s width gives the probability of a transition involving a single character acquisition from the upper state to the lower state. The uppermost state is the ancestral state with no AMR characters. Only early transitions above a threshold probability 0.025 are plotted for clarity. (iii) Summary “bubble plot” of evolutionary pathways inferred for Romanian data with HyperTraPS. The area of a bubble gives the posterior probability that a given character (row) is acquired at a given ordering in the accumulative evolutionary process. For example, Bla_chr is inferred to be a likely early acquisition, while Bla_ESBL-a likely occurs later and Tgc_a is inferred likely later still (or never). Color follows a spectrum from early to late orderings. Character names: AGly (resistance to aminoglycosides); Col (colistin); Fcyn (Fosfomycin); Flq (Fluoroquinolones); Gly (Glycopeptides); MLS (Macrolides); Phe (Phenicols); Rif (Rifampin); Sul (Sulfonamides); Tet (Tetracyclines); Tgc (Tigecycline); Tmt (Trimethoprim); Bla_a (β-lactam resistance without extended spectrum or inhibitor-resistance); Bla_inhR (resistance to β-lactam/inhibitor combinations); Bla_ESBL (resistance to extended-spectrum β-lactams); Bla_ESBL_inhR (resistance to extended-spectrum β-lactam/inhibitor combinations); Bla_Carb (resistance to carbapenems); SHV (SHV β-lactamase with expanded enzyme activity), Bla_chr (SHV alleles conferring resistance to ampicillin), Omp (outer membrane protein). More details available via Kleborate documentation at https://github.com/klebgenomics/Kleborate. We will use -a: acquired (via horizontal gene transfer); -m: mutation; -chr: chromosomal (intrinsic). The map in this figure is from R package maps [26] which uses geographical data from Natural Earth as a base layer https://www.naturalearthdata.com/downloads/50m-physical-vectors/ (public domain https://www.naturalearthdata.com/about/terms-of-use/). The data and code underlying this figure can be found at https://doi.org/10.5281/zenodo.20408311. For each country in our dataset, we next used HyperTraPS, a machine learning approach, to infer the “pathways” of KpAMR character acquisition: that is, the ordered sequences with which characters are acquired over time (see Methods). Fig 1C illustrates this pipeline for a single country example (Romania, chosen for its moderate number of samples). HyperTraPS takes presence-absence patterns of characters on a phylogeny as input (Fig 1Ci) and outputs an evolutionary model describing the pathways of character acquisition most supported by the data [20–22]. The full output of the inference process is a parameterized transition network describing the probability of different sequences of transitions through the state space of possible resistance characters (Fig 1Cii). This model can be summarized, for example, as the set of posterior probabilities Pij with which character i is acquired at ordering j in a putative evolutionary process (Fig 1Ciii). We refer to a plot where Pij is visualized with point size, as in Fig 1Ciii, a “bubble plot”. In Methods, we describe some nuances involved in using HyperTraPS with these data. KpAMR characters may be acquired reversibly (for example, via plasmid gain and loss), while the model underlying HyperTraPS pictures acquisitions as irreversible. This irreversibility picture reduces a potentially vast (or infinite) intractable set of possible evolutionary pathways to a tractable set (Methods; [29,30]). This increases the uncertainty of inference and challenges the inference of character interactions, but evolutionary orderings—which characters are likely present when another is acquired—can generally be robustly inferred (demonstrated in S1A and S1C Fig and more deeply in [31]). The approach does not assume an “end point” of all acquired KpAMR characters exists, that acquisitions occur one at a time, nor that populations are perfectly sampled, homogeneous, or perfectly representative of the labeled country of origin with no mixing [12,32]. The LINcode taxonomy linking observations (see Methods) is used to guard against potential pseudoreplication due to relatedness of samples [9,18,19,33], but in practise (given the deep-branching nature of many relationships) has a negligible effect on inference outputs [31,34] (S1B Fig). Finally, HyperTraPS does not assume the presence, absence, or form of interactions between features—evolutionary dynamics can be reported for a “null model” of independent characters (with prevalence reflecting individual rates) and/or interacting characters (where rates depend on acquired characters) from the same model framework. Our focus is on characterizing likely ordering dynamics, and not directly on the interactions between characters. While Fig 1C demonstrates our approach for a single country, Fig 2A gives the average acquisition probabilities across all countries in our dataset (including grouping by health region from the Global Burden of Disease initiative [2]), and S2 Fig gives the corresponding summary plots for every country in the dataset. Resistance to some antibiotic groups is consistently observed across all countries: following very common presence of Bla-chr and SHV-m, resistance characters against betalactams and extended-spectrum betalactams (ESBLs) (Bla-a, Bla_ESBL-a) are often acquired earlier, while resistance to colistin (drug of last resort for multi-drug resistant Kp; Col-a and Col-m) is acquired later. Country-specific differences exist in the evolutionary acquisition of other characters, including resistance to carbapenems (Bla_Carb-a). Global structure of inferred pathways of KpAMR evolution. (A) Global plot of summarized KpAMR evolutionary dynamics aggregated across countries. Characters displaying bimodal acquisition distributions—characteristic of distinct evolutionary pathways—are highlighted. (B) Principal components analysis (PCA) of country-specific “bubble plots” as in Fig 1Ciii, reflecting inferred evolutionary dynamics of KpAMR in different countries. Individual countries are plotted on PCAs 1–2 (i) and 2–3 (ii), individually and with ellipses demarcating their corresponding Global Burden of Disease region ([2]; acronyms below). (C) Example “bubble plots” from countries (arrowed in (B)) reflecting the extremes of PCA1 (i) and PCA2 (ii). In (i), Venezuela reflects poorly characterized evolutionary dynamics, with relatively uniform probabilities everywhere; Nigeria reflects precisely characterized evolutionary dynamics, with individual characters having highly likely, precisely specified orderings. In (ii), country-specific differences in orderings emerge, including in those characters highlighted. For example, KpAMR evolution in South Korea is likely to involve Flq-m acquisition earlier than other characters; evolution in The Gambia is likely to involve Flq-m acquisition later than other characters. GBD regions: CEEECA, Central Europe, Eastern Europe, Central Asia; HI, High-income; LAC, Latin American and Caribbean; NAME, North Africa and Middle East; SA, South Asia; SEEAO, South-east and East Asia and Oceania; SSAf, sub-Saharan Africa. Zanzibar (dark outline) is from data newly sequenced in this study. Character names given in Fig 1 caption. The globe image is public domain from WikiCommons https://commons.wikimedia.org/wiki/File:Globe.svg. The data and code underlying this figure can be found at https://doi.org/10.5281/zenodo.20408311. In several instances, bimodality in the inferred evolutionary dynamics is observed. That is, a given character may be acquired at an earlier stage or a later stage in the evolutionary process, but not at intermediate stages. Such bimodality is characteristic of mutually repressing interactions between characters, and equivalently of several different evolutionary pathways existing in a system. Examples can readily be seen in Fig 1C for Romania and Fig 2A for the global mean behavior, where SHV-m is likely acquired either very early or at more intermediate stages, with little probability in between. These competing dynamics are directly visible in Fig 1Cii, where distinct, canalized pathways exist: one involving SHV-m as the first acquisition, one involving Bla_chr as the first acquisition and SHV-m only following rather later. Across countries (S2 Fig), bimodality is observed in several characters: some examples are in Bla_chr (Tanzania, Zambia); Bla-a (Ireland, S Korea); Bla_ESBL-a (Laos); and SHV-m (Romania and at least 15 other countries across GDB regions), reflecting multiple evolution pathways for both HGT-mediated and other KpAMR character acquisitions. Correspondingly, the country-specific inferred orderings of KpAMR characters generally correlate, but rather weakly (R2 = 0.41), with the simple prevalence of characters in that country’s source data (S3 Fig). Across subsets of countries, interactions between our KpAMR resistance characters are observed (S4 Fig). For example, in around a quarter of cases, the acquisition of tigecycline resistance (Tgc_a) is inferred to promote the acquisition of glycopeptide resistance (Gly_a), and the acquisition of sulfonamide resistance (Sul_a) is inferred to promote the acquisition of trimethoprim resistance (Tmt_a). This latter observation reflects an independently known connection: sul and dfr genes providing Sul_a and Tmt_a resistance, respectively, are often genetically linked, and mechanistically act on connected steps in the folate synthesis pathway [35,36]. In some cases, the acquisition of MLS resistance (MLS_a) is inferred to repress the acquisition of carbapenem resistance (Bla_carb_a), suggesting possible interactions that could be clinically exploited in combination therapies (see Discussion). However, the inference of interactions between reversibly acquired features is challenging using HyperTraPS [31], so these observations must be regarded with some caution. While S2 Fig gives a detailed “roadmap” of KpAMR evolution across countries, it is hard to immediately extract global-scale insights from this representation. We therefore next considered how to compare these results in a reduced-dimensionality picture. Global consistency in evolutionary acquisition of resistance to a subset of drug families To proceed, we used principal components analysis (PCA) to embed the high-dimensional set of posterior probabilities in a 3D space (Fig 2B). Here, the axes of highest variance in the inferred evolutionary pathways are identified and used to naturally lay out the individual country outputs. Comparison of country-by-country behavior along these axes can then reveal major sources of variability (and similarity) in inferred KpAMR evolution across countries. We underline that migration means that samples from one country likely represent a mixture of bacteria that have evolved in, and outside, that country, and that perfect separation between intrinsic dynamics of countries is therefore not possible with these data (see Methods). Inferred evolutionary pathways for Kp across countries consistently involve early acquisition of characters conferring resistance to aminoglycosides, sulfonamides, trimethoprim, and betalactams (AGly, Sul, Tmt, and Bla characters). Aminoglycosides and sulfonamides were both discovered and entered clinical use early in the mid 20th century. Resistance properties inferred to be acquired at later orderings include extended-spectrum beta-lactam and phenicol resistance, acquired via mobile genetic elements (Bla_ESBL-a, Phe-a). Acquisitions inferred to be acquired late across countries include inhR-driven resistance (Bla_inhR-a, Bla_ESBL_inhR-a), and resistance to later- and final-line drugs including colistin, fosfomycin, tigecyclin, and glycopeptides (Col-a, Fcyn-a, Tgc-a, Gly-a). These form a set of “globally consistent” evolutionary observations. Country-to-country differences in evolutionary acquisition of resistance to carbapenems, fluoroquinolones, tetracycline, and others The general patterns above appear across evolutionary dynamics across countries and regions, with the first principal component of inferred Kp variability (accounting for 23% of the overall variance) simply reporting the precision with which these patterns can be characterized (Figs 2Ci and 3). In countries supporting less precise inference (for example, with limited datasets), the expected ordering of these characters is more uniform and closer to the average null hypothesis of all characters behaving equally; in countries with more precise output the expected orderings diverge to early and late values (Figs 2Ci and 3). KpAMR characters determining aspects of global variability in evolutionary dynamics. Each country has an expected acquisition ordering for each KpAMR character. The plots show how these patterns of expected ordering are linked to the principal components of global KpAMR evolution variability in Fig 2B: each point plots a country’s expected ordering for a given drug against the country’s position in PCA1 (top, gray); PCA2 (center, red); and PCA3 (bottom, blue). (A) “Globally consistent” characters: those that covary tightly with PCA1. All characters here have either early or late expected orderings across all countries (either left or right of the central vertical line). Their position on PCA1 reflects the precision of the inference output. Less precise outputs (low PCA1 values, like Venezuela in Fig 2C) will have orderings close to the central “null”; more precise outputs (high PCA1 values, like Nigeria in Fig 2C) will have more divergent “early” and “late” orderings towards the edges of the plot. (B, C) “Globally divergent” characters: those that covary more tightly with PCA2 (B) or PCA3 (C). Expected orderings in these character sets span a wider range, showing sources of variability in the evolutionary dynamics that are independent of PCA1 (and hence less influenced by observational uncertainty). An alternative visualization is given in S5 Fig. Character names given in Fig 1 caption. The data and code underlying this figure can be found at https://doi.org/10.5281/zenodo.20408311. Once variability in this precision is accounted for (by considering the first principal component), variability corresponding to other differences in the inferred dynamics can be extracted. Several characters covary comparatively little with the (precision-aligned) PCA1 and instead show stronger covariance with PCA2 or PCA3, suggesting that there is genuine country-to-country variability in these characters after controlling for differences in observational noise (Figs 2Cii, 3, and 5). PCA2 (accounting for 15% of overall variance) displays strong covariance with carbapenem, fluoroquinolone, MLS, and tetracycline resistance and OMP mutation (Bla_Carb-a, Flq-m, MLS-a, Tet-a, Omp-m,). PCA3 (accounting for 8% of overall variance) displays covariance with Flq-a, Rif-a, SHV-m. None of these “globally divergent” characters display the “null-to-extreme” divergence seen in those characters most closely related to PCA1, suggesting genuine country-to-country differences in evolutionary dynamics, rather than differences in sample size or posterior precision, are responsible for this variability. Geographical and drug policy influence on inferred AMR evolutionary pathways. (A, B) Distributions of country-specific PCA projection values across different GBD regions for (A) PCA2 and (B) PCA3. In (A), sub-Saharan African countries show systematically higher positions in PCA2 than other regions. (C) Inferred acquisition orderings of KpAMR characters by GBD region. The left five characters covary with PCA2; the right three covary with PCA3. Carbapenem resistance and OMP mutations are inferred to be acquired substantially later in sub-Saharan Africa; rifampicin and fluoroquinolone resistance are inferred to be acquired substantially earlier in S, SE, E Asia, and Oceania. New Zanzibar data from this study is shown by large circles. (D) Connecting AMR character acquisition propensity with drug treatment regimens across countries. Median (across observed years 2016–2021) per-capita drug use in different drug classes (J codes), with expected acquisition ordering of associated resistance characters. “Globally consistent” characters Tet-a, Bla_inhR-a, Sul-a, AGly-a were associated with PCA1 in the global analysis and display little correlation between evolutionary ordering and drug use levels. “Globally divergent” characters Bla_Carb-a and MLS-a were associated with PCA2 in the global analysis and display stronger correlations, with earlier evolution of resistance linked to higher levels of drug use. Character names given in Fig 1 caption; p-values are from linear regression against a null hypothesis of zero slope. The data and code underlying this figure can be found at https://doi.org/10.5281/zenodo.20408311. Validating prospective predictions of evolutionary transitions with newly sequenced KpAMR data. (A) PathogenWatch (gray) and newly sequenced 2001−2002 (blue) and 2017−2018 (red) genome properties from Tanzania, connected by a phylogeny estimated from average nucleotide identity (ANI). More details in S6 Fig. (B) For each independent transition in the set of newly sequenced observations, we used HyperTraPS trained on existing data to predict which characters would likely evolve next given the ancestral state. The bars show the predicted rankings of the characters that were truly observed to evolve in the data. The trained model (red) usually predicted top rankings for the characters that were truly next acquired, marginally outperforming a model based purely on character prevalence (blue). (C) Proportion of Tanzanian isolates in Kleborate and new datasets (uncorrected for relatedness) where different KpAMR characters are present. Character names given in Fig 1 caption. The data and code underlying this figure can be found at https://doi.org/10.5281/zenodo.20408311. Geographical correlates with Kp evolutionary dynamics To explore the sources of this evolutionary variability in more detail, we asked whether geographical region was linked to different variants of the inferred evolutionary dynamics (after accounting for observational differences). We first asked whether countries from different regions showed systematic differences in their PCA2 and PCA3 projections—corresponding to different orderings of the “globally divergent” country-specific characters above (Fig 4). We found that sub-Saharan Africa was a dramatic outlier in PCA2, involving notably later acquisition of carbapenem and fluoroquinolone resistance and OMP mutation than the other regions (Fig 4A and 4C). This ordering result agrees with the continuous-time history of treatment in the region, where carbapenem and fluoroquinolone use was established later (especially for children) than in other regions. Other regions were broadly consistent in PCA2 but showed substantial differences in PCA3. These differences correspond mainly to acquired resistance to fluoroquinolone and rifampicin, with substantially earlier inferred acquisition in South-Southeast-East Asia and Oceania, and substantially later in Central and Eastern Europe, Central Asia, and sub-Saharan Africa (Fig 4B and 4C). Policy predictors of variance in AMR evolutionary dynamics We next asked whether known policy of antibiotic use influence the inferred evolutionary dynamics from our analysis. We gathered statistics on drug use from 2016 to 2021 in countries available from the WHO GLASS surveillance programme [37] and looked at correlations between per-capita drug use statistics and the inferred evolutionary dynamics of resistance to those drugs (Fig 4D). We found that for those drug types associated with PCA1 (where variability in inferred dynamics is largely determined by observation uncertainty) there was little correlation between drug use and the ordering of resistance acquisition. However, for carbapenems, associated with PCA2 (more non-observational country-to-country variability), there was a link between drug usage statistics and inferred resistance evolution, with carbepenam resistance (Bla-Carb-a) more generally present before other acquisitions in countries with high drug use rates. This observation could arise through increased Bla-Carb-a acquisition rate, or (perhaps more likely) a reduced loss rate of the Bla-Carb-a feature once acquired (see Methods). The direction of this correlation was also observed in MLS, also associated with PCA2, though this relationship did not show statistical support at the p < 0.05 level. This pattern of correlations is consistent with the picture above: acquisition of some (PCA1) KpAMR characters is relatively constant across countries and circumstances, while other (PCA2) characters are more plastic and depend more tightly on country- and region-specific drivers. We note, however, that the GLASS data only cover a subset of years for which bacterial samples exist in our data (Fig 1A) and that KpAMR evolution is not constrained only within these dates (see Methods), so our drug use measure is only an imperfect estimate of the strength of any selective pressure shaping the dynamics. Testing predictions of AMR evolutionary dynamics with newly sequenced, cross-decadal data One motivating application of evolutionary inference to AMR problems is the ability to predict the next steps in evolutionary pathways. A question of potentially direct clinical relevance is: given a clinically observed isolate with a given set of AMR characters, which character(s) will likely evolve next—and can treatment guidelines be adapted accordingly? Previous studies of AMR with HyperTraPS have demonstrated its ability to predict properties of evolutionary transitions in a withheld subset of the overall dataset, following the common training-test machine learning paradigm [20]. Here, we are in the unique position of using independently obtained Kp genome data to test the predictions of the evolutionary models trained above. We sequenced Kp isolates from patients with bloodstream infections in 2001−2002 and 2017−2018 in Tanzania and 2015−2016 in Zanzibar, collected in previous studies [38–41] (Fig 5; see Methods). Bioinformatic analysis placed these new genomes in a phylogenetic tree with a subset of existing genomes from the training data, including their AMR profiles (Figs 5A and S6 Fig). Using only transitions independent of those in the training data (see Methods), we tested the predictions of the HyperTraPS model trained on data from Tanzania. Specifically, for each new transition, we queried the trained model about likely next steps from the ancestral state, and recorded the predicted ranks of the next steps actually present in the transition (Fig 5B). By far the most common outcome was that the true next step was ranked first (predicted to be most likely). For these data, we considered the number of instances where one model outperformed the other, in the sense of assigning a lower predicted rank (closer to the effective rank-1 “truth”) to a given transition. The trained model outperformed a naïve model (based only on the relative prevalence of KpAMR traits) in a limited subset (6/34 = 18%) of cases, and underperformed in 1/34 = 3% of cases. This is because the newly-observed data showed only limited evidence of higher-order effects (including bimodal ordering distributions and interactions between characters), which HyperTraPS can readily capture (demonstrated in previous applications to AMR data [20,9], but a prevalence-only model cannot (hence the variability in S3 Fig). This analysis demonstrates that within-country predictions of future evolutionary dynamics are possible given a trained HyperTraPS model. We also asked whether the model could predict evolutionary dynamics at the regional scale. We use Zanzibar as a test case here—a region of Tanzania that was not explicitly represented in the original Kleborate training dataset. Our findings would predict KpAMR in Zanzibar to fall into the sub-Saharan Africa set of behaviors, with high values on PCA2 and associated signatures of late carbapenem resistance and others (Fig 4A). To this end, we applied HyperTraPS inference to newly sequenced isolates from Zanzibar. The resulting inferred dynamics clearly place Zanzibar within the set of sub-Saharan Africa behaviors (Fig 2B), with high values on PCA2 arising from later acquisition of carbapenem resistance, and high values on PCA3 arising from later acquisition of rifampicin resistance (Fig 4A and 4B). We also explored the representation of different KpAMR characters in the snapshot genome sequences alone, without connecting with evolutionary dynamics. Fig 5C shows the relative prevalence of acquired KpAMR characters in existing and newly-sequenced data, not accounting for phylogenetic relatedness (and without representation of an explicit non-AMR control group). With this sampling, most characters showed an increase from 2001−2002 to 2015−2016, particularly in mobile genetic acquisition of fluoroquinolone resistance, while the relative prevalence of acquired phenicol resistance and fluoroquinolone resistance mutations decreased. Proportions of these characters were in broad agreement with known coarser-grained observations from Tanzania [42,43] and existing Tanzanian genomes from Pathogenwatch, but we observed more acquired rifampicin resistance and lower acquired phenicol resistance than in existing samples. Our samples from Zanzibar showed lower relative proportions of aminoglycoside and β-lactam resistance, and higher prevalence of outer membrane protein mutations. We have embedded the trained HyperTraPS KpAMR models in an online Shiny app https://stochasticbiology.shinyapps.io/amr-predict/. Here, a country of interest can be specified, and the KpAMR profile of a sample given by specifying presence or absence of each of our characters. The app will then give the inferred probabilities of each next possible character acquisition, as well as a transition graph describing the likely subsequent pathways for up to five acquisitions in the future (S7 Fig). Discussion Powerful data-driven approaches to study the evolution of AMR are emerging in parallel with large genomic datasets [3,5–8]. Most of these studies focus on the current genomic structure of pathogen populations. In this research, we have attempted to take a complementary perspective, using large-scale genome data while focusing on the (inferred) evolutionary dynamics that produce these genomic patterns. We believe that this new way of working has substantial power to support other data-driven approaches, particularly in the prediction of unseen and future evolutionary behaviors of pathogens [9]. The core technology we use, HyperTraPS, is an instance of evolutionary accumulation modeling or EvAM [16,44]. EvAM has previously been used to learn AMR pathways, including in HIV [45] and multidrug resistance in tuberculosis [20,21,24]. One question that has remained is to what extent such results reflect universal, general behaviors, versus a response to the specific selective pressures arising from a given country’s drug use (for example). Our global comparison suggests a form of answer to this question. A subset of the KpAMR characters we consider appear to behave similarly across countries regardless of specific selective pressure, drug regimes, and other differences (those aligned with PCA1). Another set of characters (those aligned with PCA2–3) evolves in a way that is more dependent on country- and region-specific influences, which we have shown include public health superregions and drug use levels—although certainly other factors, from population change to the prevalence of other diseases, will also influence these dynamics [10,11]. While these results are specific to Kp, and the characters we consider, this combination of global and country-specific behaviors may reasonably hold across other pathogens. Inferring evolutionary dynamics of multiple, coupled traits across groups is a challenging problem. There will be countless, multiscale selective influences that impact the evolution of specific lineages of Kp around the globe. Our perspective attempts to “coarse-grain” away from these (unobservable) specific pressures and consider their aggregated effect on large-scale genomic properties in populations. This perspective is not without difficulties. In Methods, we describe in more depth several resolutions to challenges including reversibility of KpAMR acquisitions (for example, via plasmid gain and loss), phylogenetic relatedness, mixing between countries, imperfect observations, and presence or absence of interactions between characters. As described there and studied in [31], evolutionary orderings from HyperTraPS inference are rather robust to these issues in real data, which tend to increase uncertainty rather than systematically bias the outputs of inference. The “controlling” for uncertainty via PCA1 in our analysis is therefore expected to ameliorate the effects of these issues. As shown in S1C Fig, the inference of which characters are likely present when another is acquired is congruent across our method and an alternative that, while limited in scale, can directly allow for reversibility [15]. In learning estimates for evolutionary dynamics, HyperTraPS attempts to infer any potential interactions between characters—for example, demonstrating an independently known positive connection between sulfonamide and trimethoprim resistance [35,36]. Negative interactions, where the acquisition of one character makes acquiring another character less likely, could (if truly present) form the basis of a combination therapy XY, where resistance to drug X makes resistance to drug Y less likely. These interactions correspond to the phenomenon of collateral sensitivity in AMR, where resistance to one drug induces sensitivity to another [46,47]: for example, in Escherichia coli, beta-lactamase expression is linked to heightened sensitivity to colistin (among others) [48]. While not observed consistently throughout all countries in our dataset, a subset of countries showed statistical support for some such “repressive interactions” (S4 Fig). These include, for example, MLS resistance repressing the acquisition of carbapenem resistance. However, this is one aspect of inference which is challenged when a reversible process is modeled irreversibly [31], and such indications can only suggest more detailed followup investigation to verify and explore mechanisms behind these possibly exploitable collateral interactions. In conclusion, we hope to show that evolutionary accumulation modeling—inferring the historic evolutionary pathways of AMR acquisition, in addition to considering contemporary properties—can complement and enhance established ways of working in AMR genomic analysis. By considering the dynamics by which global KpAMR patterns have become established, a collection of research directions are opened or expanded, including the similarities and differences between countries, links with social and environmental covariates, and predictions of future dynamics. We anticipate that these methods may readily be applied to provide insight into AMR evolution in other pathogens in future. Methods Existing Klebsiella data acquisition We obtained all 47,721 Klebsiella pneumoniae sensu stricto records from Pathogenwatch as of March 2024 [5]. The most common isolation years were 2015–2020, with a peak at 2018 (Fig 1A). We used AMR features (genes and mutations) reported by drug class as reported by Kleborate version 2.3 [25]. Kleborate groups genes or mutations known to confer resistance to clinically relevant antibiotic groups and related phenotypes. Betalactamases are further grouped by enzyme activity [25]. We consider a set of L = 22 drug classes for each genome, dichotomizing Kleborate output by the presence of any gene or mutation related to each group. That is, if there is any gene or mutation present for a resistance phenotype, the isolate is considered resistant, otherwise it is considered susceptible. This assumption holds for most resistance phenotypes considered in this study. However, fluoroquinolone resistance (Flq-m) often requires multiple mutations to cause resistance. Thus, the presence of these characters cannot be interpreted as a resistance phenotype, but rather an increased MIC (minimum inhibitory concentration). The isolates were divided by country based on metadata, and countries were grouped into superregions as defined by the Global Burden of Disease regional classification system [49]. A coarse-grained phylogeny was generated via LIN-codes (Life Identification Numbers: a systematic, stable quantitative system for genomic classification based on nucleotide identities [50], pre-computed for our dataset [51]) using lincoding.py supplied by [51]. 2,102 genomes were excluded due to missing metadata. Any country with less than two genomes available were excluded due to the inability to construct a tree. The resistance profiles and phylogenetic tree were combined into a phylogenetic tree annotated with resistance to drug classes. Evolutionary pathway inference with hypercubic transition path sampling (HyperTraPS) HyperTraPS [20] models an “evolutionary space” containing every possible state of a system involving L binary characters, then infers the probabilities of (Markovian) transitions between states in this space (here, involving the ordered accumulation of different AMR characters) that is most compatible with observed data [21,22]. A recent overview of the method in an AMR context is given in. The source data is a collection of length-L “barcodes” labeling presence or absence of our characters—resistance to drug classes as defined in Kleborate—on the tips of a phylogeny. Ancestral state reconstruction (here, assuming that AMR resistance character accumulation is rare and irreversible, so that an ancestor possesses a character if and only if all descendants possess it) is by default used to infer ancestral states, and thereby construct a set of transitions from the data. This process is used solely to guard against pseudoreplication, and for these (largely deeply-branching) datasets, the inclusion of phylogenetic detail (and hence the details of ancestral state reconstruction) has a negligible influence on the inference outputs (S1B Fig). The resulting transitions are the input data for the HyperTraPS algorithm. The target of inference is an L × L matrix θ, where θii is the base rate for acquiring character i, and θij is the influence that acquisition of character j has on the base rate of acquisition of character i (as in mutual hazard networks [52]). Specifically, the probability of acquiring character i from the state corresponding to binary vector s is P(s gains i)=exp(θii+ ∑sj θij)/∑kexp(θkk+ ∑sj θkj), where ∑k is over all characters absent in s [20]. In this way, positive and negative interactions between the acquisition of different AMR characters is supported, so that (for example) acquisition of resistance to drug X can make acquisition of resistance to drug Y more (or less) likely. The output of the inference process is, more broadly, a transition matrix λ, with elements λa→b describing the probability with which an isolate in state a will next transition to state b. For each of the 102 countries, territories and areas we ran HyperTraPS on three different random seeds to ensure that the results were consistent across runs (S2 Fig). Simulations were run for 106 steps with 103 random walkers for sampling, employing a penalized likelihood involving the HyperTraPS-estimated likelihood for a given set of transitions given a parameterization θ, computed with the probability term above calculated over sampled paths, and a unit penalty for each non-zero parameter (see [20]). The US genomes were sub-sampled to a subset of 1,000 genomes; three different subsamples clustered closer together than with any other countries in the PCA plot. Synthetic control study for inference of reversible characters To determine the effect of our assumption of irreversible accumulation of AMR characters (given that the loss of plasmids is not uncommon in Kp evolution [7]), we constructed a synthetic control study. A random phylogeny over 128 tips was constructed using a birth-death process with birth rate 1 and death rate 0.5 (chosen empirically to roughly match the phylogenies from our case studies) using phangorn [53]. A synthetic accumulation process reflecting a single evolutionary pathway was simulated on this phylogeny. Different loss processes—including uniform rate over a subset of features, heterogeneous, and random rates—were simulated in different instances (details in S1A Fig caption). The same HyperTraPS pipeline (assuming irreversibility), including ancestral state reconstruction and pathway inference, was run on both the pre-loss and post-loss datasets, and the outputs compared (S1A Fig). We also applied HyperMk [15], an EvAM approach supporting reversible dynamics, to a reduced subset of the KpAMR data (HyperMk is limited in the scale of data it can analyze), showing both a tight agreement with the HyperTraPS output and that model selection criteria favor the irreversible model (S1C Fig). These are a small-scale illustrative examples; the inference of reversible dynamics under an irreversible model is the focus of study in [31]. Global structure in inferred pathways The outputs of HyperTraPS can be summarized as a matrix P, where element Pij gives the posterior probability that character i is acquired at ordering j in a putative evolutionary process from an ancestor with no AMR characters towards a final state with all AMR characters. For example, P32 gives the probability that the third character is the second to be acquired in such an evolutionary process. We obtained this matrix for each country in our dataset, then performed PCA on the set of matrices [54]. We observed the structure of matrices with “bubble plots”, where an array of points is plotted with areas proportional to Pij. Drug usage data We collected antibiotic consumption data from 57 countries, territories and areas enrolled in WHO Glass surveillance program in the period 2016–2021 [37]. Overlaying the consumption data with the countries that had 3 or more available genomes reduced the number to 53. We use the median consumption statistics over the available time points for each country. New Klebsiella data acquisition The 79 newly sequenced Kp isolates in this article are derived from a collection of studies performed in Tanzania and Zanzibar over the last three decades. These comprise bacterial isolates from (a) blood samples from pediatric patients with bloodstream infections in Dar-es-Salaam, Tanzania in 2001–2002; (b) blood samples from adult patients with bloodstream infections in Dar-es-Salaam, Tanzania in 2017–2018; (c) fecal samples from the patients in (b); and (d) blood samples from adult and pediatric patients with bloodstream infections in Mnazi Mmoja hospital, Zanzibar in 2015–2016. These cultures were sequenced by MicrobesNG (MicrobesNG, Birmingham, UK) using Illumina HiSeq technology. Assembled contigs were provided by the sequencing service, which formed the initial step for the bioinformatics pipeline below. New Klebsiella data analysis The analysis pipeline begins with the contigs from the initial sequencing and assembly process. We first used dnadiff, which wraps nucmer from the MUMmer 3.0 package [55], to scaffold the contigs from a given isolate on the Klebsiella reference genome GCA_000240185.2_ASM24018v2 [56] and report statistics of the alignment. We retained only isolates with <20% unaligned bases as instances of Klebsiella. Combining the newly sequenced isolates with the existing Tanzanian genomes from Pathogenwatch, we then ran pairwise dnadiff across the combined set. We extracted the average identity across the aligned regions for each pair and recorded this as the ANI (average nucleotide identity). We then used d = 1 − ANI as a distance measure for phylogenetic tree estimation using the unweighted pair group method with arithmetic mean (UPGMA) [57] implemented in the phangorn [53] package in R (R Core 58]. We confirmed that an alternative method, neighborhood joining [59], did not give qualitatively different results for the predictions of AMR evolution. We used AMR profiles of existing and new isolates to reconstruct ancestral states across this complete tree, then identified the set of subtrees that had only newly-sequenced isolates at their tips. As transitions within such subtrees are independent of transitions in the (Pathogenwatch) training data set, we used this set of transitions as our independent test set. Testing predicted dynamics from the trained model on new data We queried the model fitted from the training data to predict the likely next states from each precursor state in this independent set of transitions [20]. We ranked the possible next steps from each state from most likely to least likely under the fitted model. We then recorded the ranks corresponding to the actual step(s) corresponding to the observed transition, and compared these to a null model where each possible transition could occur with probability given by its relative prevalence in the training data. For the Shiny app in S7 Fig, we report the probabilities of each possible next acquisition step given a provided current state, and construct the transition network starting from that current state and involving up to five further acquisitions. Notes on nuances and resolutions in applying HyperTraPS to KpAMR data The model underlying HyperTraPS pictures acquisitions as occurring irreversibly, while KpAMR characters—particularly those acquired through plasmid exchange—may be gained and lost many times by a lineage [9]. The fundamental reason we use an irreversible model is computational tractability. If reversible transitions are allowed, a potentially infinite set of evolutionary pathways (involving repeated acquisition and loss of characters) can connect any two states, complicating the computation of these pathways and their interpretation. In practise—including in AMR systems—only a limited number of the vast space of possible pathways play important roles in evolutionary dynamics [29,30], and powerful results have been demonstrated for accessibility of pathways sets on hypercubic evolution landscapes [60,61]. While applying irreversible models to systems involving reversibility increases the uncertainty of the inference process and challenges the inference of the detailed interactions between features, inferred evolutionary dynamics and particularly acquisition orderings is robust to this challenge—illustrated with some simple examples in S1A Fig, comparison with an EvAM approach allowing for reversibility [15] in S1C Fig, and the focus of study in [31]. This holds both for comparable loss rates across features and for distinct loss propensities, in which case the approach functions to infer the gain/loss rate ratio—which itself determines evolutionary orderings and prevalence patterns [31]. Generally, the outputs of HyperTraPS infer and report which features are likely present when a given feature is gained—a quantity that remains well-defined across irreversible and reversible cases. The congruence of this inference across reversible and irreversible approaches can be seen, for example, in S1C Fig. We also note that the model does not assume that a final “end point” with all characters present is ever reached (or indeed possible), instead leaving uncertain all acquisitions that are not observed in real data. HyperTraPS invokes a “emission” picture, comparable to a hidden Markov model, to connect with observations [22], and therefore does not require complete information or homogeneous populations—it can naturally account for limited sampling of a broader, potentially heterogeneous population [32]. HyperTraPS does not a priori assume that the inferred evolutionary dynamics are a consequence of independent character accumulation (where each character’s observed prevalence is determined by a single acquisition rate) or interactions between characters (where the acquisition of a character is influenced by the presence of others) [31]. The “null model” of independence is challenged, for example, by instances of bimodality in inferred orderings – where a character may be acquired before many others or after many others, but not at intermediate stages. But the inferred evolutionary trajectories may be reported and analyzed regardless of which generative model is most supported. (We note, in parallel to this point, that simultaneous acquisition of multiple features is very compatible with our approach; the resulting output simply places equal probabilities over all compatible ordering pathways.) Our samples are connected by a phylogeny, which we estimate with a taxonomy constructed from LINcodes (see Methods). Accounting for this phylogeny allows us to control against pseudoreplication, where individuals inheriting characters from a common ancestor are interpreted as independent acquisition instances of those characters [9,18,19,33]. Our approach uses the relative evolutionary timings from the source data phylogeny (for example, Fig 1Ci) to report the orderings of events: which acquisitions precede or follow which others, given that characters may influence each other, with the timescale of these events (see Discussion). In our case, much of the taxonomy corresponds to LINcode elements reflecting a deep timescale, with only separations within the final clusters corresponding to separation timescales under 1,000 years (following a back-of-the-envelope calculation in footnote below). For many KpAMR features, a picture of independent acquisitions is then not unreasonable, as many KpAMR acquisitions may have occurred on a shorter timescale (that of modern human medicine). However, our phylogenetically-embedded approach only biases the inference in the case of strong connection between acquisition patterns and sampling [31], otherwise simply increasing the uncertainty of the inferences [31,34]. In many real-world EvAM cases, whether or not phylogeny is included has an effect on uncertainty but no detectable impact on estimated orderings—demonstrated for two countries in our dataset in S1B Fig. As we control for the different uncertainties across countries in the followup PCA analysis, we use this approach to correct for potential instances of pseudoreplication. The large majority of genomes with timing information were isolated in the period 2015–2020 (Fig 1A). Our approach here does not directly consider the specific, real-world timings of the evolutionary transitions involved. The precise timescales of the evolutionary process are in principle addressable using a version of our approach called HyperTraPS-CT (continuous time) [20], but this requires a consistent estimation of divergence times between all isolates in the dataset. Importantly, our approach here does not completely neglect a timescale—it is implicit in the phylogenetic relationships included in the source data, and this inclusion both accounts for the temporal ordering of events and “pseudoreplication” as above. However, this approach based on relative evolutionary timings means that we cannot directly tie differences in inferred evolutionary behavior to known real-world historical events shaping AMR profiles: shifts in drug policy, for example, or outbreaks or other events changing the effective size of the evolving population. While our results, focusing on the ordering of acquisition events, already demonstrate descriptive and predictive power in KpAMR evolution across countries, a continuous time picture on a smaller scale in the future (perhaps a single country or small set) would enable finer-grained linking between model prediction and the real-world details of policy and disease history. Our samples are labeled by country of collection, which we treat as a covariate in our analysis. However, of course, bacteria and their hosts are not physically limited to remain within a given country. The phylogeography of Kp has been studied in depth, for example, in [6,62,63] and certainly involves mixing of strains across borders. Our analysis and interpretation do not assume that observations from a country all and exclusively reflect evolution in that country alone; our regional and correlative downstream analysis accepts that mixing can readily take place and attempts to identify variability that can be observed despite this mixing (which, in the limiting case, would lead to homogeneous inferred dynamics worldwide). The terminal clusters in our LIN-derived taxonomy reflect ANI > 99.84%, giving a per-site substitution proportion of at most 0.0016. Estimates for Kp substitution rates are around 1.5 × 10−6 substitutions per site per year [64]. A substitution proportion of 0.0016 might then be expected over a timescale of 0.0016/1.5 × 10−6 ≈ 103 years, reflecting an estimate for the longest timescale of separation within the terminal clusters. Data and code availability The code base for this study is publically available at https://github.com/StochasticBiology/kp-evolution-inference. A Zenodo repository including this codebase, raw FASTA files for the newly-sequenced Kp genomes, and cached versions of the raw data for all figures is available at https://doi.org/10.5281/zenodo.20408311. In addition to the software referenced above, we use R with libraries hypertrapsct for evolutionary inference (Aga et al., 2024), dplyr (Wickham et al., 2023), tidyverse (Wickham et al., 2019), countrycode (Arel-Bundock et al., 2018) for data manipulation, lme4 (Bates et al., 2015) for statistics, phytools (Revell, 2012) for phylogenetic analysis, and ggplot2 (Wickham, 2016), ggpubr (Kassambara, 2020), ggbeeswarm, ggrepel (Slowikowski, 2021), ggupset (Ahlmann-Eltze, 2025) for visualisation [65–75]. We also use a Python script for LINcoding by Melanie Hennart, which uses numpy (Harris et al., 2020). The world map in Fig. 1 is from the maps package (Becker et al., 2018), itself using geographical data from Natural Earth as a base layer which is public domain https://www.naturalearthdata.com/about/terms-of-use /. The globe image in Fig. 2 is public domain from WikiCommons https://commons.wikimedia.org/wiki/File:Globe.svg. Supporting information Limited issues with modeling reversible dynamics. Plots involve a dataset (left) and “bubble plot” summary of inference as in the text (right). (A) HyperTraPS recovers accumulation orderings from reversible processes. Synthetic datasets involving the progressive accumulation, and loss, of characters X1 to X10, with different accumulation and loss rates (i)–(vi). For (i) accumulation rate = 1 and no loss take place. For (ii)–(vi) accumulation rate = 2 and (ii) loss rate is 0.1 for features 1–5 and 0 otherwise; (iii) loss rate increases linearly from 0.05 for feature 1 to 0.5 for feature 10; (iv) loss rate increases linearly from 0.2 for feature 1–2 for feature 10; (v) loss rate for each feature is drawn from U(0, 0.5); (vi) loss rate for each feature is drawn from U(0, 1). The output inferred from HyperTraPS accurately reports the accumulation ordering of characters, with differences in uncertainty, and ambiguity about characters which are not observed across all samples. This small-scale case study reflects a specific instance of the picture explored more generally in [31]. In all cases, inferred ordering can be interpreted as reporting which features are present when another is gained (see Methods). (B) Limited impact of neglecting phylogenies. Datasets from (i) Romania; (ii) Senegal. Inferences shown ignoring phylogeny (cross-sectional picture) vs. including phylogenetic information for ancestral state reconstruction and considering transitions down lineages. Here (and generally), many samples are related only via deep branches and are effectively independent; more recent relatedness within clades has a marginal effect on the uncertainty of posteriors but no noticeable effect on inferred orderings, in agreement with [34,31]. (C) Agreement of irreversible and reversible inference. (i) A reduced subset of the full KpAMR dataset, involving 5 features chosen to reflect a spread of prevalences: Bla_ESBL_a (1), Sul_a (2), Bla_chr (3), Tet_a (4), Rif_a (5). With this reduced set, the HyperMk approach [15] can be used to perform inference allowing for reversibility. Both the bubble plot summary (ii) and the inferred transition network (iii) for HyperMk (“Rev”) are very similar to the HyperTraPS outputs assuming an irreversible picture (“Irrev”), with HyperMk supporting reversible versions of all the same transitions identified (also observed in [31]); the Akaike Information Criterion favors the irreversible picture (393 vs. 553). The data and code underlying this figure can be found at https://doi.org/10.5281/zenodo.20408311. (TIF) All posterior orderings of AMR character acquisitions. This “global roadmap” summarizes “bubble plots” describing inferred evolutionary dynamics of KpAMR characters in different countries. Each row is a country, ordered vertically by descending number of Kp samples. Each column is a KpAMR character; the horizontal axis within columns gives evolutionary orderings (from early to late). The size of a point gives the probability that that character is acquired at that ordering in that country. For example, across the vast majority of datasets (including the top row, USA, for example), Bla_chr has a high probability of early acquisition and Gly_acquired has a high probability of late acquisition. In Cameroon, all characters have similar inferred evolutionary orderings, reflecting the limited data available to make more precise statements. Character names given in Fig 1 caption. The data and code underlying this figure can be found at https://doi.org/10.5281/zenodo.20408311. (TIF) Mean posterior orderings and country-specific prevalences of AMR character acquisitions. (A) All KpAMR characters with a prevalence >5% and <95% together (R2 = 0.41). (B) Individual KpAMR characters. The data and code underlying this figure can be found at https://doi.org/10.5281/zenodo.20408311. (TIF) Inferred interactions between KpAMR characters. An arrow from character X to character Y reports an inferred interaction between the evolutionary acquisition of those characters. Blue arrow: acquiring X makes acquiring Y more likely (“promoting”). Red arrow: acquiring X makes acquiring Y less likely (“repressing”). The number on each arrow gives the number of countries in which that interaction was inferred; only interactions appearing in >15% of countries with a posterior coefficient of variation under 1 are shown. Character names given in Fig 1 caption. However, as the inference of character interactions with HyperTraPS is challenging for reversible systems [31], these results should be treated with caution. The data and code underlying this figure can be found at https://doi.org/10.5281/zenodo.20408311. (TIF) KpAMR characters determining aspects of global variability in evolutionary dynamics (alternative visualization). Connected to Fig 3. KpAMR characters (horizontal axis) are plotted by their expected acquisition ordering (vertical axis) for each country (points). The country’s projection on PCA1, PCA2, and PCA3, for those characters that most strongly covary with each PCA axis, are given by the color of a point. As in Fig 3, those characters that covary with PCA1 form a consistent spectrum linked to precision: low values of PCA1 correspond to less precise, more uniform timing, while higher values lead to more precise earlier or later timings. Characters covarying with the other PCAs display wider ranges connected to PCA1-independent variability. Character names given in Fig 1 caption. The data and code underlying this figure can be found at https://doi.org/10.5281/zenodo.20408311. (TIF) New KpAMR data from Zanzibar and Dar es Salaam, Tanzania. Phylogenies and KpAMR profiles from new datasets: (A) Zanzibar 2015−6. (B) Tanzania 2001−2. (C) Tanzania 2017−8. (D) Pathogenwatch Tanzania. (E) Circular projection of the phylogeny of Tanzanian isolates in Fig 5A. Colors: green, 2001−2; blue, 2017−8; red, existing Pathogenwatch data. The data and code underlying this figure can be found at https://doi.org/10.5281/zenodo.20408311. (TIF) Shiny app for predictions of future KpAMR character acquisitions. A country of interest is specified, and the KpAMR profile of a sample given by specifying presence or absence of each of our characters. The graphical outputs then give the inferred probabilities of each next possible character acquisition (which can be downloaded in CSV format), as well as a transition graph describing the likely subsequent pathways for up to five acquisitions in the future. Available at https://stochasticbiology.shinyapps.io/amr-predict/. (TIF) 1 Apr 2026 Dear Dr Johnston, Thank you for submitting your manuscript entitled "A natural history of AMR in Klebsiella pneumoniae: Global diversity, predictors, and predictions of evolutionary pathways" for consideration as a Research Article by PLOS Biology. Your manuscript has now been evaluated by the PLOS Biology editorial staff as well as by an academic editor with relevant expertise and I am writing to let you know that we would like to send your submission out for external peer review. However, before we can send your manuscript to reviewers, we need you to complete your submission by providing the metadata that is required for full assessment. To this end, please login to Editorial Manager where you will find the paper in the 'Submissions Needing Revisions' folder on your homepage. Please click 'Revise Submission' from the Action Links and complete all additional questions in the submission questionnaire. Once your full submission is complete, your paper will undergo a series of checks in preparation for peer review. After your manuscript has passed the checks it will be sent out for review. To provide the metadata for your submission, please Login to Editorial Manager (https://www.editorialmanager.com/pbiology) within two working days, i.e. by Apr 03 2026 11:59PM. If your manuscript has been previously peer-reviewed at another journal, PLOS Biology is willing to work with those reviews in order to avoid re-starting the process. Submission of the previous reviews is entirely optional and our ability to use them effectively will depend on the willingness of the previous journal to confirm the content of the reports and share the reviewer identities. Please note that we reserve the right to invite additional reviewers if we consider that additional/independent reviewers are needed, although we aim to avoid this as far as possible. In our experience, working with previous reviews does save time. If you would like us to consider previous reviewer reports, please edit your cover letter to let us know and include the name of the journal where the work was previously considered and the manuscript ID it was given. In addition, please upload a response to the reviews as a 'Prior Peer Review' file type, which should include the reports in full and a point-by-point reply detailing how you have or plan to address the reviewers' concerns. During the process of completing your manuscript submission, you will be invited to opt-in to posting your pre-review manuscript as a bioRxiv preprint. Visit http://journals.plos.org/plosbiology/s/preprints for full details. If you consent to posting your current manuscript as a preprint, please upload a single Preprint PDF. Feel free to email us at plosbiology@plos.org if you have any queries relating to your submission. Kind regards, Melissa Melissa Vazquez Hernandez, Ph.D. Associate Editor PLOS Biology mvazquezhernandez@plos.org 28 Apr 2026 Dear Iain, Thank you for your patience while we considered your revised manuscript "A natural history of AMR in Klebsiella pneumoniae: Global diversity, predictors, and predictions of evolutionary pathways" for consideration as a Research Article at PLOS Biology under Portable Peer Review. Your revised study has now been evaluated by the PLOS Biology editors, the Academic Editor and one additional reviewer (Joachim Krug). In light of the reviews, which you will find at the end of this email, we would like to invite you to revise your manuscript to address several points raised during evaluation. As you will see below, the additional reviewer is overall positive about the quality and relevance of the work and acknowledges that the previous concerns brought at the previous journal have been carefully addressed, particularly with the expanded treatment of reversibility. However, some important issues remain that require clarification before further consideration. In particular, our reviewer asks that you more clearly explain the computational challenges associated with incorporating reversibility into the modeling framework, to better guide readers through this conceptual limitation. In addition, s/he raises concerns about the interpretation of the predictive analysis presented in Figure 5, noting that the performance of the HyperTraPS model appears comparable to a simple prevalence-based null model. We therefore ask that you clarify how predictive performance is quantified and revise the text to more accurately reflect the strength of this result. More generally, we encourage you to carefully temper conclusions regarding inferred interactions between resistance features, given the acknowledged limitations of the approach. In addition to these revisions, you may need to complete some formatting changes, which you will receive in a follow up email. A member of our team will be in touch with a set of requests shortly. If you do not receive a separate email within a few days, please assume that checks have been completed, and no additional changes are required. We expect to receive your revised manuscript within 1 month. Please email us (plosbiology@plos.org) if you have any questions or concerns, or would like to request an extension. At this stage, your manuscript remains formally under active consideration at our journal; please notify us by email if you do not intend to submit a revision so that we withdraw the manuscript. **IMPORTANT - SUBMITTING YOUR REVISION** Your revisions should address the specific points made by each reviewer. Please submit the following files along with your revised manuscript: 1. A 'Response to Reviewers' file - this should detail your responses to the editorial requests, present a point-by-point response to all of the reviewers' comments, and indicate the changes made to the manuscript. *NOTE: In your point-by-point response to the reviewers, please provide the full context of each review. Do not selectively quote paragraphs or sentences to reply to. The entire set of reviewer comments should be present in full and each specific point should be responded to individually. You should also cite any additional relevant literature that has been published since the original submission and mention any additional citations in your response. 2. In addition to a clean copy of the manuscript, please also upload a 'track-changes' version of your manuscript that specifies the edits made. This should be uploaded as a "Revised Article with Changes Highlighted " file type. *Resubmission Checklist* When you are ready to resubmit your revised manuscript, please refer to this resubmission checklist: https://plos.io/Biology_Checklist To submit a revised version of your manuscript, please go to https://www.editorialmanager.com/pbiology/ and log in as an Author. Click the link labelled 'Submissions Needing Revision' where you will find your submission record. Please make sure to read the following important policies and guidelines while preparing your revision: *Published Peer Review* Please note while forming your response, if your article is accepted, you may have the opportunity to make the peer review history publicly available. The record will include editor decision letters (with reviews) and your responses to reviewer comments. If eligible, we will contact you to opt in or out. Please see here for more details: https://blogs.plos.org/plos/2019/05/plos-journals-now-open-for-published-peer-review/ *PLOS Data Policy* Please note that as a condition of publication PLOS' data policy (http://journals.plos.org/plosbiology/s/data-availability) requires that you make available all data used to draw the conclusions arrived at in your manuscript. If you have not already done so, you must include any data used in your manuscript either in appropriate repositories, within the body of the manuscript, or as supporting information (N.B. this includes any numerical values that were used to generate graphs, histograms etc.). For an example see here: http://www.plosbiology.org/article/info%3Adoi%2F10.1371%2Fjournal.pbio.1001908#s5 *Blot and Gel Data Policy* We require the original, uncropped and minimally adjusted images supporting all blot and gel results reported in an article's figures or Supporting Information files. We will require these files before a manuscript can be accepted so please prepare them now, if you have not already uploaded them. Please carefully read our guidelines for how to prepare and upload this data: https://journals.plos.org/plosbiology/s/figures#loc-blot-and-gel-reporting-requirements *Protocols deposition* To enhance the reproducibility of your results, we recommend that if applicable you deposit your laboratory protocols in protocols.io, where a protocol can be assigned its own identifier (DOI) such that it can be cited independently in the future. Additionally, PLOS ONE offers an option for publishing peer-reviewed Lab Protocol articles, which describe protocols hosted on protocols.io. Read more information on sharing protocols at https://plos.org/protocols?utm_medium=editorial-email&utm_source=authorletters&utm_campaign=protocols Thank you again for your submission to our journal. We hope that our editorial process has been constructive thus far, and we welcome your feedback at any time. Please don't hesitate to contact us if you have any questions or comments. Sincerely, Melissa Melissa Vazquez Hernandez, Ph.D. Associate Editor PLOS Biology mvazquezhernandez@plos.org ---------------------------------------------------------------- Reviewer #1 (Joachim Krug): The scope and significance of the work has been well described in the previous reports. As far as I can see, in the revision the authors have fully addressed the concerns raised by the previous reviewers, by adding material to the manuscript and the supplement, as well as through a new in-depth investigation of the key problem of incorporating reversibility of evolutionary pathways in the inference (which here corresponds to the possibility of acquired AMR features being lost along a trajectory), see Johnston 2026. The detailed engagement with the limitations of the HyperTraPS approach caused by its restriction to irreversible acquisition trajectories has the somewhat unfortunate consequence of weakening the conclusions that can be drawn with confidence, in particular with regard to possible interactions between resistance features that could guide the development of combination therapies. Nevertheless, the study remains an impressive demonstration of the state of the art in the field, and I recommend publication in PLoS Biology after the following (additional) comments and suggestions have been addressed. MAJOR ISSUES 1. While the distinction between reversible and irreversible acquisition pathways is discussed in detail in the revised manuscript, it may not become clear to the reader why it is computationally difficult to incorporate reversibility. This is well explained in the new manuscript by Johnston 2026 - it is just a matter of the explosion in the number of possible pathways - and I suggest to include a similar discussion here. To provide some context, it may be helpful to refer to the seminal work of Weinreich and collaborators on trajectories towards high resistance in the TEM-1 beta-lactamase (Science 2006) and the follow-up work by De Pristo et al. (MBE 2007). Weinreich et al. found that out of the 5!=120 possible irreversible trajectories along which 5 mutations in TEM-1 could be acquired only 18 were 'selectively accessible' (= monotonically increasing in MIC). De Pristo et al. expanded the analysis to irreversible trajectories, finding an enormous increase of possible paths (from 120 to 18,651,552,840) but only a moderate increase in the number of accessible ones (from 18 to 27), because very long trajectories are unlikely to be accessible. Weinreichs problem is different from the present one in that in his case trajectories cannot revisit the same configuration (and therefore the number of pathways is finite even when reversions are included), but in practice this distinction hardly matters (in fact in the extensive theoretical work on this problem the constraint that accessible paths are self-avoiding can be ignored asymptotically for large hypercubes, see Schmiegelt and Krug (J. Math. Biol. 2023) for a rigorous treatment and Krug and Oros (Journal of Statistical Mechanics: Theory and Experiment 2024, Section 3) for a review). 2. An important change compared to the previous version of the manuscript is the choice of null model in the assessment of the predictive potential of the method in Figure 5. The new panel 5B shows that the prediction of the HyperTraPS is almost indistinguishable from that of a simple null model based only on the prevalence of traits. I have difficulty interpreting this figure and linking it to the statement in the text that the trained model outperforms the null model in 18% of cases (lines 359/360). In terms of predicting the exact rank, it seems from Fig. 5B that the two models perform equally well, getting it right in about 50% of cases. How is the full information in the histogram in Fig. 5B used to quantify the overall performance? MINOR ISSUES 3. The abbreviation GBD (= Global Burden of Disease) is used throughout the paper but not defined. 4. line 231: 19th century -> 20th century 5. line 336: remove 'and' 7 May 2026 Submitted filename: pb-reviewer-response.pdf 25 May 2026 Dear Iain, Thank you for your patience while we considered your revised manuscript "A natural history of AMR in Klebsiella pneumoniae: Global diversity, predictors, and predictions of evolutionary pathways" for publication as a Research Article at PLOS Biology. This revised version of your manuscript has been evaluated by the PLOS Biology editors, the Academic Editor and the original reviewer. Based on the review, we are likely to accept this manuscript for publication, provided you satisfactorily address the remaining editorial points. Please also make sure to address the following data and other policy-related requests. 1) We routinely suggest changes to titles to ensure maximum accessibility for a broad, non-specialist readership, and to ensure they reflect the contents of the paper. In this case, we would suggest a minor edit to the title, as follows. Please ensure you change both the manuscript file and the online submission system, as they need to match for final acceptance: "Evolutionary modeling reveals global routes to antimicrobial resistance in Klebsiella pneumoniae" 2) Please add the weblink of the funding agencies in the Financial Disclosure statement in the manuscript details during submission. 3) We do not have a word limit. Please move the supplementary text, together with the references, to the main text which can provide the readers an easier access to all information. 4) You may be aware of the PLOS Data Policy, which requires that all data be made available without restriction: http://journals.plos.org/plosbiology/s/data-availability. For more information, please also see this editorial: http://dx.doi.org/10.1371/journal.pbio.1001797 Please supply the numerical values either in the a supplementary file or as a permanent DOI’d deposition for the following figures: Figure 1ABC, 2AC, 3ABC, 4A-D, 5BC, S1ABC, S2, S3AB, S4A, S5 NOTE: the numerical data provided should include all replicates AND the way in which the plotted mean and errors were derived (it should not present only the mean/average values). *If the figure were done using r, or any code, please provide the code necessary to replicate the figures. 5) Please cite the location of the data clearly in all relevant main and supplementary Figure legends, e.g. “The data underlying this Figure can be found in S1 Data” or “The data underlying this Figure can be found in https://doi.org/10.5281/zenodo.XXXXX” 6) Please provide the tree files for the phylogenetic trees in Figures .5A, S1AB, S6A-E Please make sure all relevant figures have scale bars. 7) Please ensure that your Data Statement in the submission system accurately describes where your data can be found and is in final format, as it will be published as written there 8) Thank you for providing the underlying code in GitHub. However, because Github depositions can be readily changed or deleted, please make a permanent DOI’d copy (e.g. in Zenodo) and provide this URL in the manuscript and Data Availability Statement. As you address these items, please take this last chance to review your reference list to ensure that it is complete and correct. If you have cited papers that have been retracted, please include the rationale for doing so in the manuscript text, or remove these references and replace them with relevant current references. Any changes to the reference list should be mentioned in the cover letter that accompanies your revised manuscript. In addition to these revisions, you may need to complete some formatting changes, which you will receive in a follow up email. A member of our team will be in touch with a set of requests shortly. If you do not receive a separate email within a few days, please assume that checks have been completed, and no additional changes are required. We expect to receive your revised manuscript within two weeks. To submit your revision, please go to https://www.editorialmanager.com/pbiology/ and log in as an Author. Click the link labelled 'Submissions Needing Revision' to find your submission record. Your revised submission must include the following: - a cover letter that should detail your responses to any editorial requests, if applicable, and whether changes have been made to the reference list - a Response to Reviewers file that provides a detailed response to the reviewers' comments (if applicable, if not applicable please do not delete your existing 'Response to Reviewers' file.) - a track-changes file indicating any changes that you have made to the manuscript. NOTE: If Supporting Information files are included with your article, note that these are not copyedited and will be published as they are submitted. Please ensure that these files are legible and of high quality (at least 300 dpi) in an easily accessible file format. For this reason, please be aware that any references listed in an SI file will not be indexed. For more information, see our Supporting Information guidelines: https://journals.plos.org/plosbiology/s/supporting-information *Published Peer Review History* Please note that you may have the opportunity to make the peer review history publicly available. The record will include editor decision letters (with reviews) and your responses to reviewer comments. If eligible, we will contact you to opt in or out. Please see here for more details: https://plos.org/published-peer-review-history/ *Press* Should you, your institution's press office or the journal office choose to press release your paper, please ensure you have opted out of Early Article Posting on the submission form. We ask that you notify us as soon as possible if you or your institution is planning to press release the article. *Protocols deposition* To enhance the reproducibility of your results, we recommend that if applicable you deposit your laboratory protocols in protocols.io, where a protocol can be assigned its own identifier (DOI) such that it can be cited independently in the future. Additionally, PLOS ONE offers an option for publishing peer-reviewed Lab Protocol articles, which describe protocols hosted on protocols.io. Read more information on sharing protocols at https://plos.org/protocols?utm_medium=editorial-email&utm_source=authorletters&utm_campaign=protocols Please do not hesitate to contact me should you have any questions. Sincerely, Melissa Melissa Vazquez Hernandez, Ph.D. Associate Editor mvazquezhernandez@plos.org PLOS Biology ------------------------------------------------------------------------ REVIEWERS' COMMENTS ------------------------------------------------------------------------ Reviewer #1 (Joachim Krug): My previous comments have been fully addressed in the revision. 28 May 2026 Dear Iain Thank you for the submission of your revised Research Article "Evolutionary inference reveals global natural histories and predicted pathways of antimicrobial resistance in Klebsiella pneumoniae" for publication in PLOS Biology, which came in as Portable Peer Review. On behalf of my colleagues and the Academic Editor, J. Arjan G. M. de Visser, I am pleased to say that we can in principle accept your manuscript for publication, provided you address any remaining formatting and reporting issues. These will be detailed in an email you should receive within 2-3 business days from our colleagues in the journal operations team; no action is required from you until then. Please note that we will not be able to formally accept your manuscript and schedule it for publication until you have completed any requested changes. Please take a minute to log into Editorial Manager at http://www.editorialmanager.com/pbiology/, click the "Update My Information" link at the top of the page, and update your user information to ensure an efficient production process. PRESS We frequently collaborate with press offices. If your institution or institutions have a press office, please notify them about your upcoming paper at this point, to enable them to help maximise its impact. If the press office is planning to promote your findings, we would be grateful if they could coordinate with biologypress@plos.org. If you have previously opted in to the early version process, we ask that you notify us immediately of any press plans so that we may opt out on your behalf. We also ask that you take this opportunity to read our Embargo Policy regarding the discussion, promotion and media coverage of work that is yet to be published by PLOS. As your manuscript is not yet published, it is bound by the conditions of our Embargo Policy. Please be aware that this policy is in place both to ensure that any press coverage of your article is fully substantiated and to provide a direct link between such coverage and the published work. For full details of our Embargo Policy, please visit http://www.plos.org/about/media-inquiries/embargo-policy/. Thank you again for choosing PLOS Biology for publication and supporting Open Access publishing. We look forward to publishing your study. Sincerely, Melissa Melissa Vazquez Hernandez, Ph.D., Ph.D. Associate Editor PLOS Biology mvazquezhernandez@plos.org