a, Experimental design. Lab mice were delivered via sterile C-section, fostered by either lab or wildling dams and subjected to HFD from week 10 to 20 of age. b, PCoA (Jaccard distance) of 16S rRNA gene-profiling data of faecal samples; ellipses show 95% confidence interval. c,d, Weight of fostered male lab mice (n = 5 per group) during (c) and after 10 weeks (d) of HFD. e,f, Weight of fostered female lab mice (n = 8 per group) during (e) and after 10 weeks (f) of HFD. Data were collected over two independent experiments (b–f). g, Experimental design: at day 2 of age, lab and wildling litters and their respective dams were cohoused for a period of 11 d. As controls, two lab litters and their respective dams were cohoused for the same period of time. After 11 d of cohousing, lab litters and their dams were separated from wildling litters and their dams. The pups were weaned at day 26 of age and subjected to HFD. h,i, Weight of male lab mice (n = 10 had been cohoused with wildlings, n = 7 had been cohoused with lab mice) during (h) and after (i) the 10-week course of HFD. j,k, Weight of female lab mice (n = 19 had been cohoused with wildlings, n = 13 had been cohoused with lab mice) during (j) and after (k) the 10-week course of HFD. l, Experimental design: at day 15 of age, lab and wildling litters and their respective dams were cohoused for a period of 11 d. As controls, two lab litters and their respective dams were cohoused for the same period of time. After 11 d of cohousing, lab litters and their dams were separated from wildling litters and their dams. The pups were weaned at day 26 of age and subjected to HFD. m,n, Weight of male lab mice (n = 10 had been cohoused with wildlings, n = 15 had been cohoused with lab mice) during (m) and after (n) the 10-week course of HFD. o,p, Weight of female lab mice (n = 22 had been cohoused with wildlings, n = 15 had been cohoused with lab mice) during (o) and after (p) the 10-week course of HFD. Mean ± s.e.m. are shown (c,e,h,j,m,o). Box plots show median (centre line), 75th (upper limit of box) and 25th percentiles (lower limit of box) and outliers (whiskers) if values do not exceed 1.5 × interquartile range (d,f,i,k,n,p). Two-sided Wilcoxon rank sum test (d,f,i,k,n,p). *P < 0.05, **P < 0.01, ***P < 0.001, ****P < 0.0001; exact P values are provided in the Source Data.