Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

  • Article
  • Published:

Resource competition predicts assembly of gut bacterial communities in vitro


Microbial community dynamics arise through interspecies interactions, including resource competition, cross-feeding and pH modulation. The individual contributions of these mechanisms to community structure are challenging to untangle. Here we develop a framework to estimate multispecies niche overlaps by combining metabolomics data of individual species, growth measurements in spent media and mathematical models. We applied our framework to an in vitro model system comprising 15 human gut commensals in complex media and showed that a simple model of resource competition accounted for most pairwise interactions. Next, we built a coarse-grained consumer-resource model by grouping metabolomic features depleted by the same set of species and showed that this model predicted the composition of 2-member to 15-member communities with reasonable accuracy. Furthermore, we found that incorporation of cross-feeding and pH-mediated interactions improved model predictions of species coexistence. Our theoretical model and experimental framework can be applied to characterize interspecies interactions in bacterial communities in vitro.

This is a preview of subscription content, access via your institution

Access options

Buy this article

Prices may be subject to local taxes which are calculated during checkout

Fig. 1: Coarse-grained resource competition can describe most pairwise interactions in an in vitro model system of 15 human gut commensals.
Fig. 2: Metabolomic profiles can approximately predict yield in monoculture, co-culture and spent media.
Fig. 3: A consumer-resource model based on monoculture metabolomics and growth in spent media predicts community assembly.
Fig. 4: Strategies for incorporating pH and metabolic cross-feeding interactions into the consumer-resource model.

Similar content being viewed by others

Data availability

All data are available at the Zenodo repository ( Metabolomics data are available in the NIH Metabolomics Workbench under ST002832, ST002833 and ST002834. Sequencing data are available under ENA study PRJEB72096. Source data are provided with this paper.

Code availability

All code are available at the Zenodo repository (


  1. Cho, I. & Blaser, M. J. The human microbiome: at the interface of health and disease. Nat. Rev. Genet. 13, 260–270 (2012).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  2. Singh, B. K., Trivedi, P., Egidi, E., Macdonald, C. A. & Delgado-Baquerizo, M. Crop microbiome and sustainable agriculture. Nat. Rev. Microbiol. 18, 601–602 (2020).

    Article  CAS  PubMed  Google Scholar 

  3. Widder, S. et al. Challenges in microbial ecology: building predictive understanding of community function and dynamics. ISME J. 10, 2557–2568 (2016).

    Article  PubMed  PubMed Central  Google Scholar 

  4. Niehaus, L. et al. Microbial coexistence through chemical-mediated interactions. Nat. Commun. 10, 2052 (2019).

    Article  PubMed  PubMed Central  Google Scholar 

  5. Hammarlund, S. P., Gedeon, T., Carlson, R. P. & Harcombe, W. R. Limitation by a shared mutualist promotes coexistence of multiple competing partners. Nat. Commun. 12, 619 (2021).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  6. Dal Bello, M., Lee, H., Goyal, A. & Gore, J. Resource–diversity relationships in bacterial communities reflect the network structure of microbial metabolism. Nat. Ecol. Evol. 5, 1424–1434 (2021).

    Article  PubMed  Google Scholar 

  7. Adamowicz, E. M., Flynn, J., Hunter, R. C. & Harcombe, W. R. Cross-feeding modulates antibiotic tolerance in bacterial communities. ISME J. 12, 2723–2735 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  8. Amarnath, K. et al. Stress-induced metabolic exchanges between complementary bacterial types underly a dynamic mechanism of inter-species stress resistance. Nat. Commun. 14, 3165 (2023).

  9. Ratzke, C. & Gore, J. Modifying and reacting to the environmental pH can drive bacterial interactions. PLoS Biol. 16, e2004248 (2018).

    Article  PubMed  PubMed Central  Google Scholar 

  10. Aranda-Díaz, A. et al. Bacterial interspecies interactions modulate pH-mediated antibiotic tolerance. Elife 9, e51493 (2020).

    Article  PubMed  PubMed Central  Google Scholar 

  11. Wexler, A. G. et al. Human symbionts inject and neutralize antibacterial toxins to persist in the gut. Proc. Natl Acad. Sci. USA 113, 3639–3644 (2016).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  12. Verster, A. J. et al. The landscape of Type VI secretion across human gut microbiomes reveals its role in community composition. Cell Host Microbe 22, 411–419.e4 (2017).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  13. Faust, K. & Raes, J. Microbial interactions: from networks to models. Nat. Rev. Microbiol. 10, 538–550 (2012).

    Article  CAS  PubMed  Google Scholar 

  14. Venturelli, O. S. et al. Deciphering microbial interactions in synthetic human gut microbiome communities. Mol. Syst. Biol. 14, e8157 (2018).

    Article  PubMed  PubMed Central  Google Scholar 

  15. Hu, J., Amor, D. R., Barbier, M., Bunin, G. & Gore, J. Emergent phases of ecological diversity and dynamics mapped in microcosms. Science 378, 85–89 (2022).

    Article  CAS  PubMed  Google Scholar 

  16. Fisher, C. K. & Mehta, P. Identifying keystone species in the human gut microbiome from metagenomic timeseries using sparse linear regression. PLoS ONE 9, e102451 (2014).

    Article  PubMed  PubMed Central  Google Scholar 

  17. Momeni, B., Xie, L. & Shou, W. Lotka-Volterra pairwise modeling fails to capture diverse pairwise microbial interactions. Elife 6, e25051 (2017).

    Article  PubMed  PubMed Central  Google Scholar 

  18. Martiny, J. B. H., Jones, S. E., Lennon, J. T. & Martiny, A. C. Microbiomes in light of traits: a phylogenetic perspective. Science 350, aac9323 (2015).

    Article  PubMed  Google Scholar 

  19. Chesson, P. MacArthur’s consumer-resource model. Theor. Popul. Biol. 37, 26–38 (1990).

    Article  Google Scholar 

  20. Hart, S. F. M. et al. Uncovering and resolving challenges of quantitative modeling in a simplified community of interacting cells. PLoS Biol. 17, e3000135 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  21. Patnode, M. L. et al. Interspecies competition impacts targeted manipulation of human gut bacteria by fiber-derived glycans. Cell 179, 59–73.e13 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  22. Gowda, K., Ping, D., Mani, M. & Kuehn, S. Genomic structure predicts metabolite dynamics in microbial communities. Cell 185, 530–546.e25 (2022).

    Article  CAS  PubMed  Google Scholar 

  23. Biggs, M. B. et al. Systems-level metabolism of the altered Schaedler flora, a complete gut microbiota. ISME J. 11, 426–438 (2017).

    Article  CAS  PubMed  Google Scholar 

  24. Medlock, G. L. et al. Inferring metabolic mechanisms of interaction within a defined gut microbiota. Cell Syst. 7, 245–257.e7 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  25. Weiss, A. S. et al. In vitro interaction network of a synthetic gut bacterial community. ISME J. 16, 1095–1109 (2021).

  26. Ng, K. M. et al. Recovery of the gut microbiota after antibiotics depends on host diet, community context, and environmental reservoirs. Cell Host Microbe 26, 650–665 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  27. Aranda-Díaz, A. et al. Establishment and characterization of stable, diverse, fecal-derived in vitro microbial communities that model the intestinal microbiota. Cell Host Microbe 30, 260–272.e25 (2022).

  28. Aranda-Diaz, A. et al. Assembly of gut-derived bacterial communities follows ‘early-bird’ resource utilization dynamics. Preprint at bioRxiv (2023).

  29. Foster, K. R. & Bell, T. Competition, not cooperation, dominates interactions among culturable microbial species. Curr. Biol. 22, 1845–1850 (2012).

    Article  CAS  PubMed  Google Scholar 

  30. Erez, A., Lopez, J. G., Weiner, B. G., Meir, Y. & Wingreen, N. S. Nutrient levels and trade-offs control diversity in a serial dilution ecosystem. Elife 9, e57790 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  31. Ho, P.-Y., Good, B. H. & Huang, K. C. Competition for fluctuating resources reproduces statistics of species abundance over time across wide-ranging microbiotas. ELife 11, e75168 (2022).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  32. Showalter, M. R. et al. Obesogenic diets alter metabolism in mice. PLoS ONE 13, e0190632 (2018).

    Article  PubMed  PubMed Central  Google Scholar 

  33. Han, S. et al. A metabolomics pipeline for the mechanistic interrogation of the gut microbiome. Nature 595, 415–420 (2021).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  34. Alseekh, S. et al. Mass spectrometry-based metabolomics: a guide for annotation, quantification and best reporting practices. Nat. Methods 18, 747–756 (2021).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  35. Xiao, Y. et al. Mapping the ecological networks of microbial communities. Nat. Commun. 8, 2042 (2017).

    Article  PubMed  PubMed Central  Google Scholar 

  36. Cui, W., Marsland, R. & Mehta, P. Diverse communities behave like typical random ecosystems. Phys. Rev. E 104, 034416 (2021).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  37. Gloor, G. B., Macklaim, J. M., Pawlowsky-Glahn, V. & Egozcue, J. J. Microbiome datasets are compositional: and this is not optional. Front. Microbiol. 8, 2224 (2017).

  38. Halpern, D. & Gruss, A. A sensitive bacterial-growth-based test reveals how intestinal Bacteroides meet their porphyrin requirement. BMC Microbiol. 15, 282 (2015).

    Article  PubMed  PubMed Central  Google Scholar 

  39. Bloxham, B., Lee, H. & Gore, J. Diauxic lags explain unexpected coexistence in multi-resource environments. Mol. Syst. Biol. 18, e10630 (2022).

    Article  PubMed  PubMed Central  Google Scholar 

  40. Bai, Y. et al. Functional overlap of the Arabidopsis leaf and root microbiota. Nature 528, 364–369 (2015).

    Article  CAS  PubMed  Google Scholar 

  41. Cheng, A. G. et al. Design, construction, and in vivo augmentation of a complex gut microbiome. Cell 185, 3617–3636.e19 (2022).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  42. Hryckowian, A. J. et al. Microbiota-accessible carbohydrates suppress Clostridium difficile infection in a murine model. Nat. Microbiol. 3, 662–669 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  43. Jacobson, A. et al. A gut commensal-produced metabolite mediates colonization resistance to salmonella infection. Cell Host Microbe 24, 296–307.e7 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  44. Tsugawa, H. et al. MS-DIAL: data-independent MS/MS deconvolution for comprehensive metabolome analysis. Nat. Methods 12, 523–526 (2015).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  45. Tsugawa, H. et al. A lipidome atlas in MS-DIAL 4. Nat. Biotechnol. 38, 1159–1163 (2020).

    Article  CAS  PubMed  Google Scholar 

  46. Celis, A. I. et al. Optimization of the 16S rRNA sequencing analysis pipeline for studying in vitro communities of gut commensals. iScience 25, 103907 (2022).

  47. Atolia, E. et al. Environmental and physiological factors affecting high-throughput measurements of bacterial growth. mBio 11, e01378-20 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

Download references


We thank members of the Huang lab for helpful discussions; J. Cremer, B. Good, K. Gowda, M. Tikhonov, N. Wingreen and K. Xue for critical reading of the manuscript; and Biohub team member W. Sandhu for metabolite extraction and LC–MS/MS data acquisition. This work was funded by a Stanford School of Medicine Dean’s Postdoctoral Fellowship (to P.-Y.H.), an NIH Postdoctoral Fellowship F32 GM143859 (to P.-Y.H.), an NSF Graduate Research Fellowship (to T.H.N.), NSF Awards EF-2125383 and IOS-2032985 (to K.C.H.), and NIH Awards R01 AI147023 and RM1 GM135102 (to K.C.H.). K.C.H. is a Chan Zuckerberg Biohub Investigator.

Author information

Authors and Affiliations



P.-Y.H. and K.C.H. conceptualized the project. P.-Y.H., T.H.N., B.C.D. and K.C.H. developed the methodology. P.-Y.H., T.H.N., J.M.S. and B.C.D. conducted the investigations. P.-Y.H., T.H.N. and K.C.H. performed visualization. P.-Y.H., T.H.N. and K.C.H. acquired funding. P.-Y.H., B.C.D. and K.C.H. supervised the project. P.-Y.H., T.H.N. and K.C.H. wrote the original draft. P.-Y.H., T.H.N., B.C.D. and K.C.H. reviewed and edited the manuscript.

Corresponding authors

Correspondence to Po-Yi Ho or Kerwyn Casey Huang.

Ethics declarations

Competing interests

The authors declare no competing interests.

Peer review

Peer review information

Nature Microbiology thanks Gerrit Ansmann, Tobias Bollenbach, Kyle Crocker, Uwe Sauer 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 The 15 species studied here represent a tractable model system for humanized mice gut microbiota.

(a) The 15 isolates were obtained from the same parent community, which was derived by culturing a humanized mice fecal sample. Pie chart shows relative abundance of isolated (colored) and non-isolated (gray) species. The 15 isolates accounted for 69% of the composition of the parent community. (b) The composition of the 15-species assembly was highly correlated with the composition of the parent community (ρ = 0.80).

Source data

Extended Data Fig. 2 Model assumptions.

(a) The 15 species converted resources to biomass with similar efficiencies. The efficiency of species i for the conversion of the resource shared with species j was defined as \(\left({\bar{X}}_{i}-{\bar{X}}_{i,\,j}\right)/\left({\bar{X}}_{j}-{\bar{X}}_{j,i}\right)\). If the efficiency equals one, then Eq. 1 is satisfied. The distribution of log2(efficiency) across unique ordered pairs was centered about zero with a narrow width, except for a few outliers for which differences between yields in monoculture and spent medium were small compared to measurement error. (b) The number of annotated features that were depleted was correlated with biomass yield in monocultures and pairwise spent-media experiments, analogous to Fig. 2c. The correlation is not as strong as when unannotated features were also included, suggesting that unannotated features are informative for species growth. (c) Monoculture growth curves (orange) were well fit by Eq. 2 for one species and one resource (black; Methods).

Source data

Extended Data Fig. 3 Assembly compositions were independent of initial values.

(a) Relative abundances at steady state in refill experiments. Each column represents one experiment, in which a dropout assembly with 14 of the 15 species was mixed with a monoculture of the dropped-out species at various ratios (1:10, 1:100, 1:1,000, 1:10,000, and 1:100,000). All 15 species × 5 ratios were tested, and all are shown except for 3 experiments with idiosyncratic sequencing errors. The compositions were virtually indistinguishable from each other and from the full 15 member community, which is shown in the last column. (b) Histogram of the correlation coefficient (top) and mean absolute error in log2(fold-change) (bottom) between the relative abundances in each refill experiment and the full 15-species community.

Source data

Extended Data Fig. 4 Metabolomics-derived coarse-grained resource groups.

(a) The structure of metabolomics-derived coarse-grained resource groups. A metabolomic feature was considered depleted if it decreased by >100-fold compared to fresh medium, and features that shared the same set of depleting species were grouped together into a coarse-grained resource group, shown as one column in the matrix. The number of features in each resource group is shown in the bar plot above each column. Only groups with more than one constituent feature are shown. (b) The cumulative fraction of the number of metabolomic features as a function of the number of coarse-grained resource groups included, starting with the leftmost column in (a).

Source data

Extended Data Fig. 5 Regression input, regression optimization, and prediction errors.

(a) Yield and growth rate in monocultures (left) and yield in pairwise spent media (right) were used to refine metabolomics-based resource utilization structures (Methods). Shown are mean values and standard error of the mean (n = 4 biological replicates). (b) Determination of resource utilization structure by minimization of the AIC (Methods). Minimization was carried out over the top M coarse-grained resource groups with the most constituent features. The AIC-minimizing set of resource groups is shown in Fig. 3a. (c) Prediction error for each assembly for the coarse-grained consumer-resource model shown in Fig. 3a. Shown are all 185 assemblies tested. Errors were calculated using mean relative abundances across replicates. Each column represents one assembly, and the matrix denotes the species that were initially present in each assembly. A histogram of prediction errors and the mean error (solid line) are also shown. (d) The number of assemblies, out of the 64 assemblies containing 3 to 13 species, that contained at least one species from a given family is >30 for every family, indicating that the random combinations tested were taxonomically diverse. (e) Error for each assembly was only weakly correlated with the initial richness (left) or the Shannon index (right) of the community, suggesting that model performance was not dependent on community diversity (two-sided t-test). (f) Error for each species across all assemblies. The number of assemblies n containing each species is shown. Box plot denotes the median (central mark), 25th and 75th percentiles (box), and extremes (dashed lines).

Source data

Extended Data Fig. 6 Other approaches to predict assembly composition performed worse than the coarse-grained consumer-resource model based on metabolomics and pairwise spent-media experiments.

(a) Hypothetical resource utilization structures. The ‘base’ structure was defined as the set of species-specific resource groups. On top of the base structure, pairwise niche overlaps consumed by only two species and all-but-one niche overlaps consumed by 14 of the 15 species were also tested. (b) Performance of utilization structures selected by regularized regression on all detected resource groups (Methods). Shown are mean errors and coefficients of determination for LASSO fits. Shading denotes standard error of the mean. (c) Prediction errors of the full model as in Fig. 3a (left) versus model predictions after randomly shuffling species identity (right). Shown are box plots denoting the mean error (thick central mark), the 25th and 75th percentiles (box), and the extremes (dashed lines) across all assemblies tested (n = 185 assemblies). (d) The consumer-resource model achieved comparable performance as a Lotka-Volterra model fitted to all assembly data. Shown are box plots as in (c) across pairwise co-cultures (n = 105), assemblies with more than two species (n = 80), and all assemblies (n = 185 assemblies). Colors denote different models: the consumer-resource model (orange); and Lotka-Volterra models parametrized using pairwise spent-media experiments (black), species abundances in pairwise co-cultures (dark gray), or species abundances in all assemblies (light gray). (e) Lotka-Volterra models parametrized using assembly data failed to predict yield in pairwise spent-media experiments. (f) The coarse-grained consumer-resource model was the best performing model for both the mean absolute error of log2(fold-change) (Fig. 3b) and the commonly used Bray-Curtis dissimilarity metric, defined as \(1-{\sum }_{i=1}^{N}\min \left({x\,}_{i}^{\text{actual}},{x\,}_{i}^{\text{predicted}}\right)\). Shown are box plots as in (c) across all assemblies tested (n = 185 assemblies) for the same models as in Fig. 3b. (g) The model successfully predicted absolute abundances, obtained by multiplying relative abundances by culture yield in OD. Panels are representative assemblies, analogous to Fig. 3c.

Source data

Extended Data Fig. 7 Biological basis and robustness of the metabolomics-based resource competition landscape.

(a) Regressed resource levels were correlated with feature counts across coarse-grained resources. Two outliers (empty symbols) contained features identified as the simple sugars glucose and trehalose. Without these two outliers, correlations were high (ρ = 0.77), indicating that the regression refined metabolomics-based estimations. (b) Annotated metabolomic features suggest that diverse peptide utilization capabilities shape the resource competition landscape. Examples of annotated metabolomic features within each coarse-grained resource group for the consumer-resource model shown in Fig. 3a. Resource groups with empty fields did not have any annotated features. (c) Coarse-graining is robust to uncertainty in peak calling and quantitation. ‘Niche differences’ denote the number of groups within the top 50 resource groups with the most constituent features that are different from the set used in the original analysis (Extended Data Fig. 4). Uncertainty in peak calling was simulated by discarding a random fraction of features. Up to half of the features could be discarded without affecting the identity of the resource groups with the most constituent features. Solid line and shading denote mean and standard deviation, respectively, of niche differences across random instances of feature removal. (d) Uncertainty in quantitation was simulated by varying the threshold fold-change for classifying depletion. The depletion threshold could be varied over an order of magnitude without changing more than 5 of the 50 largest groups.

Source data

Extended Data Fig. 8 The consumer-resource model captured metabolite depletion dynamics at a coarse-grained level.

(a) Experiment schematic. The full 15-species community was assembled and passaged to reach ecological steady state. Replicate cultures were inoculated from the steady-state culture, and 3 replicates were collected at 24 time points throughout the next growth cycle. Sequencing and metabolomics data were obtained for all samples (Methods). (b) The consumer-resource model predicted assembly compositions. The parametrization based on pH-neutralized Bp-spent medium experiments was used (Fig. 4). One species (C. hylemonae) was incorrectly predicted to be undetectable, which could be remedied by using metabolite depletion rates to improve the model as in (c). (c) The consumer-resource model captured the depletion time of coarse-grained resources, defined as when the log10(fold-change) first decreases below -1. Without any modification, the model achieved a reasonable performance (ρ = 0.55, left). Several outliers were species-specific resource groups (empty symbols). The model was improved by adjusting the consumption rates of these outlier groups to match their depletion times (ρ = 0.71, right), which simultaneously improved predictions for species abundances as in (b). The remaining outliers are highlighted in yellow. (d) Resource dynamics were captured at a coarse-grained level. Each panel shows the dynamics of a coarse-grained resource. The matrix shows the set of coarse-grained resources included in the model. (Parametrization using pH-neutralized Bp-spent medium experiments led to the incorporation of 2 additional resource groups with non-zero \({Y}_{\mu }^{\,0}\) compared to the parametrization shown in Fig. 3a.) Solid lines show the mean log10(fold-change) across all metabolomic features in a group. Shading shows the standard deviation. Dotted lines show the predictions of the improved model. Outlier groups in (c) are highlighted. (e) The model also captured species abundances over time in the full community.

Source data

Extended Data Fig. 9 The model can be extended to incorporate pH, cross-feeding, and lag times.

(a) The full community and most species, except for Blautia producta and a few other species, did not modify the pH. pH was obtained during growth measurements using BCECF for each species in monoculture and the full 15-species community (Methods). Shading denotes standard error of the mean. (b) Growth curves for Bt grown in fresh medium (solid line), in Efe-spent medium (dotted line), and in fresh BHI plus hemin (dash dotted line). Shown is the mean over replicates. Shading denotes standard error of the mean. (c) Interactions persisted in a community context, and strong interactions in dropout assemblies were rare. Relative abundances in dropout assemblies are shown in terms of z-scores. Each column represents a dropout assembly of 14 of the 15 species, with the denoted species left out of the community. Each row represents the z-scores of the denoted species, defined as \({z}_{{ij}}:= \left({x}_{{ij}}-{\mu }_{i}\right)/{\sigma }_{i}\), where xij is the log10(relative abundance) of species i in the dropout assembly in which species j was left out, and μi and σi are the mean and standard deviation, respectively, of the log10(relative abundance) of species i across all dropout assemblies. Asterisks denote z-scores with absolute value > 3. (d) Same as (b) but for Pd. (e) Lag times in monoculture and in the full 15-species community were correlated. For the full community, absolute abundances over time were obtained by multiplying relative abundances by culture OD over the time course of the full community. Lag times were extracted by fitting as for monocultures. (f) The difference between the lag time of a species grown in the spent medium of another species and grown in fresh medium was typically positive.

Source data

Extended Data Fig. 10 Modeling framework was able to predict assembly compositions and interrogate interactions in the complex medium mGAM.

(a) Monoculture yields in mGAM differed from those in BHI, particularly for the Bacteroidetes, which exhibited substantially larger yields in mGAM. Shown are mean values across replicates. (b) The distribution of resource competition residues in mGAM was centered about zero, as in BHI (Fig. 1d). (c) Pairwise overlaps in metabolomic profiles in mGAM and BHI were correlated (ρ = 0.66). The pairwise overlap between the ordered species pair (i, j) was defined as the number of metabolomic features depleted by both species divided by the number depleted by species i. Shown are all 210 ordered pairs, colored according to species i. (d) Yield in monoculture (left) and pairwise spent-media experiments (right) was correlated with feature counts for experiments not involving the four Bacteroidetes (ρ = 0.54). Pairwise spent-media experiments involving the four Bacteroidetes are not shown. (e) Incorporation of additional interactions significantly and specifically improved model performance in mGAM. Shown are box plots denoting the mean error (thick central mark), the 25th and 75th percentiles (box), and the extremes (dashed lines) across all assemblies tested for model predictions in BHI (orange; n = 185 assemblies) and mGAM (blue; n = 158 assemblies), parametrized using metabolomics and spent-media experiments in the corresponding media, as well as mean errors for the consumer-resource model in mGAM modified to incorporate Bt/Bu-Clostridia interactions (dark blue) or with ubiquitous Clostridia inhibition (light blue). (f) The 5 Clostridia species exhibited no detectable growth in Bt- or Bu-spent media. Each panel shows the growth curve of a species in monoculture (solid line) and in pairwise spent media (dotted lines). The color of the solid line denotes the species grown in each panel. The color of the dotted lines denotes the species that generated the spent media. Gray dotted lines show growth curves in all other spent media.

Source data

Supplementary information

Source data

Source Data Figs. 1–4 and Extended Data Figs. 1–10

Statistical source data for Figs. 1–4 and Extended Data Figs. 1–10.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) 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.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ho, PY., Nguyen, T.H., Sanchez, J.M. et al. Resource competition predicts assembly of gut bacterial communities in vitro. Nat Microbiol 9, 1036–1048 (2024).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing