Abstract
The functions of many microbial communities exhibit remarkable stability despite fluctuations in the compositions of these communities. To date, a mechanistic understanding of this function–composition decoupling is lacking. Statistical mechanisms have been commonly hypothesized to explain such decoupling. Here, we proposed that dynamic mechanisms, mediated by horizontal gene transfer (HGT), also enable the independence of functions from the compositions of microbial communities. We combined theoretical analysis with numerical simulations to illustrate that HGT rates can determine the stability of gene abundance in microbial communities. We further validated these predictions using engineered microbial consortia of different complexities transferring one or more than a dozen clinically isolated plasmids, as well as through the reanalysis of data from the literature. Our results demonstrate a generalizable strategy to program the gene stability of microbial communities.

This is a preview of subscription content, access via your institution
Access options
Access Nature and 54 other Nature Portfolio journals
Get Nature+, our best-value online-access subscription
$32.99 / 30 days
cancel any time
Subscribe to this journal
Receive 12 print issues and online access
$259.00 per year
only $21.58 per issue
Buy this article
- Purchase on SpringerLink
- Instant access to the full article PDF.
USD 39.95
Prices may be subject to local taxes which are calculated during checkout





Similar content being viewed by others
Data availability
Experimental data generated for this manuscript are deposited at GitHub at https://github.com/youlab/GeneStability_NCB2022. Source data are provided with this paper.
Code availability
The simulation and data analysis codes used in this study are deposited at GitHub at https://github.com/youlab/GeneStability_NCB2022.
References
Cheaib, B., Le Boulch, M., Mercier, P.-L. & Derome, N. Taxon-function decoupling as an adaptive signature of lake microbial metacommunities under a chronic polymetallic pollution gradient. Front. Microbiol. 9, 869 (2018).
Debroas, D. et al. Metagenomic approach studying the taxonomic and functional diversity of the bacterial community in a mesotrophic lake (Lac du Bourget–France). Environ. Microbiol. 11, 2412–2424 (2009).
Forsberg, K. J. et al. Bacterial phylogeny structures soil resistomes across habitats. Nature 509, 612–616 (2014).
Huttenhower, C. et al. Structure, function and diversity of the healthy human microbiome. Nature 486, 207–214 (2012).
Louca, S., Parfrey, L. W. & Doebeli, M. Decoupling function and taxonomy in the global ocean microbiome. Science 353, 1272–1277 (2016).
Burke, C., Steinberg, P., Rusch, D., Kjelleberg, S. & Thomas, T. Bacterial community assembly based on functional genes rather than species. Proc. Natl Acad. Sci. USA 108, 14288–14293 (2011).
Louca, S. et al. High taxonomic variability despite stable functional structure across microbial communities. Nat. Ecol. Evol. 1, 0015 (2016).
Louca, S. et al. Function and functional redundancy in microbial systems. Nat. Ecol. Evol. 2, 936–943 (2018).
Allison, S. D. & Martiny, J. B. Resistance, resilience, and redundancy in microbial communities. Proc. Natl Acad. Sci. USA 105, 11512–11519 (2008).
Doak, D. F. et al. The statistical inevitability of stability-diversity relationships in community ecology. Am. Nat. 151, 264–276 (1998).
Prosser, J. I. et al. The role of ecological theory in microbial ecology. Nat. Rev. Microbiol. 5, 384–392 (2007).
Soucy, S. M., Huang, J. & Gogarten, J. P. Horizontal gene transfer: building the web of life. Nat. Rev. Genet. 16, 472–482 (2015).
Touchon, M. et al. Organised genome dynamics in the Escherichia coli species results in highly diverse adaptive paths. PLoS Genet. 5, e1000344 (2009).
Brito, I. L. et al. Mobile genes in the human microbiome are structured from global to individual scales. Nature 535, 435–439 (2016).
Lopatkin, A. J. et al. Persistence and reversal of plasmid-mediated antibiotic resistance. Nat. Commun. 8, 1689 (2017).
Jørgensen, T. S., Xu, Z., Hansen, M. A., Sørensen, S. J. & Hansen, L. H. Hundreds of circular novel plasmids and DNA elements identified in a rat cecum metamobilome. PLoS One 9, e87924 (2014).
Curtis, T. P., Sloan, W. T. & Scannell, J. W. Estimating prokaryotic diversity and its limits. Proc. Natl Acad. Sci. USA 99, 10494–10499 (2002).
Faust, K. & Raes, J. Microbial interactions: from networks to models. Nat. Rev. Microbiol. 10, 538–550 (2012).
Wang, T. & You, L. The persistence potential of transferable plasmids. Nat. Commun. 11, 5589 (2020).
Baba, T. et al. Construction of Escherichia coli K‐12 in‐frame, single‐gene knockout mutants: the Keio collection. Mol. Syst. Biol. 2, 2006.0008 (2006).
Bethke, J. H. et al. Environmental and genetic determinants of plasmid mobility in pathogenic Escherichia coli. Sci. Adv. 6, eaax3173 (2020).
Novick, R. P. Plasmid incompatibility. Microbiol. Rev. 51, 381–395 (1987).
Smillie, C., Garcillán-Barcia, M. P., Francia, M. V., Rocha, E. P. & de la Cruz, F. Mobility of plasmids. Microbiol. Mol. Biol. Rev. 74, 434–452 (2010).
Kottara, A., Hall, J. P. & Brockhurst, M. A. The proficiency of the original host species determines community-level plasmid dynamics. FEMS Microbiol. Ecol. 97, fiab026 (2021).
Hall, J. P., Wood, A. J., Harrison, E. & Brockhurst, M. A. Source–sink plasmid transfer dynamics maintain gene mobility in soil bacterial communities. Proc. Natl Acad. Sci. USA 113, 8260–8265 (2016).
Hall, J. P., Harrison, E., Pärnänen, K., Virta, M. & Brockhurst, M. A. The impact of mercury selection and conjugative genetic elements on community structure and resistance gene transfer. Front. Microbiol. 11, 1846 (2020).
Keen, E. C. et al. Novel ‘superspreader’ bacteriophages promote horizontal gene transfer by transformation. MBio 8, e02115–e02116 (2017).
Li, B. et al. Real-time study of rapid spread of antibiotic resistance plasmid in biofilm using microfluidics. Environ. Sci. Technol. 52, 11132–11141 (2018).
Lambrecht, E. et al. Commensal E. coli rapidly transfer antibiotic resistance genes to human intestinal microbiota in the Mucosal Simulator of the Human Intestinal Microbial Ecosystem (M-SHIME). Int. J. Food Microbiol. 311, 108357 (2019).
Stecher, B. et al. Gut inflammation can boost horizontal gene transfer between pathogenic and commensal Enterobacteriaceae. Proc. Natl Acad. Sci. USA 109, 1269–1274 (2012).
Hirt, H. et al. Enterococcus faecalis sex pheromone cCF10 enhances conjugative plasmid transfer in vivo. MBio 9, e00037–00018 (2018).
Freese, P. D., Korolev, K. S., Jiménez, J. I. & Chen, I. A. Genetic drift suppresses bacterial conjugation in spatially structured populations. Biophys. J. 106, 944–954 (2014).
Pallares-Vega, R. et al. Temperature and nutrient limitations decrease transfer of conjugative IncP-1 plasmid pKJK5 to wild Escherichia coli strains. Front. Microbiol. 12, 656250 (2021).
Hemme, C. L. et al. Lateral gene transfer in a heavy metal-contaminated-groundwater microbial community. MBio 7, e02234–15 (2016).
Jagmann, N. & Philipp, B. Design of synthetic microbial communities for biotechnological production processes. J. Biotechnol. 184, 209–218 (2014).
Lawson, C. E. et al. Common principles and best practices for engineering microbiomes. Nat. Rev. Microbiol. 17, 725–741 (2019).
Gilmore, S. P. & O’Malley, M. A. Microbial communities for bioprocessing: lessons learned from nature. Curr. Opin. Chem. Eng. 14, 103–109 (2016).
Tsoi, R. et al. Metabolic division of labor in microbial systems. Proc. Natl Acad. Sci. USA 115, 2526–2531 (2018).
Keen, E. C. Paradigms of pathogenesis: targeting the mobile genetic elements of disease. Front. Cell. Infect. Microbiol. 2, 161 (2012).
Porse, A. et al. Genome dynamics of Escherichia coli during antibiotic treatment: transfer, loss, and persistence of genetic elements in situ of the infant gut. Front. Cell. Infect. Microbiol. 7, 126 (2017).
Conlan, S. et al. Single-molecule sequencing to track plasmid diversity of hospital-associated carbapenemase-producing Enterobacteriaceae. Sci. Transl. Med. 6, 254ra126 (2014).
Acar, M., Mettetal, J. T. & Van Oudenaarden, A. Stochastic switching as a survival strategy in fluctuating environments. Nat. Genet. 40, 471–475 (2008).
Nevozhay, D., Adams, R. M., Van Itallie, E., Bennett, M. R. & Balázsi, G. Mapping the environmental fitness landscape of a synthetic gene circuit. PLoS Comput. Biol. 8, e1002480 (2012).
Belete, M. K. & Balázsi, G. Optimality and adaptation of phenotypically switching cells in fluctuating environments. Phys. Rev. E Stat. Nonlin. Soft Matter Phys. 92, 062716 (2015).
Bódi, Z. et al. Phenotypic heterogeneity promotes adaptive evolution. PLoS Biol. 15, e2000644 (2017).
Yeh, P. J., Hegreness, M. J., Aiden, A. P. & Kishony, R. Drug interactions and the evolution of antibiotic resistance. Nat. Rev. Microbiol. 7, 460–466 (2009).
Bervoets, I. & Charlier, D. Diversity, versatility and complexity of bacterial gene regulation mechanisms: opportunities and drawbacks for applications in synthetic biology. FEMS Microbiol. Rev. 43, 304–339 (2019).
González, C. et al. Stress‐response balance drives the evolution of a network module and its host genome. Mol. Syst. Biol. 11, 827 (2015).
Gouda, M. K., Manhart, M. & Balázsi, G. Evolutionary regain of lost gene circuit function. Proc. Natl Acad. Sci. 116, 25162–25171 (2019).
Yang, H., Hoffmann, M., Allard, M. W., Brown, E. W. & Chen, Y. Microevolution and gain or loss of mobile genetic elements of outbreak-related Listeria monocytogenes in food processing environments identified by whole genome sequencing analysis. Front. Microbiol. 11, 866 (2020).
Orlek, A. et al. A curated dataset of complete Enterobacteriaceae plasmids compiled from the NCBI nucleotide database. Data Brief. 12, 423–426 (2017).
Zankari, E. et al. Identification of acquired antimicrobial resistance genes. J. Antimicrob. Chemother. 67, 2640–2644 (2012).
Hyatt, D. et al. Prodigal: prokaryotic gene recognition and translation initiation site identification. BMC Bioinf. 11, 119 (2010).
Seemann, T. Prokka: rapid prokaryotic genome annotation. Bioinformatics 30, 2068–2069 (2014).
Wu, F. et al. Modulation of microbial community dynamics by spatial partitioning. Nat. Chem. Biol. 18, 394–402 (2022).
Warren, D. J. Preparation of highly efficient electrocompetent Escherichia coli using glycerol/mannitol density step centrifugation. Anal. Biochem. 413, 206–207 (2011).
Chung, C. T. & Miller, R. H. [43] Preparation and storage of competent Escherichia coli cells. Methods Enzymol. 218, 621–627 (1993).
Wingett, S. W. & Andrews, S. FastQ Screen: A tool for multi-genome mapping and quality control. F1000Res. 7, 1338 (2018).
Magoč, T. & Salzberg, S. L. FLASH: fast length adjustment of short reads to improve genome assemblies. Bioinformatics 27, 2957–2963 (2011).
Acknowledgements
We thank C. Tan, H. Qian and T. Hwa for thorough reading and comments on an earlier draft of the manuscript. This work is partially supported by the National Institutes of Health (grant Nos. R01AI125604 and R01EB031869 to L.Y.) and the National Science Foundation (grant No. MCB-1937259 to L.Y.). The funders had no role in study design, data collection and analysis, decision to publish or preparation of the manuscript.
Author information
Authors and Affiliations
Contributions
T.W. and A.W. conceived the research, designed and performed modeling and experiments, interpreted the results and wrote the manuscript. A.A. assisted with the construction of the barcoded Keio communities. F.W. assisted with the development of the model. A.J.L. and L.A.D. assisted with data interpretation and manuscript revisions. L.Y. conceived the research, assisted in research design and data interpretation and wrote the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Chemical Biology thanks Gábor Balázsi, Kevin Wood and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Extended data
Extended Data Fig. 1 Dynamic redundancy by HGT promoted the gene abundance stability of two-strain communities transferring a single plasmid.
a. The conjugation efficiency of R388 between MG1655 and Top10. Data are presented as mean values +/− standard deviations of three replicates. b. The growth curves of MG1655 and Top10 under different Strp concentrations. Data are presented as mean values +/− standard deviations of three replicates. c. The maximum growth rates of MG1655 and Top10 under different Strp concentrations. Data are presented as mean values +/− standard deviations of three replicates. d. The fitness burden of R388 in MG1655 or Top10. Data are presented as mean values +/− standard deviations of three replicates. e. Linoleic acid (LAC) inhibited the transfer of R388. The conjugations rates were normalized with the mean rate without LAC treatment. Data are presented as mean values +/− standard deviations of three replicates. f. Streptomycin did not impact the inhibition effects of linoleic acid on R388 transfer. The conjugations rates were normalized with the mean rate of the control group (0 mM LAC and 0 μg/mL Strp). Data are presented as mean values +/− standard deviations of three replicates. g. The temporal dynamics of Top10 relative abundances in the five communities during the experiment. Data are presented as mean values +/− standard deviations of three replicates. h. The relationship between community composition and R388 abundance at day 15. Data are presented as mean values of three replicates. i. The gene abundance stability ϕ increases with the plasmid transfer rate in a model of two species transferring a single plasmid. The x-axis is divided into multiple bins with widths of 0.015. Error bars represent mean +/− standard deviation of the ϕ values in each bin (n = 200 independent data points).
Extended Data Fig. 2 HGT promoted the gene stability of three-member communities transferring a single plasmid.
We assembled five communities transferring plasmid R388, each consisting of a P. aeruginosa strain (PA14) and two E. coli strains (MG1655 and Top10). The three members carried different antibiotic resistances (Cm, Tet and Strp, respectively), which allowed us to modulate the community composition by different antibiotic treatments. Specifically, the five communities (A to E) were treated with no antibiotic or with Cm, Tet, Strp or Strp+Tet, respectively. We further changed the plasmid transfer rate using LAC. a. The variations of the community compositions at the end of the experiment (day 15). The colored bars indicate different members, and the heights of the bars represent the relative abundances of the strains within the community. b. The dynamics of R388 abundance during the experiment. The results of three LAC concentrations and two dilution ratios were shown here. Data are presented as mean values +/− standard deviations of three replicates. c. The stability of plasmid abundance increased with the plasmid transfer rate. The results of day 5, 10 and 15 were shown in different line styles, while the two dilution ratios were represented by different marker styles.
Extended Data Fig. 3 A two-species model predicts the plasmid R388 dynamics in monocultures or cocultures of MG1655 and Top10.
Dynamic parameters, including the plasmid transfer rates, strain growth rates under different Strp doses, plasmid burdens and LAC inhibition effects were measured and used to parameterize the model. a. Dynamics of R388 abundances in MG1655 or Top10 cultured separately. For each strain, three LAC doses and two dilution ratios were tested. Experiment data are presented as mean values +/− standard deviations of three replicates. b. Dynamics of R388 abundances and strain compositions in cocultures of MG1655 or Top10. Five communities, treated by different concentrations of Strp, were modeled or experimentally measured. For each community, three LAC doses and two dilution ratios were tested. Experiment data are presented as mean values +/− standard deviations of three replicates. c. The degree of gene abundance stability in the MG1655-Top10 cocultures increased with the plasmid transfer rate. The results of day 5, 10 and 15 were shown in different line styles, while the two dilution ratios were represented by different marker styles.
Extended Data Fig. 4 Numerical simulations demonstrated the stabilization of gene abundance mediated by HGT in complex communities.
a. A schematic of random sampling from a pool of interacting species to multiple local communities. The filled circles of different colors represent different species. The sizes of the circles describe the species abundances. The black arrows stand for positive interspecies interactions while the red arrows represent negative interactions. b. The stability of plasmid abundance against species fluctuations is promoted by HGT. Each column represents a single community. The colored bars stand for different species (first panel) or plasmids carrying functional genes (second to fourth panel), and the heights of the bars represent the relative abundances of species or plasmids within the community. The 40 communities differ from each other in their species compositions, due to random sampling. With slow plasmid transfer, the plasmid abundances vary drastically across different communities, while with rapid transfer, the functional profile is stable against compositional changes. Three different HGT rates (0.002, 0.005 and 0.01, from left to right) are shown as examples here. c. The gene stability ϕ increases with the plasmid transfer rate. Here, 200 species pools are created, and each consists of 100 species transferring 20 plasmids. For each species pool, we randomize the parameters in the ranges of −0.05 < γ < 0.05, 0 < δ <0.2, 0.2 < μ < 0.6, 0 < κ < 0.05, −0.05 < λ < 0.05, and 0 < η < 0.1. 40 local communities were created for every species pool by random sampling. On average, each local population contained 50 species. Then we simulated the community dynamics until it reached a steady state and calculated the ϕ values of the plasmids as a function of their mean transfer rates. The x-axis is divided into multiple bins with widths of 0.005. Error bars represent mean +/− standard deviation of the ϕ values in each bin (n = 400 independent data points).
Extended Data Fig. 5 The stability of plasmid abundance increases with the plasmid transfer rate even before the system has reached equilibrium.
Here, 200 species pools were assembled in silico, and each was composed of 100 species transferring 20 plasmids. For each master community, we randomized the parameters in the ranges of −0.05 < γ < 0.05, 0 < δ <0.2, 0.2 < μ < 0.6, 0 < κ < 0.05, −0.05< λ < 0.05, and 0 < η < 0.1. 40 local communities were created for every master community by random sampling. On average, each local population contained 50 species. The ϕ values of the plasmids in the local communities were calculated by numerical simulations. The relationships between the stability ϕ and mean plasmid transfer rate at 4 different timepoints (t = 70, 100, 200 and 500 hours) were shown. Error bars represent mean +/− standard deviation of the ϕ values in each bin (n = 400 independent data points).
Extended Data Fig. 6 Construction of barcoded Keio strains and sequencing quantification.
a. The backbone of barcoded plasmids. Structure of plasmid vector includes the origin of replication (p15A), a selection marker (chloramphenicol), a fluorescence marker (mCherry) and the unique barcode sequence. b. Sequence of the synthesized DNA fragments. Sequence of the synthetic barcode when assembled into vector backbone includes the 15–20 base-pair overlap with the plasmid vector used for Gibson Assembly (orange), Illumina® adapter sequences (green) and two 18 base-pair barcode sequences (purple). c. Design of calibration experiments. Samples prepared at known concentrations were generated and underwent NGS library preparation, sequencing and data analysis pipelines. Images represent the layout of samples where each well contained a single barcoded strain. Strains were mixed together based on the indicated layout by column where darker shading indicates higher densities. Samples were prepared using a 2-fold dilution in each group. d. Overall calibration results. Normalized relative abundance of sequencing counts obtained for each barcode plotted versus the expected sample ratio shows a good correlation between expected and actual barcode abundances. Each data point represents a single barcoded Keio strain. e. Correction of NGS plasmid barcode reads. Results of correcting calibration samples using different data correction approaches. The measured relative abundance of NGS read counts for each plasmid barcode was plotted against the expected relative abundance of samples with no data correction (left), empirical correction (middle graph) by normalizing reads with equal ratio NGS sample, and numerical correction (right graph) using plasmid-specific correction coefficient, respectively. R-squared values suggest an improved correlation between expected and actual relative abundance when applying numerical data correction.
Extended Data Fig. 7 HGT stabilized gene abundances against compositional variations in complex communities.
a. Different Keio strains transferred plasmid p13 with different conjugation rates ((cells/ml)-1hr-1). Here, Top10 carrying p13 served as the donor and 72 Keio strains served as recipients. Data are presented as mean values +/− standard deviations of three replicates. b. The temporal dynamics of strain compositions of Keio communities transferring plasmid p13 during the experiment. The results of three linoleic acid (LAC) concentrations and two dilution ratios were shown. In each panel, the colored bars stand for different Keio strains, and the heights of the bars represent their relative abundances within the community. c. The 13 plasmids were transferred within the synthetic communities with different conjugation efficiencies. Here, Top10 strain carrying the each of the 13 plasmids served as the donors, and Keio strain 1 served as the recipient. Data are presented as mean values +/− standard deviations of three replicates.
Extended Data Fig. 8 The functional stability ϕ increases with the plasmid transfer rate even when different species express the genes at different levels.
xij (0 ≤ xij ≤ 1) describes the relative expression level of each copy of the j-th plasmid in the i-th species. The numerical simulations were performed following the same protocols as described in Extended Data Fig. 4c and Methods of the main text. Four different ranges of xij were considered, corresponding to different magnitudes of heterogeneity of gene expression levels. The x-axis is divided into multiple bins with widths of 0.005. Error bars represent mean +/− standard deviation of the ϕ values in each bin (n = 400 independent data points).
Supplementary information
Supplementary Information (download PDF )
Supplementary Tables 1–7 and Notes.
Source data
Source Data Fig. 3 (download XLSX )
R388 abundances in two-strain communities.
Source Data Fig. 4 (download XLSX )
Population dynamics of Keio communities transferring a single plasmid.
Source Data Fig. 5 (download XLSX )
Population dynamics of Keio communities transferring 13 plasmids.
Source Data Extended Data Fig. 1 (download XLSX )
Kinetic parameters of two-strain communities.
Source Data Extended Data Fig. 2 (download XLSX )
Population dynamics of three-member communities transferring a single plasmid.
Source Data Extended Data Fig. 3 (download XLSX )
Plasmid dynamics in monocultures of MG1655 and Top10.
Source Data Extended Data Fig. 6 (download XLSX )
Calibration of sequencing results.
Source Data Extended Data Fig. 7 (download XLSX )
Plasmid transfer rates and composition dynamics of Keio communities transferring 13 plasmids.
Rights and permissions
Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Wang, T., Weiss, A., Aqeel, A. et al. Horizontal gene transfer enables programmable gene stability in synthetic microbiota. Nat Chem Biol 18, 1245–1252 (2022). https://doi.org/10.1038/s41589-022-01114-3
Received:
Accepted:
Published:
Version of record:
Issue date:
DOI: https://doi.org/10.1038/s41589-022-01114-3
This article is cited by
-
Information storage across a microbial community using universal RNA barcoding
Nature Biotechnology (2026)
-
Antibiotic-mediated microbial community restructuring is dictated by variability in antibiotic-induced lysis rates and population interactions
Nature Communications (2025)
-
Rhizosphere-triggered viral lysogeny mediates microbial metabolic reprogramming to enhance arsenic oxidation
Nature Communications (2025)
-
A bayesian approach for parameterizing and predicting plasmid conjugation dynamics
Scientific Reports (2025)
-
Population-level amplification of gene regulation by programmable gene transfer
Nature Chemical Biology (2025)


