Main

The human gut microbiota encodes diverse metabolic pathways. Gut microorganisms, which express numerous anaerobic pathways that process diverse diet- and host-derived molecules, produce numerous previously undescribed compounds with relevance for human health and that have untapped therapeutic potential. Many of these microbial products in the gut subsequently enter the tissue and circulation of the host, where additional metabolic steps can add to the chemical diversity1,2,3. Several recent studies have shown that microbiota-dependent metabolites (MDMs) influence immune function4, metabolism5,6, cardiovascular health7, and cognition and behaviour8. In many cases, MDMs exert these effects on host biology by binding to specific host receptors9 and activating downstream signalling pathways10. Discovery of how individual prevalent human gut microorganisms mechanistically contribute to host phenotypes has been hampered by the difficulty in accurately monitoring the diversity of molecules produced by gut microorganisms. To address this gap, recent studies have leveraged improvements in high-resolution mass spectrometry11 as well as growing mass-spectrometry and compound databases12 (for example, Mass Bank of North America (MoNA), Metabolite Link (METLIN13), Human Metabolome Database (HMDB14), and Kyoto Encyclopedia of Genes and Genomes (KEGG15). Nevertheless, because of fundamental differences between anaerobic metabolism in the gut versus aerobic biochemistry, as well as the underrepresentation of anaerobic microbial products in existing databases, the full metabolic capability of the microbiota remains understudied. Here we present a microbiome-focused, integrated mass-spectrometry pipeline to facilitate the identification of MDMs in diverse sample types, and to associate these metabolites with microbial strains and genetic pathways.

Microbiome-focused metabolomics

To enable the interrogation of microbiome metabolism, we (1) constructed a mass-spectrometry-based reference library to detect anaerobic biochemistry and an analytical pipeline to integrate large metabolomics datasets; (2) validated our methods to ensure applicability to the broader scientific community; and (3) enabled interactive, public access to our datasets (https://sonnenburglab.github.io/Metabolomics_Data_Explorer) (Fig. 1, Methods, Extended Data Figs. 13 and Supplementary Tables 14).

Fig. 1: A microbiome-focused metabolomics pipeline enables the mechanistic interrogation of microbiome metabolism.
figure 1

Schematic of our metabolomics workflow, consisting of mass-spectrometry reference library construction and validation, producing in vitro and in vivo metabolomic profiles across diverse sample types. Our entire dataset is publicly accessible through a web-based, interactive Metabolomics Data Explorer (https://sonnenburglab.github.io/Metabolomics_Data_Explorer).

Next, we leveraged this tool to create a reference dataset of metabolomic profiles for individual bacterial strains to enable multiple modes of analysis and discovery. We acquired 178 individual prevalent human gut microorganisms representing 130 species and spanning 6 phyla from ATCC, DSMZ and BEI (Supplementary Tables 5, 6). To create the most comparable dataset of metabolism, we cultured all supported strains (158 out of 178) in mega medium—a rich, undefined medium known to support the growth of diverse bacteria—and collected the culture supernatant between the mid-log and stationary phase (Extended Data Fig. 4a, b and Supplementary Methods). The remaining 20 strains were grown in 9 additional media as described in Supplementary Table 6, and 29 strains were grown and analysed across multiple types of media (Extended Data Fig. 4c and Supplementary Table 7).

To assess large-scale metabolite production and consumption patterns, we hierarchically clustered individual bacterial strains (Extended Data Fig. 4d–f and Supplementary Table 7). In some cases, two closely related species exhibited distinct metabolomic profiles punctuated with metabolite-level similarities (for example, Clostridium sporogenes and Clostridium cadaveris) (Extended Data Fig. 5a, b). In other cases, phylogenetic proximity is accompanied by similarity in metabolic patterns (for example, four strains of Bacteroides fragilis, Pearson r > 0.80 for all pairwise comparisons) (Extended Data Fig. 5a, b). Conversely, hierarchical clustering of species by metabolomic profile distance reveals unexpectedly shared metabolic patterns among phylogenetically distant species (for example by Atopobium parvulum, phylum Actinobacteria, and Catenibacterium mitsuokai, phylum Firmicutes) (Extended Data Fig. 6a–c).

In addition to the large-scale metabolic patterns, we discovered unique high producers or consumers of specific metabolites within our strain collection. For example, Enterococcus faecalis and Enterococcus faecium produce high levels of tyramine (Extended Data Fig. 4e)—a biogenic amine known to modulate host neurological functions16. By contrast, C. cadaveris consumes high levels of pantothenic acid (vitamin B5) (Extended Data Fig. 4f), a molecule that is associated with inflammatory bowel diseases17. This large-scale in vitro screen enables us to identify numerous high-abundance, variably conserved, microbially derived metabolites that can be tracked in vitro and in vivo (Extended Data Fig. 6d).

Metabolonomy distinct from phylogeny

We next addressed large-scale relationships between strain metabolism (metabolonomy) and phylogeny—a complex topic that has been addressed with different approaches in previous studies18,19,20,21. Bacterial metabolism is a product of the genetic metabolic toolkit and the chemical environment of a microorganism. Comparing metabolomic and phylogenetic trees for the same set of 158 strains grown in mega medium revealed a broadly conserved topology with the strains most often clustering by phyla (Fig. 2a, Extended Data Figs. 6a, 7a and Supplementary Methods). However, this similarity is punctuated by considerable divergences in which the relative location of specific strains in the two trees differs substantially (magenta and gold coloured branches in Fig. 2a). Notably, these patterns of clustering are preserved when metabolites are weighted by chemical similarity (Mantel test, r2 = 0.863, P = 0.001) (Extended Data Fig. 7b, c).

Fig. 2: Relationships between phylogeny, taxonomy and metabolome.
figure 2

a, Comparison of tree topology constructed based on phylogenetic (left) and metabolomic profile (fold-change data, right) distance matrices of 158 strains grown in mega medium spanning five phyla. Data are from 1–3 independent experiments, each with n ≥ 3 biological replicates. b, Metabolite accumulation patterns across all 158 strains grown in mega medium, clustered based on phylogenetic distance. Dot size, mean production levels of 1–3 independent experiments, each with n ≥ 3 biological replicates. For each metabolite, the largest dot represents the highest production level for that metabolite. Full names of the bacterial species listed in a: Clostridium saccharolyticum, Clostridium symbiosum, Bifidobacterium adolescentis, Holdemania filiformis, and in b: Escherichia coli, Citrobacter youngae, Enterobacter cancerogenus, Citrobacter portucalensis, Providencia stuartii, Proteus penneri, Collinsella aerofaciens, Slackia exigua, Eggerthella lenta, Bacillus sp., Facklamia sp., Enterococcus faecalis, Enterococcus faecium, Lactobacillus reuteri, Streptococcus parasanguinis, Lactococcus lactis, Fusobacterium nucleatum, Fusobacterium nucleatum subsp. animalis, Fusobacterium ulcerans, Mitsuokella multacida, Veillonella sp., Clostridium sporogenes, Clostridium cadaveris, Clostridium perfringens.

To quantify these differences, we compared the metabolomic distance between strains to their evolutionary distance (Extended Data Fig. 7d and Supplementary Table 7). Using a phylogeny derived from the V4 16S region, the relationship between phylogenetic distance and metabolomic distance is linear (r2 = 0.30, P < 1 × 10−92) below around 0.11 branch-length units, approximating a difference of taxonomic ‘class’ in our data. Above a branch length of 0.11, the 16S distance explains almost none of the variance in the metabolomic distance (r2 = 0.02, P < 1 × 10−9). These patterns are robust to data transformation and evolutionary distance derived from full-length 16S genes (Extended Data Fig. 7e–j). Comparing the metabolic distance of bacteria grouped by taxonomic rank alone (for example, the distance between different strains of the same species) reveals a similar pattern of saturation (Extended Data Fig. 7d and Supplementary Table 7). These data indicate that when two strains are grown in the same complex medium, differences in the detected microbial metabolism are smaller on average than what would be extrapolated linearly from evolutionary or taxonomic relationships, particularly for distantly related bacteria. Notably, the high variance in metabolic distance between microorganisms of any relatedness (taxonomic or phylogenetic) reaffirms the use of metabolite profiles when comparing specific strains.

We next leveraged our strain-resolved metabolomic and genomic data to examine the correlation between bacterial genetic and metabolic variations in the context of a single pathway: polyamine biosynthesis (Fig. 2b and Extended Data Fig. 7k). Gut microbially derived putrescine and its precursor ornithine have both been implicated in influencing aspects of host physiology22,23. Their biosynthetic enzymes have been functionally characterized in select bacterial species (for example, ornithine-producing arc genes24 and putrescine-producing spe genes25).

We discovered two groups of phylogenetically distant strains in two phyla, Firmicutes and Actinobacteria (Fig. 2b, phyla with orange and purple borders, respectively), that accumulate high levels of ornithine and citrulline in the absence of substantial downstream polyamine production. We performed comparative genomics starting with the ornithine-producing arc genes described in Lactococcus lactis and found their conserved presence (Extended Data Fig. 7k) among the ornithine-accumulating strains, such as the Lactobacillales (Fig. 2b, strain names highlighted in orange). Notably, these genes are not detectable in the non-ornithine-accumulating phylogenetic neighbours in both Lactobacillales and Actinobacteria. These examples illustrate that, when metabolic phenotypes depart from phylogeny, orthologous gene–metabolite relationships may be preserved. We next identified strains that accumulate high levels of downstream putrescine and/or agmatine within three phyla: Proteobacteria, Fusobacteria and Firmicutes (Fig. 2b, phyla with green, red and orange borders, respectively). Although several putrescine-accumulating Proteobacteria strains (Fig. 2b, strain names highlighted in green) share the putrescine-producing spe gene cluster described in Escherichia coli (Extended Data Fig. 7k), these genes are not detectable in the Fusobacteria. These data indicate the limited ability of phylogeny- or genome-based prediction of metabolic functions in bacterial strains and highlight the utility of measuring metabolic phenotypes to identify strains and genes that produce specific metabolites that have the potential to affect host biology.

Metabolic phenotype-to-gene discovery

Metabolite production and consumption have long been used as mechanisms to group and identify organisms (for example, indole production). Here, we used our comprehensive metabolomic dataset constructed from strains grown in mega medium along with simple machine learning (random forest) models to identify sets of metabolites that could distinguish different taxonomic groups. Simple random forest models could accurately classify the taxonomic origin of microbial supernatants (Fig. 3a and Supplementary Methods). Although the total metabolome is not clearly predictive of taxonomy (Fig. 2a and Extended Data Fig. 7d), these random forest models revealed subsets of the chemical features that were highly conserved and predictive of taxonomic identity (Extended Data Fig. 8a).

Fig. 3: Discovery of nitrogen-assimilation strategies in Bacteroides and previously undescribed gene–phenotype relationships.
figure 3

a, Classification accuracy of random forest models at each taxonomic level, based on metabolomic profiles of 158 bacterial strains grown in mega medium from 1–3 independent experiments, each with n ≥ 3 biological replicates. Phylum (n = 5), class (n = 11), order (n = 15), family (n = 27), genus (n = 45), species (n = 115) and strain (n = 158). b, Amino acid production or consumption levels by Bacteroidetes strains from 1–3 independent experiments, each with n ≥ 3 biological replicates. Data shown are log2-transformed. Only uniquely detected (non-co-eluting) amino acids are shown. a, b, Boxes, median, 25th and 75th percentiles; whiskers, Tukey’s method. c, Phylogenetic tree of Bacteroidetes strains, growth curve maximum optical density (OD (600 nm)), and percentage of protein sequence identity for E. coli asparagine-consuming, ammonium-liberating enzymes. d, Representative growth curves of wild-type and mutant B. thetaiotaomicron (27573983) in modified Salyer’s minimal medium from one experiment with n = 3 biological replicates. c, d, Nitrogen sources included ammonia (NH4), glutamine (Gln) and asparagine (Asn).

The most discriminating features selected by the random forest models for differentiating phyla included an overrepresentation in amino acid metabolism (Extended Data Fig. 8a). Notably, Bacteroidetes were differentiated by their consumption of most of the glutamine (median consumption, 83%) and asparagine (median consumption, 96%) in the mega medium (Fig. 3b). Previous studies showing that Bacteroides could not use free amino acids as the sole nitrogen source did not test asparagine and glutamine26. On the basis of the data from the 60 Bacteroidetes taxa in the collection, we hypothesized that glutamine and asparagine could serve as the sole nitrogen source. To test this, we grew all 60 Bacteroides and Parabacteroides species in a minimal medium that lacked free ammonium, but contained 10 mM glutamate, glutamine or asparagine. Notably, asparagine or glutamine sufficed as the nitrogen source for 50 out of 60 Bacteroidetes taxa tested (Fig. 3c and Extended Data Fig. 8b, c). To determine the genetic basis of asparagine utilization, we searched the Bacteroidetes genomes for homologues of E. coli enzymes that consume asparagine and release ammonia (Fig. 3c, red rows). For taxa with available genomes, an l-asparaginase II homologue (ansB; >59% identity) strongly correlated (Pearson r = 0.91) with the maximum optical density when grown on asparagine. Using a transposon mutant in the Bacteroides thetaiotaomicron type strain (B. thetaiotaomicron VPI 5482 27573983), we confirmed that this l-asparaginase II homologue was necessary for growth with asparagine as the sole nitrogen source (Fig. 3d). The effect that we observed was not dependent on the presence of cysteine; B. thetaiotaomicron VPI 5482 and B. thetaiotaomicron VPI 5482 27573983 both grew with sodium sulfide substituted as a reduced sulfur source and the pattern of growth was maintained (Extended Data Fig. 8d). We next examined the amino acid consumption patterns of Bacteroides in vivo. In the caecum of mice monocolonized with B. thetaiotaomicron VPI 5482, asparagine was the most depleted amino acid (median decrease of 86.9%) compared with germ-free control mice (Extended Data Fig. 8e). This observation is consistent with in vivo asparagine utilization by B. thetaiotaomicron, but does not exclude colonization-dependent changes in host asparagine utilization. These findings demonstrate the power of combining strain-resolved metabolomics with simple statistical models—in this case, to discover a major metabolic capacity for nitrogen assimilation for the most abundant genus in the industrialized microbiota.

Metabolomic effect of community and host

Mechanistic studies in microbiome science can be aided by reverse translation of findings from complex communities (humans or conventionally colonized animals) into highly controlled (for example, gnotobiotic) models. We have recently demonstrated the use of our in vitro strain metabolite profiles in reverse translation by recreating metabolic phenotypes of interest to study mechanisms involved in the development of inflammatory bowel disease27. On the basis of two metabolites detected in human biological fluids (biofluids)28 and conventionally colonized mice, we asked whether we could reconstitute the production of microbially derived metabolites in the host gut and/or circulation by colonizing mice with the highest in vitro producing strain in our collection. One candidate, agmatine, is a polyamine with neuroprotective roles in mammals29 and a substrate for transporters in kidney and liver cells30. The other candidate, α-ketoglutaric acid, is a tricarboxylic acid cycle intermediate that extends the lifespan of the nematode Caenorhabditis elegans and increases autophagy in mammalian cells31.

Consistent with our in vitro observations, agmatine and α-ketoglutaric acid levels were both significantly increased in the faeces of mice mono-colonized with a high in vitro producer: Citrobacter portucalensis and Anaerostipes sp., respectively (Fig. 4a and Extended Data Fig. 9a). Furthermore, mono-colonization increased the levels of agmatine in the host circulation (for example, urine) relative to the germ-free control mice (Fig. 4a). These examples provide a proof-of-concept application of our in vitro dataset to reconstitute specific microbially derived metabolism in a mouse model, enabling potential mechanistic studies that are relevant to host physiology.

Fig. 4: Metabolic contribution by individual gut microorganisms in a multi-species community.
figure 4

a, Quantification of agmatine levels. Data are mean ± s.e.m. of two independent experiments, each with n = 4 (germ-free) or n = 5 (Citrobacter mono-colonized) individual mice. b, Significantly produced metabolites associated with C. sporogenes or B. thetaiotaomicron in serum (left) or urine (right). Top, violin plots show median and quartiles; bottom, data are mean ± s.e.m. of one experiment with n = 4 (C. sporogenes, serum), n = 3 (C. sporogenes, urine), n = 5 (B. thetaiotaomicron, serum), n = 4 (B. thetaiotaomicron, urine), n = 7 (six-member, serum), n = 6 (six-member, urine) and n = 9 germ-free mice pooled from both mono-colonization (n = 4) and community (n = 5) experiments. c, Serum metabolite levels in mice colonized with the six-member community (with C. sporogenes (+Cs)) or the five-member community (without C. sporogenes (−Cs)). Metabolites shown represent a panel of significantly elevated or reduced metabolites (≥4-fold, corrected P < 0.05) in the six-member community. Data are mean ± s.e.m. of one experiment with n = 7 (six-member community) and n = 8 (five-member community) mice. Venn diagram of significantly elevated or reduced metabolites in different host biofluids based on the same threshold defined above. ac, Data shown are log2-transformed. P values were calculated using two-tailed Student’s t-tests with Benjamini–Hochberg correction for multiple comparisons. *P < 0.05, **P < 0.01, ***P < 0.001.

We leveraged our strain-resolved metabolomic dataset combined with gnotobiotic colonization (Supplementary Table 8) and asked whether specific in vivo gut-bacteria-derived metabolites serve as biomarkers for a given taxonomic group. Among the 34 significantly produced metabolites in both colonized mice and individual strain cultures, we found several phylum-specific metabolites (for example, 5-aminopentanoic acid and indolepropionic acid by Firmicutes; malic acid and melatonin by Bacteroidetes) (Extended Data Fig. 9b and Supplementary Table 9). These data highlight that taxa-specific metabolites may serve as biomarkers for aspects of microbiome composition.

We next assessed the extent to which metabolites produced in vitro are reconstituted in gnotobiotic mice colonized with the same microorganisms. At the metabolomic profile level, faeces and caecal contents from mice mono-colonized with C. sporogenes or B. thetaiotaomicron correlated with C. sporogenes or B. thetaiotaomicron in vitro culture when compared against 158 taxa grown in mega medium (C. sporogenes, top 1%; B. thetaiotaomicron, top 10%) (Extended Data Fig. 9c). The lack of correlation in serum and urine (average Spearman ρ = 0.058, Extended Data Fig. 9c) is probably due to the inability of the bacterial culture to recapitulate host-encoded metabolism (for example, phase I/II enzymes). At the individual metabolite level, 8 out of 20 (40%, C. sporogenes) and 3 out of 29 (10%, B. thetaiotaomicron) significantly produced caecal metabolites in vivo were also produced by the same strain in vitro (Extended Data Fig. 9d). Furthermore, when assessing a six-species defined microbiota, 15 out of 46 (33%) significantly produced caecal metabolites were also produced by one or more of the six species in vitro (Extended Data Fig. 9d). Collectively, these data illustrate that metabolites produced in a standard rich medium can inform a portion of the microbially derived metabolites produced in the gut environment.

To better understand whether and how microorganism-dependent metabolites in the gut can inform circulating metabolites in the host, we examined enteric and systemic metabolic contributions of C. sporogenes and B. thetaiotaomicron in the host. We measured metabolite profiles of four sample types (faeces, caecal contents, serum and urine) in different colonization states (Fig. 4b). Principal component analyses reveal that metabolomic profiles cluster by sample type (for example, caecal contents versus serum) from mice colonized with the same microorganism, as well as by colonization state (for example, C. sporogenes mono-colonization versus a C. sporogenes-containing six-member community) (Extended Data Fig. 9e, f). We identified a distinct set of known and candidate host–microbial co-metabolites that are significantly elevated in the serum and/or urine, and are strongly associated with the presence of either C. sporogenes or B. thetaiotaomicron in the gut (Fig. 4b and Extended Data Fig. 9g, h). Notably, in both serum and urine, accumulation of N-(cinnamoyl)glycine is dependent on C. sporogenes, whereas accumulation of indoxyl sulfate is dependent on B. thetaiotaomicron (Fig. 4b and Extended Data Fig. 9g, h). Our systematic and high-throughput detection of microorganism-derived and host–microorganism metabolites across different sample types (for example, from caecum to serum) enables the identification of intermediates within known or candidate host–microbial co-metabolism pathways (Extended Data Fig. 10a).

To determine whether enteric presence of C. sporogenes is necessary for the increase or decrease in specific metabolites in the host circulation, we omitted C. sporogenes from the original six-member community. Metabolites shown are significantly increased or decreased by at least fourfold in the serum, urine or caecal contents of mice with the six-member community, relative to germ-free control mice (Fig. 4c and Extended Data Fig. 10b, c). By contrast, the five-member community that lacks C. sporogenes either abrogated the production or restored the depletion of a subset of these metabolites in the serum or urine, indicating that the enteric presence of C. sporogenes is necessary for modulating levels of these metabolites in the host circulation (Fig. 4c and Extended Data Fig. 10b) and illustrating the potential of microbiome editing to alter MDMs that circulate in the host blood.

Discussion

Untargeted metabolomics has led to many discoveries of microbiota-dependent metabolic pathways9,10 and metabolites linked to host diseases17,32,33,34, yet there is considerable untapped potential. Here we present a customizable and expandable method of constructing a chemical standard library-informed metabolomics pipeline tailored to detecting products of gut anaerobic biochemistry. Using this method, we construct an atlas of gut-microbiota-dependent metabolic activities in vitro and in vivo, enabling functional studies of gut microbial communities. Complementary to recent studies using phylogenetic (16S)35 or metagenomic comparisons36 to predict gene functions, we used strain-resolved metabolomics to provide expansive biochemical profiles of individual strains. These profiles demonstrate that substantial metabolic variation is common even between closely related strains. Our findings, along with emerging studies on microbiome-focused metabolomics37,38,39 and gut microbial metabolism40,41, reinforce the limits of phylogeny or genome-scale analysis to provide direct measurement or prediction of metabolic phenotypes and the molecules that link the microbiota to host physiology. Our existing strain-specific genome-by-metabolic profile data provides a rich resource for the comparative discovery of genes and pathways that underlie bacterial phenotypic variation. Furthermore, these data and this approach can be used as a direct reference or as a readily implemented platform for improving MDM identification in biological samples. Adding previously undescribed microbially derived metabolites, along with new strains such as those isolated from diverse human populations, will uncover new mediators of the interactions between the host and microbiota as well as molecular targets for therapeutic interventions.

Methods

Data reporting

No statistical methods were used to predetermine sample size. The experiments were not randomized and the investigators were not blinded to allocation during experiments and outcome assessment.

Metabolomics pipeline construction logic

The accurate identification and analysis of diverse small molecules in complex biological samples (for example, those present in the mammalian gut) are challenging due to a variety of technical factors, including chemical structural diversity, matrix effects and linearity of ion detection. To ensure that our liquid chromatography–mass spectrometry (LC–MS) pipeline is relevant for biological samples and that it is useful to the broader scientific community, we highlight six key points of our approach: (1) detectability of diverse chemical classes of compounds that characterize bacterial and host metabolism using three complementary analytical methods42,43 (Extended Data Figs. 1d, 3a–c); (2) retention time (RT) shifts that occur in divergent matrices (for example, culture supernatant versus host serum) to determine whether metabolites in a biological sample could be faithfully identified using RT data from our m/z-RT reference library (Extended Data Fig. 3d, e and Supplementary Table 2); (3) linearity of signal over a large range of concentrations, a prerequisite for performing sample comparisons and determining differences in the fold change (Extended Data Fig. 3f and Supplementary Table 2); (4) use of MS/MS fragmentation to validate the high-abundance metabolites identified in biological samples (Extended Data Fig. 1e and Supplementary Table 2); (5) construction of an MS/MS reference library of 750+ authentic standards on two distinct types of MS instrument (qTOF and Q Exactive) at multiple standard collision energies (Supplementary Table 3), enabling level-1 confidence annotation when used in conjunction with our m/z-RT reference library; and (6) implementation of our m/z-RT reference library on different types of MS instruments following minimal nonlinear RT correction44 (Extended Data Fig. 3g and Supplementary Table 4). For data analysis, we constructed an integrated pipeline combining (1) MS analysis tools45 that leverage our reference library for compound identification (Extended Data Fig. 1f) and (2) a custom bioinformatics pipeline that enables the computation and statistical analysis of large datasets (Extended Data Fig. 2).

Authentic chemical standard collection

The authentic metabolite standard collection is composed of individually curated and commercially available standards (Mass Spectrometry Metabolite Library of Standards, IROA Technologies). Individually curated metabolites (303 metabolites) were weighed (2 mg minimum) and transferred from the original manufacturer’s stock bottles (for example, Sigma, Fisher, Acros and so on) to 2-ml Eppendorf tubes and reconstituted with 50% LC–MS grade methanol to reach a stock concentration of 10 mM. Additional compounds (284 metabolites) were purchased as 10-mg stocks from MetaSci (MetaSci Custom Library). Dried power from company stock tubes were transferred (2 mg minimum) into 2-ml tubes and reconstituted with 50% methanol to a concentration of 10 mM. Metabolites from the IROA metabolite standard library (634 metabolites), which were supplied in much smaller amounts (around 5 μg per well), were reconstituted with various amount of methanol in water (v/v) as per the manufacturer’s instructions, but owing to the limited mass, their concentrations were less precise. Individual pools (12–30) of metabolite standards, which do not share the same molecular mass, were generated by combining stocks and diluted with 50% methanol to reach a final concentration of 200 μM. A subset of these pools (377 metabolites) was also serially diluted in 50% methanol. Individual metabolite pools and dilutions were analysed using three LC–MS analytical methods.

LC–MS methods

Instrumental and chromatographic settings

Compounds were separated using an Agilent 1290 Infinity II UPLC (binary pumps) and detected using an Agilent 6545 LC–MS Quadrupole Time-of-Flight (qTOF) instrument equipped with a dual jet stream electrospray ionization source (ESI) operating under extended dynamic range (1,700 m/z) in the positive (ESI+) or negative (ESI−) ionization modes. Published C18 methods42 and HILIC method43 were used with minor modifications. See Supplementary Methods for details.

Sample preparation for metabolomics

Five different sample types were processed with a similar sample preparation protocol as described in the Supplementary Methods. In brief, samples were homogenized and proteins were precipitated in a methanol-based recovery buffer that contains the extraction standards. Samples were then centrifuged, their supernatant was collected and evaporated, and a reconstitution buffer containing internal standards was added. Reconstituted samples were filtered and subsequently analysed by three analytical methods on the LC–MS-qTOF.

m/z-RT reference library

The exact m/z of each metabolite standard was calculated by combining the monoisotopic mass of the metabolite (PubChem) and adding or subtracting the mass of a proton (1.007276 Da) depending on the default adduct ion ([M + H]+ for ESI+ and [M − H] for ESI−). The Agilent MassHunter Qualitative Data Analysis software (Qual, v.B.07.00) was used to match individual extracted-ion chromatogram peaks within a ±10-ppm window from the predicted m/z of each metabolite standard. Alternative adducts ions were identified using ‘Search by Molecular Feature’ in Qual; when multiple adducts were identified, the adduct ion with the greatest area under the curve was used in the reference library. An RT was assigned to a metabolite when a single extracted-ion chromatogram peak was identified. When multiple chromatographic peaks were identified, which probably resulted from degradation products, different isotopes or adducts of other molecules in the mixture, a subsequent injection of that metabolite standard alone was conducted to identify the RT for that metabolite. For metabolites run in dilution series, RTs at all concentrations at which the same metabolite was detected were used to produce an averaged RT for this metabolite in the reference library. The averaged RT was used to (1) increase the accuracy by averaging small injection-to-injection variations; and (2) distinguish the true signal from background noise by validating the peaks for which the ion counts proportionally increase with the concentration.

To address how the same reference library performed on different instruments, we compared two different LC–MS systems: an Agilent 6545 qTOF, the instrument with which the original library was constructed, and a second instrument, an Agilent 6530 qTOF or a Thermo Orbitrap Q Exactive (QE). Although these different instruments shared the same chromatographic conditions (for example, analytical methods, solvents and columns), they differed in resolution and ESI ion source parameters optimized to support each instrument. To compare inter-instrumental RT shifts, a subset of the full reference library (219 metabolite standards spanning diverse RTs) was reconstructed on the second qTOF instrument, and 773 metabolite standards were reconstructed on the QE instrument. For each analytical method, RT correction was done by cubic polynomial transformation of the original library44 based on inter-instrumental RT shifts of 10–20 robustly detected metabolites (for example, internal standards) that span the detected RT range. For each analytical method, using the corrected library with a RT tolerance window of 0.2 min, around 99% for the 219 metabolites tested on the second qTOF instrument, and approximately 94% of the 773 metabolites tested on the QE instrument, were correctly identified.

MS/MS library construction

MS/MS raw data were collected from individual pools (12–24 compounds per pool) for 833 authentic library standards, using three liquid chromatography methods applied to two distinct types of MS instruments (Agilent qTOF 6545 and Thermo Orbitrap QE). For qTOF, auto-MS/MS-preferred ion settings with an individual input list of m/z and RT information specific to the compounds in each pool were used to collect spectra at three collision energies (10 eV, 20 eV and 40 eV). For QE, full MS/dd-MS2 settings with a single shared inclusion list containing the m/z and RT information for all of the compound pools were used for data collection at the stepped normalized collision energy of 20–30–40%. A scan range of 60–900 m/z was used to collect centroid type data. On both instruments, ±0.5 min was used as an RT search window for MS1 peak selection, based on the RTs provided by the qTOF reference library. Accurate mass windows were ±10 ppm on both instruments. RTs identified during the MS1 peak selection for the 773 compounds detected on the QE instrument are reported in the m/z-RT library in the ‘QE_rt’ column (Supplementary Table 1).

MS/MS spectra were extracted from MS/MS raw data files (mzml format) with an automated Python script (extract_ms2_spectra.ipynb) using the pymzML parsing library46. For each compound, the intensity of each spectral fragment was normalized to the fragment with the highest intensity (set to 1,000). Spectral fragments with intensities below 0.5% relative to the highest intensity fragment were filtered out. Compound metadata (for example, InChIKey and collision energy) and fragmentation information (for example, m/z and intensity) are reported for each compound. Spectra from the same compound collected using different analytical methods (for example, C18-positive and C18-negative) are all reported. In limited instances, spectra from the same compound were collected multiple times due to representation in multiple compound pools. All of the information above was compiled in Supplementary Table 3, and is publicly available in the MoNA spectrum database under query phrase ‘Sonnenburg Lab MS2 library’. In summary, spectra from 750 and 773 unique compounds were collected on the qTOF and QE instrument, respectively.

MS experimental validations

Linear dynamic range

For large-scale metabolomics experiments, it is typically assumed that instrument response varies linearly with analyte concentration. To test the concentration linearity objectively, we constructed dilution series of 377 metabolites (from pools generated as above), in threefold serial dilutions spanning five orders of magnitude (from 1 nM to 200 μM). These diluted compound pools were then analysed using the three analytical methods. Linear regression of log-transformed concentrations versus log-transformed ion counts was performed and the coefficient of determination (r2) was calculated. Across all metabolites, the average r2 and slope (on log–log plots) were both very close to 1 (0.99 and 0.92, respectively), providing a strong indication of linearity.

Matrix effects

The biochemical complexity of biological samples such as faeces and serum may alter the RT and/or detected signal of individual metabolites. To determine whether accurate identification was significantly affected by RT shifts in multiple matrices, we spiked in 132 metabolite standards into five distinct biological matrices (germ-free mouse faeces, serum and urine, human charcoal-stripped serum and mega medium) and a library control condition (50% methanol, v/v) at a final concentration of 10 μM, and analysed each matrix using all three analytical methods. Three biological replicates for each matrix were used, and the RT and ion count for each spiked-in metabolite standard in each of these matrices were determined. The difference in RT between a biological matrix and the library control condition was calculated (50% methanol in water, v/v) for individual spike-in metabolites. For all 132 metabolites in all five matrices, differences in RTs were minimal, falling within a conservative ±0.1-min window. Changes in total ion count (area under the curve) between a biological matrix and the library control condition were determined by first removing matrix-specific background ion counts for a small number of metabolites present in specific matrix before spike-in. Next, the ratio between spike-in metabolite ion counts in biological matrices and those in library blank controls was calculated (relative fold change, log2-transformed). The majority of spiked-in metabolites exhibit less than fourfold change in ion counts relative to those detected at the library control condition (97% in mouse faeces, 83% in mouse serum, 95% in mouse urine, 88% in human serum and 71% in mega medium). See code details in ‘calculate_biological_matrix_effect.ipynb’. The relatively minor influence of different biological matrices on RTs of the reference library metabolites helped to establish the identification parameter (±0.1-min RT window) for our subsequent biological experiments.

MS/MS validation

To verify the accuracy of compound identification obtained by our MS1 m/z-RT library built from authentic standards, we unbiasedly searched MS/MS spectra of m/z-RT-matched individual metabolites against the MoNA spectrum database. MoNA-reported similarity scores based on spectrum comparisons were recorded (Supplementary Table 2). For each analytical method, using the auto-MS/MS-preferred ions settings of the qTOF, MS/MS spectra were generated at three collision energies (10 eV, 20 eV and 40 eV) from MS1 peaks identified by m/z and RT from our reference library. For biological samples, MS/MS spectra were collected for 162 high-abundance metabolites identified in quality-control samples from in vitro (bacterial supernatants) and in vivo experiments (B. thetaiotaomicron- and C. sporogenes-mono-colonized mouse samples: serum, urine and faecal/caecal contents). Quality-control samples were generated on a per-experiment basis by pooling equal volumes from each biological replicate from the same experiment (3–8 biological replicates per condition across the entire 96-well plate) to provide a representation of the highest number of metabolites in that experiment. To establish a baseline of MoNA similarity scores, MS/MS spectra were also collected from a corresponding set of library authentic standards.

MS/MS spectra were extracted using an automated Python script by first extracting MS/MS spectra for individual m/z-RT-matched metabolites using pymzML46, and then searching individual extracted spectra against the MoNA spectrum database. The search results were restricted to spectra generated using (1) LC–MS instruments and (2) ESI+ ionization mode (for C18-positive and HILIC-positive spectra) or ESI− ionization mode (for C18-negative spectra). Each spectral search used the MoNA-default similarity score threshold of 500, and returned the top-five matches with the highest similarity scores computed by the built-in MoNA algorithm. Among these top matches, the highest similarity score with the correct metabolite name was recorded (Supplementary Table 2). Because MoNA search results contained data from various LC–MS instrument platforms such as qTOF, Orbitrap and Triple-Quadrupole, in some cases there are data collected from multiple MS platforms or multiple collision energies, we would opt for the qTOF and a similar collision energy to our search spectra. Each MS/MS spectral comparison corresponding to the recorded score was also manually inspected. For individual metabolites repeatedly detected in the same sample type (for example, bacterial supernatant or faeces) in more than one experiment, an averaged similarity score among MS/MS spectra for the same metabolite was calculated and recorded in the summary table (Supplementary Table 2). Collectively, all similarity scores between our MS/MS spectra and MoNA spectra for the same set of metabolites have a median score of 992 (library standards, s.d. = 36.78) and 923 (biological samples, s.d. = 114) relative to a perfect score of 1,000, indicating good agreement between our data and what has previously been reported.

Data analysis

MS-DIAL analysis

The MS-DIAL software45 (v.3.83) was used for analysing all in vitro and in vivo data on a per-experimental run and per-analytical method basis. Quality-control samples from each experimental run were used for peak alignment. Chemical assignment of molecular features in samples was performed by comparing the recorded RT and m/z information to our reference library constructed from authentic standards. Tolerance windows were set to 0.1 min RT and 0.01 Da m/z for the C18 methods and 0.2 min RT and 0.01 Da m/z for the HILIC method. When a large RT shift was observed in the internal standards (for example, after instrument repair), a library RT correction was done before MS-DIAL analysis, through a polynomial transformation of the library based on inter-instrumental RT shifts of 10–20 robustly detected metabolites (for example, internal standards). The minimal peak count (height) filter was set to 3,000 for all experiments except for select experiments in which the MS exhibited reduced sensitivity. The MS-DIAL analysis generated a list of m/z, RT and ion counts (area under the curve) for high-confidence annotations (matched to the reference library) as well as unknown molecular features. On the basis of the list of annotations for each experiment, each set of aligned peaks was manually checked using the MS-DIAL graphical user interface. Select metabolite features were removed from this list when: (1) two adjacent but distinct peaks were concurrently assigned to a single molecular feature; (2) odd curvature/shape of the peak led to the integration of several ‘peaks’ from separate sections of the same peak; or (3) features were detected only in the blank controls. Annotated peaks that passed this inspection were included in the final output file.

Custom bioinformatics

After MS-DIAL analysis, data were analysed with a set of custom bioinformatics pipelines. In brief, these pipelines implemented a set of filtration and normalization procedures with the goal of reducing technical variability and controlling for batch effects. The pipelines, including all code for the in vitro and in vivo sample data cleaning and standardization, are described in the Supplementary Methods.

Distance calculations and classifiers

Comparisons between metabolomic and phylogenetic distances (Fig. 2a and Extended Data Fig. 7) and metabolite-based classification (Fig. 3a and Extended Data Fig. 8a) were done with custom Python code described in the Supplementary Methods. For all these analyses, the metabolomic distance matrix used Euclidean distance generated from log2-transformed, medium-blank, delta and variance-filtered fold change data. Only the 158 strains that grew in mega medium were used for these analyses to prevent conflation of metabolic and starting medium differences.

Bacterial culture

The bacterial strains and associated metadata (such as taxonomy, original repository and 16S sequence) used in this work are reported in Supplementary Table 6. All bacterial inoculation and growth occurred in a Coy Laboratories anaerobic chamber kept at an atmosphere of approximately 80%:15%:5% (N2:CO2:H2). All incubations occurred at 37 °C, all bacterial stocks were stored at −80 °C, and all ODs were recorded at 600 nm using a BioTek Epoch 2 plate reader.

Stock preparation

Bacterial strains were acquired from various culture collections including ATCC, DSMZ, NCTC and BEI. Source cultures were plated on a rich medium, single colonies were picked, cultured in rich medium and stored as 1-ml frozen cultures (25:25:50 v/v glycerol:H2O:culture) in ThermoFisher Matrix Tubes. The solid and liquid media used for stock generation are described in Supplementary Table 6 (worksheet ‘media’). Source cultures that exhibited multiple morphologies on agar plates were purified and morphologies separated and retained if the 16S sequence matched the expected 16S sequence. For all cultures, the purity of the final cultures was checked by 16S rRNA sequencing (Supplementary Methods).

Bacterial media

All media used in this study are included in Supplementary Table 6 (worksheet ‘media’). Note that in some cases we grew and recorded metabolites from taxa in multiple media. For the media used for particular supernatant samples and metabolomics, see Supplementary Table 7 (worksheet ‘aggregated_md’).

Mega medium was prepared according to the protocol described in the Supplementary Methods. The recipe is slightly adapted from a previous publication47. In our usage of mega medium, each batch was autoclaved, moved into the anaerobic chamber and allowed to become anaerobic for at least 24 h before use. For taxa that would not grow in mega medium, a different medium was selected based on the literature. In each case, we referenced an ATCC, DSMZ or media manufacturer (for example, Hardy Diagnostics) recipe as outlined in Supplementary Table 6 (worksheet ‘media’). In all cases, these media were prepared for use similarly to mega medium. Specifically, the adjustment of the pH was done before autoclaving, filter-sterilized vitamins and sterile blood were added after autoclaving, and media were moved immediately from the autoclave to the anaerobic chamber and allowed to become fully anaerobic for at least 24 h before use.

For identification of nitrogen utilization in Bacteroidetes, Salyer’s minimal medium (SMM) was prepared (Supplementary Methods), the preparation of which was slightly modified from published protocols26,48. In brief, SMM base was prepared (SMM without haematin, nitrogen source or reduced sulfur source) and allowed to become anaerobic in foil-covered bottles. SMM was prepared without nitrogen source to avoid spontaneous glutamine degradation49. Immediately before use, the SMM base was amended with filter-sterilized solutions of haematin (final concentration 0.5 mg per 100 ml), nitrogen source (glutamine, asparagine, glutamic acid or ammonium sulfate, final concentration of 10 mM) and reduced sulfur source (cysteine or sodium sulfide, final concentration of 4.12 mM). Taxa were plated (mega medium or brain heart infusion with blood) and a single colony picked into freshly prepared SMM. Preculture for 24 h was followed by subculture in freshly prepared SMM for 12–36 h. OD readings were taken as described above.

In vitro growth for metabolomics

Bacterial supernatants included in the in vitro data were generated according to the following protocol. Cultures were inoculated in anaerobic medium (around 4 μl:1,600 μl) in triplicate in 2-ml 96-well blocks and incubated for 24–72 h depending on the taxa selected. Therefore, a single biological replicate from the bacterial culture experiments represents an individual well or tube of bacterial culture growth from an independent 4-μl aliquot from a frozen glycerol culture stock. These pre-cultures were subcultured into mega medium (around 4 μl:1,600 μl) and similarly incubated for 12–60 h. Then, 200 μl of subculture was incubated in a plate reader so that OD readings could be taken to monitor growth phase. The remaining cell cultures were collectd when the OD readings showed the late log or early stationary phase. The collected culture was immediately removed from the anaerobic chamber, centrifuged to pellet the cells (5,000g, 10 min) and the cell-free supernatant was either frozen at −80 °C or immediately extracted as described in the Supplementary Methods.

For details of the purity analysis, sequencing protocol and phylogenetic tree reconstruction, see Supplementary Methods.

Mouse experiments

Mouse experiments were performed with gnotobiotic Swiss–Webster germ-free mice (male, 10–14 weeks of age, n = 3–8 per group for all experiments) or Swiss-Webster excluded flora mice (‘conventional mice’; male, 10–14 weeks of age, n = 3 per group) that were maintained in aseptic isolators and originally obtained from Taconic Bioscience. Mice were maintained on a 12-h light/dark cycle at 69 °F (20.6 °C) in ambient humidity, fed ad libitu, and maintained in flexible film gnotobiotic isolators for the duration of all experiments (Class Biologically Clean). For mono-colonization experiments, mice were colonized with B. thetaiotaomicron VPI 5482, Clostridium sporogenes ATCC 15579, C. portucalensis BEI HM-34 or Anaerostipes sp. BEI HM-220 by oral gavage (200 μl, around 1 × 107 colony-forming units (CFU)) and were maintained on a standard chow (LabDiet 5K67). For the defined-community experiment, mice with a six-member community were colonized with a 200-μl mixture consisting of equal volumes from saturated cultures of B. thetaiotaomicron VPI 5482 (8.7 × 109 CFU), C. sporogenes ATCC 15579 (1.4 × 108 CFU), Edwardsiella tarda ATCC 23685 (3.6 × 1010 CFU), Collinsella aerofaciens ATCC 25986 (1.4 × 109), Eubacterium rectale ATCC 33656 (6.9 × 106 CFU) and Parabacteroides distasonis ATCC 8503 (1.5 × 109 CFU). Mice with a five-member community were colonized with all cultures mixed at the same volumes as described above except for C. sporogenes ATCC 15579, which was not included. Successful colonization and stable community members were determined by 16S amplicon sequencing of the V4 (515F, 806R) region of microbial populations that were present in the faeces and caecal contents of individual mice.

For all experiments, mice were euthanized by CO2 asphyxiation 9 days (mono-colonization with C. portucalensis BEI HM-34 or Anaerostipes sp. BEI HM-220) or 4 weeks (all other experiments) after colonization, and four sample types (serum, urine, faeces and caecal contents) were collected from each mouse. A single biological replicate in the mouse experiments represents a specific sample type (for example, serum) collected from an individual mouse (that is, each biological replicate is from a different mouse). Before euthanization, urine and faeces were collected. Whole blood was collected by cardiac puncture and serum was obtained using microcontainer serum separator tubes from Becton Dickinson following the manufacturer’s instructions. The intact caecum was collected and snap-frozen in liquid nitrogen. A single caecal sample was obtained for mono-colonization and conventional experiments, and three samples at three different sections of the caecum were obtained for the defined-community experiment. All mouse experiments were conducted under a protocol approved by the Stanford University Institutional Animal Care and Use Committee.

Comparative genomics

Genome annotation and database

Bacterial isolates from the culture collection were manually linked up to their respective NCBI BioProject ID numbers. The Rentrez package (https://cran.r-project.org/package=rentrez) was used to link BioProject ID numbers with existing GenBank or RefSeq assemblies or with reads from the Sequence Read Archive (SRA) for isolates that were previously sequenced but not assembled. Isolates lacking assembly accession numbers (Supplementary Table 6 (worksheet ‘full_taxonomy’)) were assembled using previously described methods50. In brief, reads were trimmed using Trimmomatic51 and assembled using SPAdes v.3.9.152 using the following parameters: k = 21,33,55 --careful --cov-cutoff auto. Contigs smaller than 1,500 bp were removed, and assemblies were gene-called and annotated using prokka v.1.14.553. MultiGeneBlast54 (v.1.1.13) was used to build a database containing all of the assembled and downloaded genomes listed in Supplementary Table 6.

Gene and gene cluster searches

The arc gene cluster from Lactococcus lactis and the spe gene cluster from E. coli were used as the query to search publicly available, assembled genomes of strains within our collection. Comparative genomics analyses were conducted using the ‘Architecture Search’ feature of the MultiGeneBlast software (v.1.1.13) with default parameters with one modification, which set the ‘maximum distance between genes in locus (kb)’ to 40 kb. For identification of Asparaginase-containing genomes, the custom BLAST database described above was queried for homologues of E. coli genes (ansA, ansB and aspA) that encode asparagine-consuming enzymes.

Metabolomics Data Explorer

The Metabolomics Data Explorer (https://sonnenburglab.github.io/Metabolomics_Data_Explorer) was constructed in JavaScript and was used to generate scatter plots of our in vitro and in vivo fold-change data based on user input. In vitro and in vivo metadata and fold-change data files were used as data input and were parsed using the Papa Parse library to extract the data and populate the dropdown menus on each page. The dropdown menus enable users to pick the desired taxonomy, metabolite and medium (in vitro), and colonization, metabolite and sample type (in vivo). The Nivo library was used to render interactive scatter plots of the fold change data relative to medium blank controls (in vitro) or to germ-free controls (in vivo). Each dot represents an independent biological replicate, and all metabolites (uniquely identified or co-eluting) are shown. In rare cases, the same metabolite may appear twice in the scatter plot if it is uniquely identified in one analytical method while co-eluting with other metabolites in another analytical method. The scatter plot presents all biological replicates from all independent experiments available in the dataset and provides label details when hovering over the data points to enable easy identification.

Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this paper.