Dietary metabotype modelling predicts individual responses to dietary interventions

Habitual consumption of poor quality diets is linked directly to risk factors for many non-communicable diseases. This has resulted in the vast majority of countries and the World Health Organization developing policies for healthy eating to reduce the prevalence of non-communicable diseases in the population. However, there is mounting evidence of variability in individual metabolic responses to any dietary intervention. We have developed a method for applying a pipeline for understanding interindividual differences in response to diet, based on coupling data from highly controlled dietary studies with deep metabolic phenotyping. In this feasibility study, we create an individual Dietary Metabotype Score (DMS) that embodies interindividual variability in dietary response and captures consequent dynamic changes in concentrations of urinary metabolites. We find an inverse relationship between the DMS and blood glucose concentration. There is also a relationship between the DMS and urinary metabolic energy loss. Furthermore, we use a metabolic entropy approach to visualize individual and collective responses to dietary interventions. Potentially, the DMS offers a method to target and to enhance dietary response at the individual level, thereby reducing the burden of non-communicable diseases at the population level. Variability in the individual response to dietary interventions has been reported. Here a Dietary Metabotype Score is developed to embody those interindividual responses by coupling data from highly controlled dietary studies with urinary metabolic phenotypes. This score may offer a method to target and to enhance dietary response at the individual level, thereby reducing the burden of diet-related disease at the population level.

O ne in five deaths are directly attributable to poor diet 1,2 . Evidence from large interventions has shown that the risk of type 2 diabetes and coronary artery disease is reduced by a healthier lifestyle, which includes consumption of a high-quality diet, and population-based national and international dietary guidelines for non-communicable disease (NCD) prevention have been developed. However, recent evidence shows that individuals respond differently to the same diet in terms of the impact on metabolism and clinical outcomes [3][4][5][6][7][8][9][10][11][12][13][14] . Exploitation of this heterogeneity in dietary response has given rise to the concept of precision nutrition 14,15 , the ambition of which is to optimize individual responses to dietary intervention on the basis of understanding the determinants of these individual responses to nutritional intakes. Current tools for measuring individual dietary intake, such as food-frequency questionnaires, dietary recalls or diet diaries are subject to substantial reporting bias and misreporting 16 , and are inadequate for assessing individual compliance with dietary recommendations. In addition, recent evidence indicates that matching diet to genotype produces no further benefit in dietary response over personalized dietary advice 17 . This highlights the need for new technical approaches for understanding an individual's metabolic response to a dietary intervention Metabolic phenotypes (metabotypes) are the products of interactions between an individual's genotype and multiple environmental factors, including diet, other lifestyle factors and the gut microbiome 3,6,[18][19][20] . In this feasibility study, we develop and apply precision nutrition tools for mapping the dietary response at the individual level. Our aim is to provide a measure of metabolic variability and identify interindividual differences in the response to diet to individualize healthy eating advice, which will lead to a reduction in the risk of NCDs.
We employed a previously reported methodology 21 to capture a systemic overview of metabolic response to each of four specific standardized diets using metabolic phenotyping of urine samples (Fig. 1). We developed four experimental dietary interventions with stepwise degrees of concordance to the World Health Organization (WHO)'s healthy eating guidelines 22 (increase fruits, vegetables, wholegrains and dietary fibre, and decrease fats, sugars and salt); Diet 1 is the most concordant, Diet 4 the least concordant, and there are two intermediate diets (Diets 2 and 3). Information on meals that were provided to participants in each diet are detailed in Extended Data Fig. 1, including the macronutrient content. Healthy participants (n = 19) attended a clinical research unit on four separate occasions and followed these diets in random order. Each intervention period lasted for three days, during which participants were observed continually to ensure adherence to the diet. Figure 1 is a schematic of the study design. In the following series of experiments, we use this analytical framework to explore the role of individual metabolic profiles and the physiological importance of these responses.

NaTurE FOOD
urine samples (pooled from each void throughout the 24 h period) were found to cluster according to diet (Fig. 2a, with representative spectra shown in Fig. 1 and Supplementary Fig. 1). This indicates that participants' urinary metabolic phenotypes were modulated systematically by changing diet. It is of interest that the urinary metabolic phenotype of participants after following Diet 1 (most concordant with WHO guidelines) are consistent with phenotypes previously associated with lean individuals, for example, higher levels of hippurate and vitamin-related compounds such as niacin; whereas the Diet 4 metabolic phenotype reflects that reported for obese individuals (for example, higher levels of glucose, carnitines, fatty acids and so on) 19 (Supplementary Table 1). Despite the rigour of the controlled environment and participants' adherence over each three-day intervention period, there was considerable interindividual variability in the urinary metabolic phenotype and the excretion of individual metabolites in response to each diet, as exemplified by Fig. 2b-d (hippurate associated with fruit and vegetable intake 23 , 3-methylhistidine associated with (lean) meats 24 , Four diets with different levels of concordance with WHO healthy eating guidelines were provided to each of 19 healthy participants in a random order. The macronutrient content displayed in the pie charts shows the proportions of energy from fats (red slice), carbohydrates (orange slice) and proteins (green slice) for the most (Diet 1) to the least (Diet 4) concordant diets. Fibre (blue bar), sugar (pink bar) and the DASH score (green bar, the higher the better) for each of the four diets are shown in the adjacent histograms. Twenty-four-hour urine samples were collected daily over each three-day period and analysed using 1 H NMR spectroscopy to generate one metabolite profile per sample. The urinary metabolite profiles from the most and least concordant diets (Diets 1 and 4) were used to create a mathematical model to calculate a score that summarizes the response of an individual to diet (DMS). Finally, we investigated relationships between the DMS and urinary energy loss, metabolic networks and blood glucose concentration.

NaTurE FOOD
for example, poultry, and carnitine associated with red meat 7 , respectively) and Supplementary Fig. 2 (showing an extended panel of 20 metabolites). Even urinary levels of metabolites directly derived from intake of specific foods and excreted largely without further metabolism (for example, prolinebetaine from citrus fruit) show high interindividual variability. These interindividual differences were not explained by sex, age, body mass index (BMI) or health history of the participants.

Development of a Dietary Metabotype
Score. Urinary metabolite profiles reflect the phenotype of individuals and are particularly responsive to dietary interventions 12,21 . We developed the Dietary Metabotype Score (DMS), based on a Monte Carlo cross-validation partial least squares (MCCV-PLS) model (Methods and Supplementary Fig. 3) to quantify individual variation in urinary metabolic phenotype in response to a test diet. Thus, the DMS for any individual at any given time quantifies the similarity of that individual's urinary metabolite profile to the metabolic phenotypes of the remaining volunteers of the two extreme diets 21 (Diets 1 and 4) with +1 reflecting a score that would represent full adherence to Diet 1 (most concordant with WHO guidelines) and −1 reflecting a spectral profile obtained after full adherence to Diet 4 (least concordant). Since the DMS is based on the whole spectral profile (16,000 variables, which includes metabolites we have identified here, as well as (presently) unknown signals that are associated with the different diets, Fig. 3), changes in both the number and the intensity of signals (relating to diversity and concentration of metabolites) will contribute to the end score; thus, a high DMS will reflect stronger changes in number and/or concentration of metabolites. The predicted DMS of participants consuming diets more adherent to WHO guidelines 22 (Diet 1) ( Fig. 4a and Supplementary Fig. 4) was higher than the DMS calculated when participants were following Diet 4 (least concordance with guidelines). The DMS is presented in rank order (colour bar to the right of Fig. 4a indicates the rank of each participant) to visualize the variability in response to Diet 1. For instance, the participants with the strongest metabolic response to Diet 1 will be at the top of the ranking order (green region of the colour bar) while the one with the least pronounced metabolic response to Diet 1 will be at the bottom of the ranking order (red region of the colour bar). As expected, each participant shows a gradual increase in DMS from Diet 4 to Diet 1; the more concordant the diet is with WHO guidelines, the higher the DMS. However interindividual variability in response to each of the four diets is observed. In addition, data from days 1 and 2 can still be predictive of the diet intervention; however, they could also reflect markers related to their habitual diet at home. Therefore, we applied the same framework on the day 2 samples and found similar classification accuracies as for the day 3 model, but with a lower goodness of prediction (Q 2  Table 1B). Combining data from days 1-3 does give a good predictive model; however, there is a reduced significance of multiple metabolites (Supplementary Fig. 6 and Supplementary Table 1B), which could relate to including data of short-term exposure (day 1 samples).
The variability in the DMS between participants for different diets was not attributed to age, BMI, fat percentage of total body weight ( Supplementary Fig. 7) or sex ( Supplementary Fig. 8). However, some metabolites that are excreted in different amounts in women and men ( Fig. 2 and Supplementary Fig. 2) are consistent with previous literature 25 . Comparisons of our model ( Fig. 3) with sex-specific models (Supplementary Figs. 9 and 10) reveal that with the exception of creatine in the men-specific model, all metabolites from the DMS model are significant in the models built from male participants and in the models built from female participants (Supplementary Table 1B). Also they have the same sign of association as the combined model. The sex-specific models have a smaller number of samples as part of the training set, and a larger number of samples as part of the test data, than the DMS model. Therefore, we compare our DMS model with a model where the training-to-test set ratio is similar to that of sex-specific models. The splitting (50:50 opposed to 80:20) does not impact on the associated metabolites ( Supplementary Fig. 11). In addition, we calculate two regression models with the Dietary Approaches to Stop Hypertension (DASH) score calculated for the four diets and the adherence to WHO guidelines (Supplementary Figs. 12 and 13) and while these models are predictive with multiple coherence of differential metabolites between WHO concordant and discordant diets, not all metabolites previously found in the DMS model are associated with these two subsequent models. Both of these regression models are relatively   Fig. 1) are linear with the diets, such as protein, and this is reflected in the urea, which does not significantly contribute to the DMS model but significantly contributes to the DASH score regression model and the WHO alignment regression model.
To validate these findings, we used a new metabolomic discovery study with a less stringent control. Ten volunteers were fed a standardized diet that reflects Diet 1 for four days with all their food being provided for breakfast, lunch and two snacks. The evening meal was provided to the volunteer to consume at home (see Methods for details). We found similar results to the initial study with a large between individual variability, despite the dietary control. As the diet was the same over four days, there was no linear change over time ( Supplementary Fig. 14A). Next, we combined all the data for each person and represent this in a violin plot ordered based on the median DMS ( Supplementary Fig. 14B), which shows the distribution of the DMS for each participant combining the four days. This demonstrates that some participants have very similar DMSs, whereas others differ significantly, highlighting the occurrence of interindividual variability.
Calculation of the DMS in this cohort revealed that dietary habits in the home environment are highly variable between individuals as well as within individuals (Extended Data Fig. 1). For example, participant 16 shows a high DMS (aligning with WHO guidelines) before starting all diets, while participant 10 shows a higher DMS before the admission to Diets 1 and 4 and a lower DMS before starting Diets 2 and 3. Since participants' DMS at baseline does not determine the DMS after the test diets (Fig. 4b,c), the order of the DMS before Diet 1 does not relate to the DMS ranking order after Diet 1 (Fig. 4b) and the order before Diet 4 does not relate to the DMS ranking after Diet 4 ( Fig. 4c). Moreover, Fig. 4b,c shows a clear decrease in the variability of participants' DMS after exposure to the controlled diets for three days. It appears that, in general, the volunteers' DMS score before the diet fell between the most and least concordant diets, with 12/19 participants increasing the score in response to Diet 1 (most concordant with WHO guidelines) and 13/19 participants decreasing their score in response to Diet 4 (least concordant).

NaTurE FOOD
not found to be significant (P = 1.88 × 10 −1 ). The validation cohort supports the observed association of DMS with a number of important health-related markers. We measured the energy content of the urine directly using bomb calorimetry (Methods). The range of urine energy values was similar to those previously reported in healthy humans 26 (Fig. 4e). Evidence of interindividual variability in the 24 h urinary energy loss, via excretion, in relation to the DMS is shown in Fig. 4e (and Supplementary Fig. 17). The energy loss was directly related to the ranking of the DMS for Diet 1 (Spearman's ρ = 0.93, P = 2.14 × 10 −6 ) and inversely related to the DMS ranking for Diet 4 (ρ = −0.97, P = 2.62 × 10 −8 ). There were no correlations between urinary energy content and either urinary urea or urinary glucose, or between blood glucose measurements and urinary glucose ( Supplementary Fig. 18).
The urinary energy content was significantly related to higher excretion of multiple metabolites (Supplementary Table 3), including metabolites of microbial origin (hippurate, phenylacetylglutamine, formate, 4-cresylsulphate, 4-cresylglucuronide and 2-hydroxyisobutyrate). The formation of microbial metabolites is endothermic, requiring energy, but also represents a potentially significant energy loss to the host via phase II metabolic conversions of selected carbon sources, which renders the carbon skeleton unavailable for energy metabolism by the host. For example, the conjugation of phenylacetate and glutamine to form phenylacetylglutamine results in a loss of energy by decreasing the accessibility of glutamine for energy metabolism. However, microbial metabolites typically also: for example, hippurate is higher in urine samples from Diet 1 due to the increased intake of fruits and vegetables, whereas phenylacetylglutamine is higher in urine after Diet 4 and There is no relationship between the order of DMS before and DMS ranking order after each diet (P = 0.96 and P = 0.99 for Diets 1 and 4, respectively). d, Relationship between the ranking order of the DMS and blood glucose concentration (Methods) for each person after each test diet. The higher the DMS (indicated by the colour of the ranking order from a) of the participant, the lower the glucose concentration (AUC) measured in the participant after each test diet (median shown in black). e, Relationship between the DMS after following Diet 1 (green dots) and Diet 4 (red squares) for three days and the energy value (J g −1 of dried sample) of the urine with samples labelled according to participant ID. Higher energy excretion in the urine is associated with the DMS ranking order and highlights interindividual variability.

Articles
NaTurE FOOD related to the increased consumption of animal protein in this diet (Supplementary Table 1A).
While the DMS ranking order and energy loss are related and share common metabolites (hippurate, phenylacetylglutamine, as well as non-microbial metabolites), there are additional microbial metabolites associated only with urinary energy content (formate, 4-cresylsulphate, 4-cresylglucuronide and 2-hydroxyisobutyrate) that reflect the influence of the gut microbiota on urinary energy loss.

Impact of dietary intervention on individual metabolic network maps.
To understand the wider impact of the dietary intervention on human metabolism, we generated a urinary metabolic reaction networks map (Fig. 5a) using a previously described methodology to visualize reactions between metabolites in relation to associated metabolic pathways 27 . We constructed this metabolic network map using the set of 32 metabolites as anchor points, where the excretion was significantly different after following Diet 1 (most concordant with WHO dietary guidelines) and Diet 4 (least concordant) for all 19 healthy participants 21 . The connectivity of these 32 metabolites (that is, the minimum number of biochemical reactions required to connect all 32 metabolites) takes place through 234 metabolites (white nodes) as part of the human supra-organism metabolic reaction network 27 .
Compounds associated with lipid, glucose and energy metabolism explain a greater proportion of the metabolic phenotype in Diet 4 compared with Diet 1. This observation aligns with the blood chemistry measurements which, despite the short intervention period, are significantly different between Diets 1 and 4 for average post-prandial glucose (P = 0.036) and show a trend towards a lower fasting total cholesterol (P = 0.056) and triglycerides (P = 0.058) (Supplementary Table 2).
All 33 metabolites show interindividual variation in excretion between participants (Fig. 2b-d and Supplementary Fig. 2), suggesting homoeostatic mechanisms are, to an extent, specific for each person. To quantify this type of metabolic variation, we calculate a measure of system disorder (metabolic entropy) based on the fold-change in excretion of each of the 33 urinary metabolites to measure the robustness of a person's metabolism under dietary challenge of Diets 1 and 4 (Methods). This entropy measure was used to map the metabolic differences (in response to Diets 1 and 4 for each participant) onto the skeleton outline of the urinary metabolic reaction networks map, as exemplified in Fig. 5b,c for participants 6 and 16 (highest and lowest metabolic entropy, respectively) and Extended Data Figs. 2 and 3 (all other participants). In each of these figures, the size of the metabolite node is proportional to the metabolite fold-change between Diets 1 and 4, and the paths connecting two metabolites are weighted by the average fold-change of the two metabolites in the respective diets (Methods) to visualize the different utilization of pathways at the individual level. The higher the associated entropy of a pathway, the larger the potential energy loss from that pathway to the urine.
Each individual metabolic network highlights the expression of the participant's metabolic phenotype and allows us to further investigate participants' variability in response to each reference diet based on the entropies associated with specific pathways. For instance, participant 6 (highest metabolic entropy, second-highest DMS and second-highest urinary energy excretion) exhibits higher expression of most of the pathways associated with the 32 metabolites compared with the other participants ( Fig. 5b and Extended Data Figs. 3 and 4). In contrast the metabolic network for participant 16 (lowest metabolic entropy, lowest DMS and lowest urinary energy excretion) indicates that specific compartments, mostly related to TCA anaplerotic and mitochondrial coenzyme A (CoA) metabolism, may contribute more to their urinary residual energy in this participant than other pathways such as histidine and beta-alanine metabolism (Fig. 5c).

Discussion
We have used individuals' urinary metabolic phenotypes to demonstrate that even in a highly controlled environment, individuals' metabolic responses to diet differs. Our data suggest that everyone has a unique dietary metabotype that relates to the individuals' physiological homoeostasis, as demonstrated by glycaemic control. Our results support previous studies 3,4 in highlighting the need to understand individual response to lifestyle to enhance response to dietary intervention.
In this feasibility study, we have found that among a 'healthy' group of subjects, the participants who have a higher loss of energy in the urine (that is, those that also are at the top of the dietary metabotype score ranking) demonstrate greater urinary excretion of microbial metabolites. The energy content of urine in humans has so far been little studied but, as far back as 1901, Rubner observed that in addition to urea there were calorific substances in urine 28 . Here we describe a portfolio of microbial gut-derived  27 visualizing connectivities between 32 urinary metabolites, the excretion of which significantly differed between Diet 1 (most concordant with WHO dietary guidelines) and Diet 4 (least concordant) for all 19 healthy participants. The node colour indicates whether the metabolite is excreted in higher concentrations in Diet 1 (green) or Diet 4 (red). Each edge (line between nodes) indicates a reaction (substrate-product relationship) and the white nodes (only named for nodes with three or more reactions) represent metabolites that connect the identified differential biomarkers of diet/dietary response in the human supra-organism metabolic reaction network (Methods). The background shading indicates different class or type of metabolic pathways. b,c, The individualized differences in response to Diets 1 and 4 have been mapped onto the skeleton outline of the urinary metabolic reaction network (a), where the size of coloured nodes is proportional to the fold-change of that metabolite between Diets 1 and 4 for that person. The edge colours are related to the sum of fold-changes of each pair of metabolites connected via their shortest path (Methods). The metabolic entropy for each individual is calculated as the sum of the individual fold-changes 40 . The more disordered or metabolically flexible (high entropy), a subnetwork is, the stronger the associated edge weights (yellow-orange) in contrast to less perturbed pathways (magenta-blue edge weights). b, Participant 6 (entropy 112.31). c, Participant 16 (entropy 74.46). This reflects the fact that diet has a stronger impact on participant 6 as evidenced by the greater magnitude of differences in the DMS for Diets 1 and 4 than the difference in response to these diets demonstrated by participant 6. Entropy is expressed in arbitrary units. Abbreviations: -al., -aldehyde; 2PY, N-methyl-2-pyridone-5-carboxamide; 3AIB, 3-aminobutyric acid; 3O-3IUB, 3-oxo-3-ureidoisobutyrate; Ac, acetyl; Ad, adenylyl; ADP, adenosine diphosphate; Ala, alanine/alanyl; Am, amino; AMP, adenosine monophosphate; Arg, arginine/arginino; Asp, aspartate; CER, ceramide; CMP, cytidine monophosphate; CoA, coenzyme A; Cys, cysteine/cystenyl; deH, dehydro; deO, deoxy; DMA, dimethylamine; DMG, dimethylglycine; EA, ethanolamine; EAP, phosphoethanolamine; FA, fatty acid; GABA, gamma-aminobutyric acid; Gln, glutamine; Glu, glutamine/ glutamyl; Gly, glycine; GPA, glycerophosphoric acid; GPC, glycerophosphocholine; GPEA, glycerophosphoethanolamine; GSH, glutathione; His, histidine; IMP, inosine monophosphate; Lys, lysine/lysyl; Me, methyl; MMA, monomethylamine; mur, muromoyl; NA, nicotinic acid; NAD, nicotinamide adenine dinucleotide; NANA, N-acetylneuraminic acid; NMe, N-methyl; NMNA, N-methylnicotinic acid; NT, nucleotide; O, oxo; OH, hydroxy; P, phosphate; PAG, phenylacetylglutamine; PLP, pyridoxal phosphate; Ptd, phosphatidyl; Se, seleno; Ser, serine; SO, sulfoxide; TG, triglyceride; Thr, threonine; TMA, trimethylamine; TMAO, trimethylamine-N-oxide; UDP, uridine diphosphate; UMP, uridine monophosphate.

NaTurE FOOD
metabolites that could contribute to the energy content of urine and which account for variation in urinary energy values between individuals. We did not collect feaces for microbiota analysis during this study as gut transit in humans is relatively long and variable 29 and the length of dietary intervention in this study was three days, so a feaces collected on day three may not represent the microbial change induces by the diet 30 . In humans, energy loss in the excreta is around 175 kcal d −1 (0.73 MJ) in faeces and 78 kcal d −1 (0.33 MJ) in urine 26,31 . This may make urine energy excretion seem relatively unimportant. However, small changes in energy balance can have a significant impact over time. For example, the average weight gain in adults per year is 500 g, which is approximately 3,500 kcal; this is an intake excess of less than 10 kcal d −1 . The difference in urinary energy excretion between the lowest and highest energy excretor in Diet 1 reflects an increase of 4% in energy loss in the urine, which is equal to 4 kcal d −1 and a total of 1,500 kcal yr −1 , which will account for 215 g of fat difference per year between these two individuals. Thus, this apparently small change over time becomes clinically important. In urine, we observe conjugated microbial products that make the carbon skeleton of the molecule unavailable to the host. Whether it is possible to manipulate this energy loss via gut microbial modulation as a way of preventing weight gain remains unknown at present.
On the basis of the observed interindividual differences in urinary energy loss, we explored the variability in response to the same diet at a metabolic pathway level to gain better insight into the intricate regulatory networks shaping a given phenotypic response. By using individual urinary metabolic reaction network maps, we showed substantial variation between the composite metabolic outputs of individuals that had a similar DMS. The mechanism driving

Articles
NaTurE FOOD these observations is currently unknown, but individual genotype and/or gut microbial composition are likely to contribute. A limitation of these maps is that they are built using urinary metabolites alone. Nevertheless, before a metabolite ends up in the urine, it is generally in the plasma/circulatory system (or of renal origin) and thus metabolites in 24 h urine samples are a time-averaged representation of the homoeostatic signatures of multiple organ and cellular systems in the body.
In summary, our feasibility study demonstrates that there are interindividual differences in response to the same diet, even when the environment is controlled. We have developed a modelling framework that could be used to monitor individual response to diet and that provides a mechanism for enhancing dietary advice with the potential to inform decision-making strategies for the prevention, risk reduction and clinical management of NCDs for precision medicine.

Study protocol, ethics and consent. The study was approved by the London-Brent
Research Ethics Committee and carried out in accordance with the Declaration of Helsinki (13/LO/0078). The study protocol is available from ref. 21 . All participants provided written informed consent. An external cohort (NutriTech 32 ) was used to validate associations with health-related markers (London-Brent Ethics Committee reference number: 12/LO/0139). This dataset contained 65 participants (31 female), with a mean BMI of 29.0 ± 2.9 kg m −2 at baseline, for which urine samples were available from baseline measurements before starting the clinical trial (NCT01684917). We used our metabolite discovery study, which uses a semicontrolled four-day feeding study. Ethical approval for this study is subsidiary to the main study 'Dietary biomarker discovery using metabonomics' . The study was approved by the London-Brent Research Ethics Committee and carried out in accordance with the Declaration of Helsinki (13/LO/0078).
Validation study design. The methodology used was a four-day controlled diet coupled to a food challenge study. The aim of the challenge study is to identify and quantify potential candidate dietary biomarkers. The study we used to report the stability of the metabolite profile aimed to develop a biomarker for egg intake. Ten healthy participants were recruited (4 males and 6 females, aged 23 to 34, BMI range from 18 to 27, mean BMI 22 ± 3 kg m −2 ). All participants provided written informed consent before the beginning of the study. Breakfast (08:00) and lunch (13:00) were provided to the participants (details of the food consumed are given in Supplementary Table 4). The participants were given an evening meal consisting of rice, carrots, lettuce, salt and olive oil, plus the test food (eggs) in increasing doses over the four days (day 1, 0 eggs; day 2, 1 egg; day 3, 2 eggs; day 4, 4 eggs). The nutrient profile was 64% energy from carbohydrate, 26% fat and 10% protein, which aligns with Diet 1. After consuming the meal, participants collected their 12 h overnight urine excretion from 20:00-08:00. Urine samples were collected into sterilized single containers overnight, and then stored in sterilized Eppendorfs at −80 °C. NMR spectroscopy and data pre-processing. Urine samples were prepared with a pH 7.4 phosphate buffer for ¹H NMR spectroscopy as described previously 21 and analysed at 300 K on a 600 MHz spectrometer (Bruker BioSpin). The following standard one-dimensional pulse sequence with saturation of the water resonance was used: RD -gz,1 -90° -t -90° -tm -gz,2-90° -ACQ, where RD is the relaxation delay, t is a short delay typically of about 4 μs, 90° represents a 90° radio-frequency pulse, tm is the mixing time (10 ms), gz,1 and gz,2 are magnetic field z-gradients both applied for 1 ms, and ACQ is the data acquisition period (2.7 s). The receiver gain was set to 90.5 for all experiments and water suppression was achieved through continuous-wave irradiation at the water resonance frequency using 25 Hz radio-frequency pulse strength during the RD and tm. Each urine spectrum was acquired using four dummy scans, 32 scans, 64,000 time domain points and with a spectral window set to 20 ppm for urine. Before Fourier transformation, the free induction decays were multiplied by an exponential function corresponding to a line broadening of 0.3 Hz. 1 H NMR spectra were manually phased and digitized over the range δ −0.5 to 9.5 and imported into MATLAB (2014a, MathWorks). Each spectrum was baseline corrected using in-house software. The spectra were subsequently referenced to the internal chemical shift reference (trimethylsilyl-[2,2,3,3,-2 H 4 ]-propionate, TSP) at δ 0.0. Spectral regions containing the signals from the internal standard (δ −0.5 to 0.5) and water (δ 4.5 to 5.5) were excluded before probabilistic quotient normalization. Urine samples from both the NutriTech and metabolite discovery study were analysed using the same acquisition parameters as above, and normalized using the same reference for the main study data. Each spectrum consisted of 16,000 variables after pre-processing. Subset optimization by reference matching 33 (STORM) was used to identify metabolites using the correlation structure of 1 H NMR data. Localized clustering of small spectral regions was used for selecting appropriate reference spectra. In addition, a Bruker compound library, internal databases and extensive 2D NMR identification strategies 34 were used for identification of molecular species.
Calorimetric determination of urine. Twenty-four-hour urine samples collected on day 3 from 19 participants following Diets 1 and 4 were analysed using a C1-Bomb Calorimeter (IKA Werke). The bomb calorimeter was calibrated with 0.5 g benzoic acid with a calorific value of 26,461 J g −1 . Three millilitres of each 24 h urine sample was dried using nitrogen gas and weighed on an analytical scale before being placed in a glass crucible. Three drops of a paraffin oil ignition, which has a calorific value of 46,634 J g −1 , were weighed on an analytical balance and spiked on the dried urine sample. The amount of the external energy from the paraffin oil was inserted in the calculation software of the equipment as well as the net weight of the sample to be quantified. These data were taken into account by the software to determine the calorific value of urine in J g −1 . For 11 samples ( Supplementary Fig. 17), the volume of the sample was not enough to calculate an accurate measure of the calorific value.
Measurement of glucose serum levels. Serum glucose was measured from blood collected into serum-separating tubes and assayed using the Infinity Hexokinase Reagent (Thermo Scientific) measured on a Spectramax I3X plate reader (Molecular Devices). Variability in the glucose incremental area under the curve (AUC) refers to the area included between the baseline (fasting blood glucose) and the incremental serum glucose concentrations measured at each time point (2 h after breakfast, 2 h after lunch and 2 h after dinner). The area under each incremental glucose curve was calculated using the trapezoid rule.

Statistical analysis (DMS).
Data from the 24 h urine samples collected on day 3 from 19 participants following Diets 1 and 4 were used to construct a MCCV-PLS model 35 . Samples from day 3 were used as we previously observed that there appears to be dietary homoeostasis after three days of following the same diet 21,36 . The paired data were mean-centred within each person to account for the repeated measures design. The model data (n = 19 × 2) were randomly divided into a training and a test set for each of the 1,000 Monte Carlo iterations. The test set contained all data (both Diet 1 and Diet 4 samples) from 3 or 4 individuals at each iteration (mean 3.8, median 4), equivalent to 20% of the data. The training data were used to construct a PLS model and optimize the number of components using an internal double cross-validation loop. The ratio between Q 2 Y I (goodness of prediction) and R 2 Y I (goodness of fit) of the training data was used to select the optimal number of components from the calculated models. The maximum number of components that the model is optimized for is set to the number of training samples (in the double cross-validation loop) minus 1 (in practice this is never more than 11, and a histogram of the optimal number of components across all models is shown in Supplementary Fig. 3, with a median of 2 components). The training data were scaled to unit variance and the test data were scaled using the standard deviation from the training data (centring was done within-person, see below). This framework ensures that the test data are never used in modelling or determining scaling parameters and can thus be predicted without any introduced bias or over-fitting 35 . The final model contains 1,000 individual models that are calculated using a training set with different individuals each time. The entire data for each individual is left out of the training set on multiple occasions in the MCCV: that is, it is then part of the test set for that specific iteration. The average of the predictions from all models where the data from an individual was in the test set was taken to predict the DMS.
The data from 24 h urine samples from Diets 1 and 4 taken on days 1 and 2 are not used in the model and are used as a separate validation set. These data are first centred within-person using the mean from the day 3 samples to account for the paired design. These data are then predicted using the MCCV model and applying scaling parameters (standard deviation) from the training data (see above) for each of the 1,000 individual models. The DMS is defined as the average of the predictions where the data from an individual was used in the test set in the model. Samples from all three days for Diets 2 and 3 are predicted the same way as the day 1 and 2 samples from Diets 1 and 4.
For the training set, the DMS for Diets 1 and 4 correspond to +1 and −1. The DMS for the test data is expected to be around +1 for Diet 1 and around −1 for Diet 4 and in between +1 and −1 for Diets 2 and 3. However, the DMS for test data can go beyond the range of +1 and −1 due to individual variability and to account for data that is more (less) concordant with WHO guidelines than Diet 1 (Diet 4). In general, any positive score is more consistent with Diet 1, whereas a negative score is more reflective of Diet 4.
To assess the robustness of the DMS model, we also investigated models using day 2 samples as the model set and all samples from days 1-3 as model set, these analyses used the same framework as described above (with the same splitting ratio into training and test sets and within-person centring (see paragraph below)). In addition, we calculated sex-specific models where the samples from men are used as training data, and the women are the test data, and vice versa. In this case, the splitting between training and test is 50:50 (opposed to 80:20 in the DMS model) and therefore we also compared these with a model that randomly splits the data Articles NaTurE FOOD 50:50 (irrespective of sex). Lastly, we used the DASH score of the diets and the adherence of each diet to WHO guidelines in two regression models (using day 3 samples) to use the urinary metabolites to predict these. The framework used for these analyses is the same as for the DMS.
The repeated measures design of the data is accounted for in the centring of the data. Any data used in the modelling is centred within-person: all data for each person (regardless of whether they are in a training or test set) is centred individually. This allows for the model to focus on changes in metabolite excretions relative to each individual's metabolic phenotype. The scaling of variables (unit variance) was applied using all data after the centring step. The standard deviation from the training data is used and applied on the test and validation data sets-so there is never any information from the test and validation sets in the calculation of the model (for choosing the optimal number of components we used a further splitting of the training data in each iteration to inform on the number of components).
The samples from both the NutriTech and metabolite discovery study were centred based on the average of the main study data, and scaled using the parameters from each individual model (training data). As these samples are from independent individuals, all 1,000 models from the MCCV are used to calculate the DMS.
Statistical analysis (urinary energy). The 24 h urinary 1 H NMR spectroscopic profiles of all participants were regressed against the calorific value using standard linear regression, adjusted for multiple testing using the Storey-Tibshirani false discovery rate (FDR) 37 . (Partial) Spearman correlation was used to compare the DMS ranking with other study outcomes (glucose, urinary energy).

Bioinformatics analysis (MetaboNetworks maps).
A urinary metabolic reaction network map was constructed using the MetaboNetworks software 27 by connecting the 33 metabolites that were identified from the MCCV-PLS model using the Kyoto Encyclopedia of Genes and Genomes (KEGG) database of biochemical reactions that occur in the human supra-organism. The bacteria that make up 99% of the colonies commonly found in the human gut 38,39 were included in the MetaboNetworks database, since many of the urinary metabolites are known to derive fully or partially from the gut bacteria. In the database, any reaction that can occur either spontaneously, due to an enzyme linked to a Homo sapiens gene, or due to an enzyme linked to a microbial gene (3,282 species were included from the phyla actinobacteria, bacteroidetes, cyanobacteria, firmicutes, fusobacteria, proteobacteria, tenericutes and verrucobacteria) was included.
Metabolic entropy calculations. The entropy was calculated using the metabolite excretion data from both Diet 1 and Diet 4 and is a single value for each person that is related to the within-individual differences associated with Diets 1 and 4. Metabolites found in higher concentrations in urine of participants after following Diet 1 ('M1') and those metabolites found in higher concentrations in urine after Diet 4 ('M4') are considered to be in the perturbed state. The corresponding baseline levels were the concentration of M1 metabolites in Diet 4 ('B4') and M4 metabolites in Diet 1 ('B1'). For simplicity, two data matrices of fitted metabolite data are used, M for metabolites in the perturbed state (n = 19 (participants) by p = 33 (metabolites), both M1 and M4) and B for metabolites in the baseline state (dimension 19 × 33, both B4 and B1). This allows for the calculation of a metabolic entropy contribution (s ij ¼ 1 Wj log Mij Bij I , entropy contribution s for individual i and metabolite j, normalized for the weight (w) of metabolite j) for each metabolite per participant based on a fold-change in excretion between Diet 1 and Diet 4 for each participant normalized by the log-normalized standard deviation (w j ¼ std log B j À Á À Á I ) of the baseline levels-analogous to similar methods 40 . However, metabolites that relate directly to specific foods (such as tartrate 41 and N-acetyl-S-(1Z)-propenyl-cysteine-sulfoxide 34 ) will exhibit a large fold-change, thus large entropy, and dominate the total entropy over changes in endogenous metabolites. To make the comparison between metabolites more meaningful, we autoscale (mean-centred followed by division by standard deviation, σ) the columns of s s * ij ¼ sij� sj σs j I before calculating the metabolic entropy (S) per participant. S is calculated as the sum across the columns of s S i ¼ P p j¼1 s * ij ! I . As we normalized the fold-changes and then autoscaled the data, the entropy is expressed in arbitrary units. Using the MetaboNetworks urinary metabolic reaction network as a layout, individual metabolic networks were constructed for each individual where the size of each node (metabolite) is proportional to the metabolite entropy (s * ij ). Next, for each pair of metabolites the shortest path (number of reactions) was extracted from the network and each edge (reaction) in the path was weighted by the average entropy of the two metabolites. For individuals where pairs of excreted metabolites are correlated, the reactions (and associated pathways) that connect those metabolites will have higher weights than those from pairs of metabolites that are excreted in lower amounts and/or are uncorrelated. This highlights the pathways that are associated with the individual's metabolic profile.
Reporting Summary. Further information on research design is available in the Nature Research Reporting Summary linked to this article.

Data availability
All presented data are tabulated and detailed in the main text and the Supplementary Information. The study protocol availability is detailed in the Methods. Diets provided to participants are detailed in the Supplementary Information. Quantified NMR data, DMS, AUC glucose and calorific value for Diets 1 and 4 presented here are freely available (CC BY-NC 3.0) from Mendeley Data at https://doi.org/10.17632/6xvt7cnffd.1.

Code availability
The codes for executing the MCCV-PLS (with repeated measures) algorithm can be obtained from https://bitbucket.org/jmp111/capls/src/. The code for executing the STORM algorithm can be obtained from https://bitbucket.org/jmp111/storm/ src. These can be executed in a MATLAB environment.

Statistics
For all statistical analyses, confirm that the following items are present in the figure legend, table legend, main text, or Methods section.

n/a Confirmed
The exact sample size (n) for each experimental group/condition, given as a discrete number and unit of measurement A statement on whether measurements were taken from distinct samples or whether the same sample was measured repeatedly The statistical test(s) used AND whether they are one-or two-sided Only common tests should be described solely by name; describe more complex techniques in the Methods section.
A description of all covariates tested A description of any assumptions or corrections, such as tests of normality and adjustment for multiple comparisons A full description of the statistical parameters including central tendency (e.g. means) or other basic estimates (e.g. regression coefficient) AND variation (e.g. standard deviation) or associated estimates of uncertainty (e.g. confidence intervals) For null hypothesis testing, the test statistic (e.g. F, t, r) with confidence intervals, effect sizes, degrees of freedom and P value noted For manuscripts utilizing custom algorithms or software that are central to the research but not yet described in published literature, software must be made available to editors/reviewers. We strongly encourage code deposition in a community repository (e.g. GitHub). See the Nature Research guidelines for submitting code & software for further information.

Data
Policy information about availability of data All manuscripts must include a data availability statement. This statement should provide the following information, where applicable: -Accession codes, unique identifiers, or web links for publicly available datasets -A list of figures that have associated raw data -A description of any restrictions on data availability DATA AVAILABILITY. All presented data are tabulated and detailed in the main text and supporting information. Codes used to analyse these data referenced in the main text and Methods section. Study protocol availability is detailed in the Methods section. Diets provided to participants are detailed in supporting information.

Field-specific reporting
Please select the one below that is the best fit for your research. If you are not sure, read the appropriate sections before making your selection.

Life sciences Behavioural & social sciences Ecological, evolutionary & environmental sciences
For a reference copy of the document with all sections, see nature.com/documents/nr-reporting-summary-flat.pdf

Life sciences study design
All studies must disclose on these points even when the disclosure is negative.

Sample size
The main data comes from a randomized controlled clinical trial, where the sample size was determined based on expected increase of urinary proline betaine (as marker of nutritional intake). A previous study suggested that urinary concentration of this metabolite would rise by 50 μmol/L with each incremental rise in fruit intake (i.e., pieces of fruit) in the experimental setting. With an SD of 40 μmol/L, assuming a power of 0·95 and an alpha of 0·05 to detect a difference of 50 μmol/L, we estimated that we would need 12 volunteers. Because the protocol required a high amount of volunteer time and involvement (12 inpatient days plus travelling time) and volunteers could withdraw from the study, we requested permission to recruit 30 people, with the aim of having a cohort of roughly 20 people. 19 participants completed the entire controlled clinical trial.
Data exclusions No data was excluded from the data presented.

Replication
The data presented was validated in another population (UK) from an external cohort (NutriTech 27). This dataset contained 65 participants (31 female), with a mean BMI of 29.0±2.9 kg/m2 at baseline, for which urine samples were available from baseline measurements prior to starting the clinical trial.
The data shown in figure 3 was first discovered using a food challenge study (n=3 with 4 time points) and here shown with the data from a controlled clinical trial used to validate the findings.
Randomization Data is from a randomized controlled clinical trial where participants were given 4 diets in random order.

Blinding
Investigators responsible for data analysis could not be blinded to assigned groups for the data presented as the multivariate statistical analysis was performed in a supervised manner. However, these investigators were not responsible for assigning a randomization order for participants, this was done by independent investigators.