Introduction

Ecological succession has been a central theme in ecology for more than 120 years1. However, the mechanism underlying gut microbiota succession in aquatic animals remains elusive2, especially at a relatively long-term scale3. Understanding host-associated microbial succession needs to consider interactions with host genetics and ecology4,5, which undoubtedly increases the complexity to elucidate mechanisms governing the gut microbial community succession6. Although many studies indicated that both ecological and evolutionary forces could affect the succession of intestinal microbiota in terrestrial animals7,8, much less is known about that in aquatic fish gut ecosystem, which also colonizes with diverse microbial communities9,10,11. Fish encompass nearly one half of the vertebrate diversity12 and are considered as the most successful vertebrates evolved on Earth13. Their successful evolution may not be possible without the help of gut microbiota9,10. Of course, fish in turn provide gut microorganisms with appropriate habitats and necessary nutrients, and protect the gut microbiota from adverse disturbances (e.g., pathogen invasion)14. Such host-microbiota interactions are especially important for fish health, immunity, metabolism, development, reproduction, behavior, as well as defense of disease9,10,15.

The mechanism governing aquatic fish gut microbiomes may be utterly different from those of terrestrial mammals14. As oviparous fish cannot get heritable microorganisms from their mother as that of viviparous mammals delivered vaginally16. Recent studies found that fish gut microbiota was closely correlated with host genetics17, immunology18, physiology19, and ecology4,20, suggesting that such host-associated features should be important in governing fish gut microbiota. However, some other studies indicated that environmental factors were crucial forces shaping the fish microbiome21,22. Theoretically, all microorganisms colonize in the fish gut ecosystem are expected to be derived from the surrounding environment. However, fish are also able to retain some low abundant microorganisms in the environment, meaning that the bacteria (even the poor colonizer) obtained from the environment could further evolve to be more prolific colonizers23. Moreover, bacteria increasingly better adapt to colonization of fish by repeatedly moving from host to host through the external water environment24. So, it would be better to consider gut and water microbiota as a metacommunity to get a full understanding of fish-associated microbiomes. However, the contribution of fish microbiota to the ecosystem diversity of metacommunity (γEcosystem) is rarely addressed25. But in fact, any community is governed both by processes that occur within the local community and all linked communities26,27.

So far, the mechanism underlying fish-microbiota-environment associations remains controversial13. Host selection due to fish genetics could be a primary deterministic process to colonize core gut microbiota in zebrafish, regardless of whether they were recently collected from natural habitats or reared for generations in different labs28. Moreover, the relative importance of non-neutral processes (e.g., microbe-microbe interactions, active dispersal, selection) governing zebrafish gut microbiota was found to be increased as host development29. Some other studies fund that ecological processes governing gut microbiota are variable across fish development16,30. So far, only a few fish microbiome studies considered the host developmental issue, but the fish microbial diversity and composition could be significantly affected by the fish development16,29,30,31,32,33. Also, some other uncontrollable field factors (e.g., geographic distances, habitats, diets) may overestimate the discrepancy of fish gut microbiome among different studies. Fortunately, laboratory zebrafish allow us to dissect resultant effects from the environment and host under controllable conditions, and have been a powerful model for dissecting host-microbial interactions15. In addition, the succession of gut microbiota across zebrafish life cycle can be examined within a short period (i.e., three to four months), which greatly shortens the experimental time and therefore can reduce unexpected biases from long-term experiments. Another advantage of using zebrafish model is we can perform whole gut ecosystem analysis due to its small size, so that the overall microbial diversity can be precisely estimated.

This study aimed to clarify how host development and environment dispersal affect the assembly and succession of fish gut microbiota using the manipulated zebrafish model. We hypothesized that the host would have much stronger effects on the fish gut microbiota succession than the environment due to host genetics, immunology, and gut nutrient niches. So, we first tested whether fish hatched in different environments could assemble similar microbiota. Second, we examined whether established gut microbiota could be disturbed after zebrafish husbandry environment was switched. Third, we quantified the relative effects of host development and environmental dispersal on the gut microbiota succession. We found that the gut microbiota assembly and succession were mainly governed by host development rather than environmental dispersal. This study not only clarifies the effects of the host development, hatching environment, and environmental transition on the fish gut microbiota succession, but also provides new insights into our mechanistic understanding of gut ecology of other aquatic animals.

Results

Different water environments constructed for manipulation of zebrafish

To examine the effects of surrounding environments on the initial colonization and subsequent succession of gut microbiota, we constructed three different water environments to manipulate zebrafish (Fig. 1). We found that all investigated water chemical factors were significantly different among environments A, B, and C (p < 0.05). Specifically, the environment A showed the highest concentrations of Chl-a and total organic carbon (TOC), whereas the soluble orthophosphate (SOP), NH4-N and NO2-N in the environment B were the highest, and the environment C had the highest NO3-N (Fig. 2a). The microbial richness and phylogenetic diversity (PD) of water microbiotas in environments A and B were significantly higher than those of environment C (p < 0.05), whereas the Shannon diversity in the environment A was statistically higher than those of B and C (p < 0.05, Fig. 2b). Also, the Venn diagram indicated that the composition of microbial OTUs in the three environments were considerably different: only 3.0–14.5% of the detected OTUs were shared by two or three environments, whereas 63.7% were unique OTUs (Fig. 2c). The three water environments were also clearly separated by the abundance-weighted DCA ordination (Fig. 2d). Thus, it is expected that the constructed environments would provide distinct microbial species pools for colonizing fish gut microbiota.

Fig. 1: Experimental setup for testing host and environmental effects on the ecological succession of gut microbiota across zebrafish development.
figure 1

Zebrafish were manipulated under three different environments (A, B, and C). First, zebrafish embryos belong to a single sibship were hatched in three independent circular plates with water from environments A, B, and C, respectively. Second, zebrafish hatched from different environments (indicated by green, red, and blue, respectively) were transferred from plates to tanks at 12 days post-hatching (dph) and raised in small net cages (dotted box). Gut samples were collected from different cages across zebrafish development from 12 to 98 dph. The colored lines, fish and letters in green, red, and blue corresponding to environments A, B, and C, respectively. Cages 1, 5, 9 represented zebrafish kept in original environments, and the other cages represented zebrafish subjected to switched environments.

Fig. 2: Chemical and microbial characteristics of the three constructed water environments and zebrafish gut microbiota colonized at 12 dph.
figure 2

a Chemical factors of water. Mean values were plotted with standard errors, and the variation among environments were tested through an ANOVA with least-significant-difference (LSD) tests. The presence of different letters denoted significant differences among environments, and the same letter indicated no significant difference. Chl-a Chlorophyll a, SOP soluble orthophosphate, TOC total organic carbon. b alpha-diversity of water and gut microbiotas. PD phylogenetic diversity. c Venn diagram of water microbiotas. The Venn diagram represent proportions of shared OTUs (operational taxonomic units) across environments over the total number of OTUs detected in all environments, but it does not provide quantitative data on the OTUs. d detrended correspondence analysis showing the dissimilarity of water and gut microbiotas at 12 dph (days post-hatching).

Zebrafish gut microbiota assembly and turnover in original environments

To test whether different water environments would affect the initial assembly of fish gut microbiota, we analyzed water and gut microbial communities as well as their relationships. First, we found that the same batch of zebrafish embryos hatched in different environments assembled similar gut microbial communities at 12 dph, which cannot be separated in the DCA ordination based on Bray–Curtis distances (Fig. 2d). The alpha-diversity in terms of PD, richness and Shannon (Fig. 2b) also showed no significant differences among zebrafish hatched in environments A, B, and C (p > 0.05). Then, we further explored whether water environments would influence the turnover of the established gut microbiota in zebrafish that consistently kept in original environments (i.e., cages 1, 5, 9). The results showed that gut microbiotas were also different from water microbiotas across zebrafish development (Supplementary Fig. 1). Specifically, only three OTUs (OTU_1: Cetobacterium, OTU_3: Cetobacterium, and OTU_4: Aeromonadaceae, their detailed taxonomy please see Supplementary Table 1) on average >1% in both gut and water samples; most of other relatively prevalent OTUs detected in the gut samples were not abundant in water samples (Fig. 3a). Based on the Bray–Curtis distance analysis, gut microbiotas of zebrafish kept in each original environment were clearly separated according to fish developmental stages (i.e., 12–20, 27–42, and 56–98 dph, Supplementary Fig. 1). The top 20 OTUs of gut microbiota, which explained 39.7–43.1% of community variations, also showed clear distinctions among fish developmental stages (Fig. 3b).

Fig. 3: The average abundance for each detected OTU and the variation of gut microbial communities explained by the top 20 OTUs.
figure 3

a the average abundance for each OTU across water and gut microbiotas. The microbial OTUs that were equally abundant in gut and water samples fall along the diagonal line, whereas those enriched in the water or gut samples fall above or below the line, respectively. Dashed lines marked 1% of the average abundance in water or gut samples, respectively. The OTUs averagely >1% in gut or water samples are shown in blue and red, respectively. The red and blue mix points indicate OTUs dominated in both gut and water microbiotas, and the black points indicate OTUs averagely <1% in gut or water samples. b canonical correspondence analysis (CCA) showing gut microbiota variation explained by the top 20 OTUs. Each point represents a gut microbial community of individual zebrafish, and arrows represent the contribution of the top 20 bacterial OTUs.

In each original environment (i.e., cages 1, 5, 9), the dominant OTUs in zebrafish gut also showed similar succession patterns. Specifically, zebrafish at 12–20 dph colonized relatively high abundances of OTU_5 (Vibrio) and OTU_4 (Aeromonadaceae), which cumulatively accounted for >50.0% of the microbial abundance (Supplementary Fig. 2a). At 27–42 dph, OTU_2 (Plesiomonas) became dominant (16.2–26.7%), whereas OTU_5 (Vibrio) decreased to only 5.0–5.8% of the total abundance. However, OTU_4 (Aeromonadaceae) was generally kept at a relatively high abundance (10.6–31.4%) from 12 to 42 dph (Supplementary Fig. 2a). At 56–98 dph, two Cetobacterium members (OTU_1 and OTU_3) increased considerably and accounted for 40.0% of the total abundance, but OTU_4 (Aeromonadaceae) decreased to 8.2–11.0% (Supplementary Fig. 2a). However, the OTUs with relatively high abundances in water environments (e.g., Flavobacterium members of OTU_7 and OTU_11, Supplementary Fig. 2b), which theoretically have high opportunity to enter the gut through environmental dispersal, did not become dominant taxa in gut ecosystems. By contrast, the low abundant microorganisms in the water became prolific colonizers in zebrafish gut but depended on the host development. Thus, both gut microbial community composition and the abundance of dominant OTUs in zebrafish gut all showed clear developmental stage-specific patterns.

Zebrafish gut microbiota succession after environmental transitions

After 12 dph, some zebrafish were subjected to pairwise environment transitions to further test the influence of environmental dispersal on the gut microbiota succession. We tried to answer two questions: (i) whether zebrafish hatched in the same environment but raised in different environments tend to show different succession patterns? (ii) do zebrafish hatched from different environments but raised in the same environment tend to have similar succession patterns? Our results indicated that the ecological succession of gut microbial communities was mainly associated with zebrafish developmental stages regardless of their hatching environment (Fig. 4a) or rearing environment history (Fig. 4b). Gut microbial communities of zebrafish within each tank could be clearly split into three groups corresponding to three developmental stages (i.e., 12–20, 27–42, and 56–98 dph, Fig. 4). It could be further confirmed by dissimilarity tests (PERMANOVA, p < 0.05, Table 1). However, analyses performed between zebrafish in original environments (cages 1, 5, 9) and switched environments (cages 2, 3, 4, 6, 7, 8) within any stage were not significantly different (p > 0.05, Supplementary Fig. 3 and Supplementary Table 2). Similar stage-specific patterns were observed when we analyzed zebrafish across all tanks to test the influence of overall environmental dispersal on gut microbiota succession (Table 1 and Supplementary Fig. 4a), but had no environment-specific patterns (Supplementary Table 2 and Supplementary Fig. 4b). Moreover, the gut microbial communities at any stage were also significantly different from those of corresponding water microbial communities (p < 0.05, Supplementary Table 3). The succession patterns of zebrafish gut microbiota after environmental transitions was similar to those kept in original environments, which also split seven timepoints into three stages. Thus, the hatching environments and environmental transitions did not significantly affect the zebrafish gut microbiota succession, which appeared to be mainly determined by the host development.

Fig. 4: Detrended correspondence analysis (DCA) showing environmental effects on the succession of gut microbiota across zebrafish development.
figure 4

a According to hatching environment. b According to rearing environment. Zebrafish hatched from different environments (Env.) or raised in different environments showed similar gut microbial succession patterns across host development.

Table 1 Permutational multivariate analysis of variance (PERMANOVA) showing the community differences of gut microbiota among zebrafish developmental stages.

Host development determined the ecological succession of zebrafish gut microbiota

As both hatching environments and environment transitions did not significantly affect the assembly and succession of zebrafish gut microbiota, we subsequently focused on the qualitative and quantitative contributions of different factors (i.e., developmental stage, environment, transition, and food) to the gut microbiota succession. The multivariate regression tree (MRT) analysis explained 68.3% of the microbial diversity variance (Fig. 5a). Specifically, the diversity estimates of gut microbiota were first split by developmental stage (46.2%), which was the most important factor influencing the diversity and succession of gut microbiota, while the water environment only explained a small proportion of variance at early stages (1.4% at 12 dph, 1.8% at 27–42 dph). The alpha-diversity in terms of Shannon, PD and richness (Fig. 5b) also showed significant differences among different developmental stages (p < 0.05). The general linear model (GLM) analysis indicated that the developmental stage was the only significant predictor for shaping the alpha-diversity (p < 0.05, Supplementary Table 4). Specifically, the variance of PD, richness or Shannon was mainly explained by the developmental stage (r2 = 33.4–45.9%, p < 0.001); the environment only explained 3.4% of the richness significantly (p < 0.05), but the transition and food showed no significant explanation (p > 0.05). In addition, hierarchical partitioning variance of these alpha-diversity indices showed that the contribution of developmental stage (64.3–82.4%) was much stronger than those of environment (1.2–9.8%), transition (5.8–14.8%), or food (9.7–11.1%; Supplementary Table 5). Mantel tests performed using both Bray–Curtis and Jaccard distances indicated that the developmental stage was the strongest factor that significantly underlying the beta-diversity (r > 0.5, p < 0.001), and partial Mantel tests estimate the correlations between diversity matrix and stage whilst controlling for the effects of environment/transition/food were kept consistent (r > 0.5, p < 0.001, Table 2). However, the transition had no significant correlation with the beta-diversity (p > 0.05); and the environment and food only showed a weak (|r| ≤ 0.2) correlation to the beta-diversity (Supplementary Table 6). Therefore, zebrafish developmental stage was the major predictor of gut microbiota succession, overwhelming those of environment, transition and food. However, we should acknowledge that the impact of maternal/chorion variation as a source of gut microbiota variation was not explored here.

Fig. 5: Zebrafish gut microbial diversity mainly associated with the developmental stage.
figure 5

a the multivariate regression tree (MRT) analysis performed base on the Bray-Curtis distance with interactions of different factors (i.e., developmental stage, environment, transition and food). b alpha-diversity of Shannon, phylogenetic diversity (PD), and richness were plotted with standard errors. The variations among environments were tested through an ANOVA with least-significant-difference (LSD) tests. The presence of different letters denotes significant differences among environments, and the same letter indicates no significant difference.

Table 2 Summary statistics for Mantel and partial Mantel tests of correlation between gut microbiota (M) and developmental stage (S).

Ecological processes governing zebrafish gut microbiota succession

Ecological process analyses were performed to explore mechanisms governing the ecological succession of gut microbiota across zebrafish development. We found that the ecosystem diversity (γEcosystem) across all tanks or within each tank showed similar contributions from different parts of diversity. Specifically, the metacommunity was mainly contributed by the mean of diversity within water or gut habitats (βintra-Habitats, 39.8–53.9%, Fig. 6a), indicating gut microbiota is also an important contributor to the ecosystem microbial diversity. By contrast, the mean diversity of each water or gut sample (αLocal-Communities) and the sum of diversity between water and gut habitats (βinter-Habitats) represented 24.8–29.2% and 20.8–34.3% (Fig. 6a) of the overall diversity, respectively. The null model test also indicated that the observed community similarities within zebrafish developmental stages were significantly differed from those of randomly permutated communities (p < 0.05), showing relatively high deterministic ratios (Supplementary Table 7). The quantified ecological processes confirmed that the succession of gut microbiotas in zebrafish was governed by strong deterministic process (Fig. 6b). Specifically, the homogeneous selection, which causes community composition to be similar under consistent environmental conditions, was responsible for 28.2–40.8% of gut microbial variation and it increased with host development. The heterogeneous selection, which causes community composition to be dissimilar under different environmental conditions contributed an additional 4.4–8.4% of variation. By contrast, the homogenizing dispersal at the early stage was also important (20.5%), but the contribution of dispersal limitation was much weak (only 0.6–2.0%) throughout the fish development (Fig. 6b). Thus, the zebrafish gut microbiota succession appeared to be mainly governed by stage-dependent selection, and the homogenizing dispersal was only important at the early stage.

Fig. 6: The quantification of metacommunity diversity and ecological processes.
figure 6

a hierarchical partitioning of the metacommunity diversity at multiscale. The ecosystem diversity (γEcosystem) of each tank or across all tanks was partitioned into contributions of αLocal-Communities (mean diversity of each water or gut sample), βIntra-Habitats (mean of diversity within water or gut habitats), and βInter-Habitats (sum of diversity between water and gut habitats). b the quantified major ecological processes governing the gut microbial communities. The percentages (numbers on the individual bars) are given the relative contribution of each known process to the community succession at different stages, and the remaining parts attributed to undominated process.

Discussion

Understanding the ecological succession of fish gut microbiota and underlying mechanisms facilitates the host metabolism, health and environmental adaptation10,24, and therefore has become a central theme of gut ecology. This study clarified the major forces governing the assembly and succession of fish gut microbiota across host development under different water environments. We found that the gut microbiota was mainly determined by the host development rather than hatching environments or environmental transitions. Thus, the results generally supported our hypothesis that the host development would overwhelm environmental dispersal in governing the gut microbial community succession across fish development due to host genetics, immunology, and gut nutrient niches.

The host genetics is known as the most important force to provide a primary selection of gut microbiota24,34. With a short period (12 days) of monitoring Poecilia sphenops, the fish gut microbiota found to be mainly driven by deterministic host effects independent of water microbiota35. Many other studies also showed that gut microbial communities in different fish species were considerably different due to the host genetics or phylogeny17,36,37, and the same fish species could colonize core gut microbiota despite radical differences in host provenance and domestication status28. Also, host sub-genomes (with hybrid fish lineages)38 and host genotypes (among-population differences)39 could affect microbial community in the fish gut ecosystem. However, those studies were always focused on a particular short developmental stage of fish. Interestingly, recent studies suggested that fish development could be one of the most important factors driving the succession of gut microbiota. For example, Burn et al.29 found that the relative importance of non-neutral processes for gut microbial community assembly in zebrafish increased over host development. This study agreed with such conclusion due to the deterministic process of homogenous selection increased with fish development for the assembly of gut microbiota. These studies along with some others32,33 started a new era to understand fish gut microbiota as the diversity and composition of microbial communities were found to be variable over zebrafish development. Our previous studies also indicated that aquaculture fish (e.g., Ctenopharyngodon idellus, Siniperca chuatsi and Silurus meridionalis) could assemble a respective gut microbial community ~3 dph16, followed by stage-specific patterns across fish development16,30,31, which is consistent with the microbial community turnover across host development in other animals such as shrimp40, insect41,42, bird43, mouse44, and human45,46. Thus, valid comparisons across studies about the gut microbiota should at least strive to use consistent ages of the sampled hosts32.

This study aimed to further understand the assembly and succession of gut microbiota by integrating effects of host development, hatching environment, and environmental transition. We found that the effects of zebrafish development on the gut microbiome were much stronger than those from the environment. The observed stage-specific gut microbiota succession patterns could be attributed to three aspects. First, the colonization of intestinal microbes in zebrafish initially occurs when zebrafish mouth opens at approximately day 3 post-fertilization47. This is coincident with the lumen formation of intestinal tract, and the whole gastrointestinal tube is opened at day 6 post-fertilization47. By this time, the yolk sac is almost consumed47, and the larvae start to get outside foods and simultaneously colonize diverse microbial species48. The colonized microbes in turn can further facilitate intestinal development in zebrafish49. That means the functions assisted by the colonized microbes in gut ecosystem may vary across zebrafish development, especially during the period of developing organs, and therefore showed stage-specific gut microbiota. Second, host immunity is also known as an important force to affect the fish gut microbiota. Although zebrafish innate immunity at early stages (e.g., before 18 dph) only has a small effect on the diversity of gut microbiota15, their adaptive immunity increases the role of selective processes in gut microbiota assembly18. Other animals with high immune functions could support much smaller microbial populations in the intestine than those with immune-compromised hosts50. In this study, the gut microbiota succession in zebrafish showed a clear split between 12–20 and 27–42 dph. This could associate with the development of zebrafish adaptive immune system, which is only functional after 25 dph51. Third, host-associated microbes could also benefit from their host with a protected and nutrient-rich niche33,52, which may considerably differ within a host at different developmental stages. Thus, the assembly of gut microbiota suggested to be largely driven by the nutrient landscape created by host diet and secretions53. The availability of nutrients in gut ecosystems, as well as gut motility and digestive processes varied across zebrafish development may also contribute to the stage-specific gut microbiota.

We found that the homogeneous selection was the major deterministic process governing gut microbiota, but the impact of maternal/chorion variation as a source of gut microbiota variation was not explored here. Moreover, the homogeneous selection increased with zebrafish development, resulting in similar microbial communities as gut environments within a stage tend to be similar. The homogenizing dispersal was only important at the early stage, as the newly formed gut ecosystem initially have no pioneer species to exclusive dispersal of other microbial species. This is consistent with previous study, which suggested that the relative importance of neutral process decreased over host development29. It also explained why microbial communities in larval zebrafish were more similar to environmental communities than those of adult fish32. Besides the selective pressures from host, the absence of significant relationships between gut microbiota and water microbiota may also attribute to different conditions in gut and water habitats, which could cause community composition to be dissimilar due to the process of heterogeneous selection. Generally, only the microbial species in the surrounding water environment with the tolerance to conditions in the gut ecosystem could colonize and thrive as part of the gut microbiota. Of course, we also should acknowledge that some other processes such as microbe-microbe interactions and active dispersal currently classified as undominated process may also contribute to the succession of fish gut microbiota.

Compared with strong host effects on the succession of gut microbiota across zebrafish development, the environmental influences derived from hatching environment or environmental transition were much smaller. This is consistent with previous findings in zebrafish29,32 and those in grass carp16, showing that gut microbial communities were different from the surrounding environment. Some other aquatic animals also exhibited considerably different gut microbial communities from those in the surrounding water31,40,54,55 or sediments56. Rudi et al.57 identified stable core gut microbiota in Atlantic salmon during the freshwater-to-saltwater transition. Besides the selective pressures from the host as discussed above, the interhost microbial transmission through the water is also a significant force that help fish shaping similar gut microbiota in different individuals15,24. In this study, we found that the overall diversity of metacommunity was mainly attributed to the mean diversity within gut or water habitats, indicating gut microbiotas contribute significantly to the metacommunity of the rearing ecosystem. Generally, the host-associated microbiota is strongly shaped by the factors that influence microbial survival and persistence in the gut ecosystem. The host gut habitat is a key issue for selecting the species able to colonize and thrive as part of its microbiota58,59. The successful colonizers in the gut ecosystem should have selective advantages of traits to occupy space, obtain resources, and avoid removal via excretions23,24. Their success of colonization in fish gut with relatively high abundances in turn can affect the metacommunity of the rearing system due to ceaseless communication (i.e., feeding and defecation) with surrounding water.

In summary, this study sought to resolve the effects of host development, hatching environment and environmental transition on the gut microbiota succession from larvae to adult fish. Although the impact of maternal/chorion variation as a source of gut microbiota variation was not explored, we found that zebrafish developmental stage substantially explained the ecological succession of gut microbial communities and dominant OTUs. Moreover, the ecological succession of zebrafish gut microbiota was mainly governed by stage-dependent homogeneous selection due to host effects, and the environmental impacts of hatching environments and environmental transitions were much smaller. These findings expand our current understanding of the ecological succession of gut microbiota across fish development, and also provide new insights into gut ecology of other aquatic animals.

Methods

Experimental setup and zebrafish (Danio rerio) husbandry

We investigated the gut microbiota assembly and succession in wild-type zebrafish (AB strain) from larvae to adults. We first established three different water environments using independent glass tanks (130 × 30 × 40 cm). Specifically, environments A and B were planted with Hydrocotyle vulgaris and Epipremnum aureum, respectively, and their roots were kept in water to exchange materials between plants and water, which were distinct from environment C with no plants. After plants grew for 30 days, water samples were collected from the left, center, and right of each tank as three replicates to evaluate the environmental differences among A, B, and C. The water microbiota and water chemical factors (i.e., NH4–N, NO3–N, NO2–N, Chlorophyll a, soluble orthophosphate, and total organic carbon) were monitored as described previously60.

The three different water environments constructed were then used to manipulate zebrafish and test our hypothesis in three aspects. First, to test possible effects of different water environments on the assembly and turnover of gut microbiota, the same batch of fertilized zebrafish embryos were randomly assigned to three independent circular plates (~1000 embryos per plate) and hatched with waters from environments A, B, and C, respectively (Fig. 1). Second, to test the effect of environmental transitions on the established gut microbiota, 100 individuals of zebrafish hatched from each environment were transferred to each of the three independent tanks (one tank corresponding to an environment, Fig. 1) at 12 days post-hatching (dph), but raised in small net cages fixed in the tanks. In each tank, there were three cages to separate fish transferred from environments A, B, and C, but the cages within a tank were connected and the microbial community in the water of each tank represented a metacommunity. This design could help us to explore whether zebrafish hatched from different environments tend to have similar succession patterns. Zebrafish raised in each cage had equivalent density to ensure our comparisons and interpretations of the effects derived from environmental transitions are reliable. Third, to explore the relative importance of host and environmental effects on the gut microbiota succession, fish and water samples were collected with 1–4 weeks interval (i.e., 12, 20, 27, 42, 56, 70, and 98 dph, Fig. 1). All zebrafish used herein belong to a single sibship and theoretically should have similar effects from host genetics, but the environmental dispersal was distinct due to different hatching environments and subsequent environmental transitions.

Zebrafish were raised under standard laboratory conditions according to the method described previously30. In brief, a stable water temperature (28 ± 0.5 °C) as well as 14/10-h light/dark cycle was controlled. No additional food was provided before the yolk sac was completely consumed (4 dph). Then, zebrafish were fed with cultured Paramecium (5–8 dph), 20 µm mesh filtrated boiled egg yolk (9–11 dph), live brine shrimp (12–19 dph), and a standard dry fish food from 20 dph onward (Fig. 1).

Sampling procedures and microbial community DNA extraction

Three fish were randomly sampled per tank per treatment per timepoint as replicates, and each fish was used as an individual specimen in subsequent experiment. The intestines of larval individuals were immediately removed aseptically under a dissecting microscope as described previously30, and the juvenile/adult individuals were aseptically removed their intestines directly. The whole intestine of each fish was kept in a sterile 1.5-mL tube as a single sample, ensuring that the intestinal microbial diversity in each gut ecosystem is fully estimated. All protocols involved in the fish experiments were approved by the Institutional Animal Care and Use Committee of the Institute of Hydrobiology, Chinese Academy of Sciences (Approval ID: Keshuizhuan 08529).

At each sampling time (except 20 dph), water samples were also collected from the left, center, and right of each tank as three replicates within tanks. Then, 500 mL of each water sample was sequentially filtered through 1.2-mm (Whatman, NJ, USA) and 0.22-mm filters (Millipore, MA USA) to collect microbial cells for evaluating the water microbiota60. We totally obtained 189 zebrafish gut samples (that is, 7 time points × 3 tanks × 3 cages × 3 replicates) and 54 water samples (that is, 6 time points × 3 tanks × 3 replicates) for following microbial analyses. The intestines and filters were immediately stored at −80 °C until DNA extraction. Microbial community DNA was extracted using the PowerFecal® (gut samples) or PowerWater® (water samples) DNA Isolation Kit (Mo Bio, CA, USA) following the manufacturer’s instructions. The concentration and quality of extracted DNA were determined using a NanoDrop One spectrophotometer (Thermo Fisher Scientific, MA, USA), and all the DNA samples were diluted to the same concentration (10 ng/μL) for subsequent PCR amplification.

16S rRNA gene amplicon sequencing and data analysis

The V4-V5 regions of the 16S rRNA gene were amplified by using the primer set of 515 F (5′-GTGCCAGCMGCCGCGGTAA-3′) and 907R (5′-CCGTCAATTCMTTTRAGTTT-3′). Each sample was amplified in a reaction volume of 50 μL containing 1× Premix Taq DNA polymerase (dNTP, Taq and buffer were included), 0.2 mM of each primer, and 50 ng genomic DNA. The program for PCR amplification included DNA pre-denaturation for 5 min at 95 °C, then 30 cycles of 30 s at 95 °C, 30 s at 52 °C, and 30 s at 72 °C, followed by a final extension at 72 °C for 10 min. Negative controls were always performed to make sure there is no contamination. After all samples were successfully amplified, the PCR products were quantified and equally combined. The target band visualized by 2.0% agarose gel was excised and purified with a QIAquick Gel Extraction Kit (Qiagen, CA, USA). After re-quantifying the concentration of purified DNA, it was subjected to library construction. The constructed amplicon library was finally sequenced by the Illumina HiSeq 2500 platform (Illumina, CA, USA) in Guangdong Magigene Biotechnology Co., Ltd. with a 2 × 250 bp kit.

Quality filtering and processing of sequence reads were conducted on the publicly available Galaxy pipeline (http://mem.rcees.ac.cn:8080/) as described previously61. In brief, the overlapped paired-end sequences were first assembled using QIIME (Quantitative Insights into Microbial Ecology)62, and poorly overlapped and low-quality sequences such as those with length <140 and moving-window (5 bp) quality score <20 were removed before downstream analysis. The table of zOTUs (starting now, called OTU) generated by the UNOISE method according to the database of Greengenes 13_863. The singletons were removed from the original OTU table. All samples were resampled to a same sequencing depth (i.e., 14,666 sequences per sample) before subsequent community analysis and statistics.

Ecological process analysis

The role of water and gut habitats for shaping the metacommunity in each tank or across all tanks was separated into their contributions at smaller scales from habitats to local communities as described previously25. In order to directly visualize the role of each habitat for shaping the metacommunity composition, we used an additive diversity partitioning framework to decompose the total diversity and expressed it as the sum of the diversity observable at various scales with Rao function25. Specifically, the overall diversity of ecosystem (γEcosystem) was partitioned into the sum of inter-habitat compositional differences (βInter-Habitats; i.e., between water and gut habitats), the mean intra-habitat compositional differences (βIntra-Habitats; i.e., within water or gut habitats) and the mean diversity of local communities (αLocal-Communities; i.e., each water or gut sample).

To quantify the influence of ecological processes on fish-associated microbial communities, the relative contribution of key processes (e.g., selection and dispersal) governing the gut microbiota succession was determined as described previously16. First, the representative sequences of each OTU were used to align with the 16 S GreenGene sequences using PyNAST64, and a maximum-likelihood tree was constructed using FastTree65. Then, phylogenetic diversity (PD) of each given pair of communities was quantified by the weighted beta nearest taxon index (βNTI)66. The βNTI in a combination of Bray-Curtis-based Raup-Crick (RCbray)67,68 was further used to quantify the ecological processes. In brief, the relative impact of community turnover determined by the heterogeneous selection and homogeneous selection can be indicated by the fraction of communities with βNTI > 2 and βNTI < −2, respectively69. These selection processes include environmental filtering, biotic interactions, nonrandom dispersal, and positive mutations70. If |βNTI| < 2, but with RCbray > 0.95 or <−0.95 suggested that the community turnover is governed by dispersal limitation or homogenizing dispersal, respectively. However, if |βNTI| < 2 and |RCbray| < 0.95, that means the community turnover is not governed by any process as mentioned above and therefore classified as undominated process, which includes some weak selection, weak dispersal, diversification, and drift70.

Statistical analysis

Multivariate regression tree (MRT) analysis71 was used to explore and predict relationships between the gut microbiota and expected influence factors (i.e., developmental stage, environment, transition, and food). This method has been widely used for modeling species-environment relationships, and it is well suited for complex ecological datasets with high-order interactions. General linear model (GLM) analysis was used to ascertain what underlying factors shaped the alpha-diversity (i.e., PD, richness, and Shannon). Hierarchical partitioning was performed to identify important potential causal variables with independent effects on the alpha-diversity. Mantel and partial Mantel tests were performed to determine relationships between environmental factors and the microbial community structure based on both Bray–Curtis and Jaccard distances.

In order to show a general pattern of the relatively dominant microbial members, the top OTUs in the gut or water were estimated by proportions based on averages per sample across all environments (A, B, and C). More specifically, the generated OTU table was analyzed tank-by-tank or compared across all tanks using the following statistical methods: (i) alpha- and beta-diversity comparisons were conducted to reveal changes in gut microbiotas throughout host development, or between water microbiota and gut microbiota; (ii) detrended correspondence analysis (DCA) was conducted to illustrate overall similarities of microbial communities based on the Bray-Curtis distances; (iii) permutational multivariate analysis of variance (PERMANOVA) was performed to evaluate the significance of community dissimilarities based on both Bray-Curtis and Jaccard distances72; (iv) in order to determine whether the observed community similarities within each stage are indistinguishable from the null expectation, the null model analysis based on the method proposed by Chase et al.47 by holding α-diversity and γ-diversity across total dataset constant. We performed this analysis based on the Bray–Curtis distance without data transformation. It provides a quantitative estimation of the role of deterministic selection processes in shaping community composition and structure, such ratio is termed as selection strength. (v) canonical correspondence analysis (CCA) was used to explain the contributions of the top 20 dominant OTUs to the overall compositional variation of the gut microbiota;73 vi) significance tests were performed through an analysis of variance (ANOVA) with least-significant-difference (LSD) to examine whether differences among comparisons were significant or not. All statistical analyses were performed using the R software (R Foundation for Statistical Computing, Vienna, Austria).

Reporting summary

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