Introduction

Swine, a major meat-producing species and an important biological model for human health1,2, shares physiological traits, diseases, and gut microbiome characteristics with humans3. The gut microbiota plays a crucial role in maintaining swine health and supporting meat production4,5,6,7. It has been reported that feed efficiency influences growth performance, as well as protein and fat deposition, in relation to the pig gut microbiota8,9,10.

Significant progress has been made in studying the intestinal microbiota of swine using high-throughput sequencing. Differences in nutrition and gut physiology at various developmental stages may influence the porcine gut microbiome1,11. Despite the rapid expansion of this field, the precise relationship between the gut microbiome and animal growth performance remains unclear. The microbial communities in the gastrointestinal system of pigs are diverse and complex. It is estimated that the pig colon contains 1 × 1010 to 1 × 1011 bacteria per gram of intestinal material12.

Most studies have focused on the impact of feed additives, prebiotics, probiotics, and antibiotics on the gut microbiota. However, few fundamental investigations have examined host physiology in domesticated animals13. Since the growth stage is closely linked to the feeding systems, research on the relationship between gut microbiota and the growth stage in livestock is crucial.

Feed additives, including prebiotics and probiotics, are commonly used to enhance swine growth. A thorough understanding of gut microbiota dynamics throughout pig development is necessary to select appropriate feed additives for different growth stages. Although some researchers have identified a link between diet and growth stage in the pig gut microbiota13,14,15, additional studies are needed to generalize these findings.

Several research groups have previously investigated the pig gut microbiota with different focuses. One group examined several factors influencing pig gut microbiota, including age, breed, nutrition, and the impact of commensal microbes on the host’s biochemical and metabolic processes16,17. Other groups focused on in vitro models of piglet guts for developing and testing novel feed additives, as well as post-weaning diarrhea caused by gut microbial dysbiosis16.

The development of gut microbiota is significantly influenced by age11,18. When a newborn piglet comes in contact with its mother and environmental microbes, its gut microbiota begins to colonize. Infancy is a critical period for microbial colonization in pigs, as well as in other mammals, including humans. The maternal vaginal and fecal microbiota can seed the piglet’s gut microbiome during birth and early life19. Colonization is facilitated by piglets consuming colostrum and nursing the sow, leading to a milk-oriented microbiota20,21. During this period, the gut microbiota is established, and its structure remains highly susceptible to external environmental influences. Piglets in lactation exhibit lower microbial diversity than older pigs, making them more susceptible to disease and reducing their ability to efficiently digest nutrients before weaning15,22. Studies have highlighted the significant roles of maternal and environmental microbes in shaping the gut microbial composition of newborn piglets. During birth and in the early postnatal period, piglets are exposed to microbial populations from various sources, including the maternal microbiota, birthing environment, colostrum, and milk. These initial microbial exposures play a crucial role in seeding the gut microbiota and influencing its composition and function throughout a pig’s life. The gut microbiota affects nutrient metabolism and gut health while playing a vital role in immunological maturation and physiological functions. Early microbial colonization influences the development and maturation of the immune system, helping to establish immune tolerance, regulate inflammation, and defend against pathogens13,23,24,25,26,27,28,29. The weaning stage presents a unique opportunity to modify the gut microbiome. In most commercial swine operations, weaning occurs between 21 and 35 days (3 to 5 weeks) of age, when milk is replaced with a diet of less digestible components such as grains, resulting in an abrupt and highly stressful transition. During the growing-finishing stage, pigs consume significantly more feed, and their body weights increase dramatically. A stable gut microbiota can reduce the risk of infectious diseases while supporting optimal development.

The intestinal health of piglets is crucial for their overall health and growth. Various factors, such as maternal effects, diet, stress, and physiological conditions, can significantly influence the intestinal architecture, function, and microbial composition. Dietary, physiological, or psychological stressors can disrupt gut microbiota balance, leading to dysbiosis and an increased susceptibility to gastrointestinal disorders, such as severe diarrhea, which can be fatal in extreme cases20,30,31. Therefore, understanding the dynamic development of gut microbiota at each stage of a pig’s life is crucial for comprehensive nutritional and health assessments.

This study aimed to investigate the dynamic changes in the gut microbiota of piglets across the entire life cycle and the influence of maternal sources on the early microbial establishment of the piglet gut microbiota from birth. Fecal samples using rectal swab were collected from sows and their offspring at multiple developmental stages to analyze gut microbiota composition and its dynamic changes over time. Microbiome analysis was performed using MGIseq sequencing methods. We assessed gut microbiota composition, identified stage specific core microbiota, examined network interactions, and conducted functional metabolic predictions based on the Kyoto Encyclopedia of Genes and Genomes (KEGG) functional pathways32,33,34. The analysis covered the entire pig life cycle, including both sow and offspring microbiomes.

Results

Swine fecal microbial communities and dynamics with stage specific microbiota

Data from 709 microbial samples were analyzed. Fecal samples using rectal swab were collected from 30 sows after delivery (30 samples) and from piglets at four time points: day 5 (179 samples), day 35 (175 samples), day 80 (165 samples), and day 145 (160 samples) (Fig. 1a, Table S1). Mean relative abundances at the genus level taxonomic rank for pigs at different developmental stages (sow after delivery and piglets at days 5, 35, 80, and 145) revealed the dynamic distribution of gut bacterial microbiota across different ages (Fig. 1b).

Fig. 1
figure 1

Experimental design, microbial mean relative abundance in swine intestines and diversity of intestinal microbiota in pigs at different stages. (a) Experimental design and sampling time points. (b) Mean relative abundances at the genus level of taxonomy in pigs at specific stages (S0: sow stage following delivery; O1, O2, O3, and O4: piglets at days 5, 35, 80, and 145 following birth). (c) α-diversity indices (Chao1, Shannon, and Simpson) at various stages. Kruskal–Wallis test, followed by Wilcoxon rank-sum test, was used for statistical analysis of α-diversity. (d) Bray-Curtis dissimilarity based microbial β-diversity. Principal coordinate analysis (PCoA) plot of Bray-Curtis index comparing microbial communities at the five swine stages. ****P < 0.0001; ***P < 0.001.

We compared microbial richness, diversity, and evenness at various developmental stages, including the postpartum stage of the sow. Chao1 richness (****P < 2.2e-16), Shannon diversity (****P < 2.2e-16), and Simpson evenness (****P < 2.2e-16) were positively correlated with pig age (Fig. 1c; Table 1). In particular, microbial richness, diversity, and evenness were significantly lowest on day 5 and highest on day 80 compared to other specific stages.

Table 1 P-values of the Wilcoxon test for Chao1 richness, Shannon diversity, and Simpson evenness.

Principal coordinate analysis (PCoA) ordinations using the Bray-Curtis dissimilarity index (Adonis ***P < 0.001) showed significant differences among the five communities of swine (Fig. 1d).

Maternal effects on piglet fecal microbiota in the swine intestine

Permutational multivariate analysis of variance (PERMANOVA) results quantifying the differences (variance explained, R2) in overall microbiota composition explained by sow/piglet per niche at each time point. Higher R2 values implied that microbiota compositions between piglets and sows explain more variance for a given niche at a given time point (O1, 12%; O2, 7.69%; O3, 16.67%; O4, 18.66%, respectively) (Fig. 2a).

Fig. 2
figure 2

Maternal microbial effects. (a) PERMANOVA results quantifying the differences (variance explained, R2) in overall microbiota composition by sow/piglet per niche at each time point. Higher R2 values indicate that differences between piglets and sows explain more variance for a given niche at a given time point. (b) Venn diagrams showing the S0 (postpartum stage of the sow) and O1 (5 day old) stage core microbiota (75% sample prevalence). (c) Donut charts demonstrate the relative abundance of the top 15 genera. P-values were generated using a permutation test. ***P < 0.001.

Venn diagrams illustrated the core microbiota (75% prevalence of samples in each specific stage) for the S0 and O1 stages to investigate maternal effects. The three most abundant taxa identified as shared genera for the S0 and O1 stages were Escherichia-Shigella, Bacteroides, and Fusobacterium (Fig. 2b, Table S2). Based on this core microbiome analysis, we examined their relative abundances across various stages. Escherichia-Shigella (S0, 12%; O1, 26%; O2, 10%; O3, 2%; O4, 2%), Bacteroides (S0, 10%; O1, 16%; O2, 9%; O3, 5%; O4, < 1%), and Fusobacterium (S0, 4%; O1, 6%; O2, 1%; O3, 1%; O4, < 1%) were highly abundant in both the S0 and O1 microbial communities but their levels declined markedly in the later growth stages (Fig. 2c). The heatmap for core microbiota analysis of specific stages indicated that Escherichia-Shigella, Bacteroides, and Fusobacterium were among the most abundant genera in the S0 and O1 stages (Supplementary Fig. 1). Escherichia-Shigella and Bacteroides remained among the top five most abundant genera in the O2 stage, but Fusobacterium was no longer a top abundance genus in the O2 stage (Fig. 3c).

Fig. 3
figure 3

Stage specific core microbiota of bacterial genera in the pig gut. (a) Experimental design (b) Venn diagrams showing the different growth stages core microbiota distributions (75% sample prevalence). (c) Heatmap displays the relative abundance of the main bacterial genera in the pig gut at specific stages.

Growth stage specific shifts in swine fecal microbiota

Venn diagrams illustrated the shared genera, which were present in at least 75% of samples within each growth stage. However, under a strict definition, genera consistently shared across all growth stages did not exist, given the dynamic distribution of the pig gut microbiota throughout development (Fig. 3b, Table S3). Heatmap analysis further displayed the relative abundance of the main bacterial genera at each specific growth stage, highlighting stage dependent enrichment patterns (Fig. 3c). The dynamic distribution of dominant bacterial genera across the different growth stages was further depicted. Line charts (Fig. 4a) showed temporal trends in the relative abundance of the top 15 genera, while box plots (Fig. 4b) provided a quantitative comparison of these genera across stages. Additionally, radar charts (Fig. 4c) summarized the top five genera, emphasizing the shifts in microbial composition that occurred as pigs progressed through lactation, nursery, and growing-finishing phases (Fig. 4).

Fig. 4
figure 4

Dynamic distribution of the main bacterial genera at various specific stages. (a) Line chart demonstrate the relative abundance of the top 15 genera and (b) Box plot demonstrate the relative abundance of the top 15 genera (c) Radar chart demonstrates the relative abundance of the top 5 genera.

Network analysis in the genus level of stage specific microbial communities

We conducted a network analysis based on Spearman rank correlation at the genus level of stage specific microbial communities (Supplementary Fig. 2) The strongest network was built at the S0 stage with 540 nodes and 16,416 edges. For the O1 stage, the network consisted of 455 nodes and 3308 edges; for the O2 stage, it consisted of 486 nodes and 4370 edges; for the O3 stage, it had 445 nodes and 3576 edges; and for the O4 stage, it contained 343 nodes and 5855 edges (Supplementary Fig. 2).

KEGG functional pathways at various specific stages

We predicted functional pathways at various specific stages using PICRUSt. Functional pathway analyses were visualized as principal component analysis (PCA) plots and extended error bar plots using STAMP software (Fig. 5a, Supplementary Fig. 3a). The PCA plot for functional pathway prediction data showed greater differences depending on age (Fig. 5a). The extended error bar plot for functional pathway prediction data comparing S0 and O1 showed that LACTOSECAT-PWY (lactose and galactose degradation pathway) significantly higher level in the intestinal microbiota of the 5 day old piglets (O1) than sows (Supplementary Fig. 3b). We performed LEfSe analysis of KEGG pathways which revealed significant differences between specific stages (Fig. 5b, Supplementary Fig. 4a, and Table S6, ****P < 0.0001). The LEfSe data showed that the HEMESYN2-PWY (Heme biosynthesis pathway), which supports pregnancy maintenance, was predicted at significantly higher levels in the intestinal microbiota of the postpartum stage of the sow (S0, Supplementary Fig. 4). In contrast, breast milk and dairy digestion related pathways, including LACTOSECAT-PWY (lactose and galactose degradation I), GLUCUROCAT-PWY (superpathway of β-D-glucuronide and D-glucuronate degradation), PWY-6901 (superpathway of glucose and xylose degradation), GALACT-GLUCUROCAT-PWY (superpathway of hexuronide and hexuronate degradation) were predicted at significantly higher levels in the intestinal microbiota of the 5 day old pigs (O1, Fig. 5b-c, Supplementary Fig. 3b, Supplementary Fig. 4). Energy metabolism and protein synthesis related pathways including SER-GLYSYN-PWY (superpathway of L-serine and glycine biosynthesis), and PWY0-1061 (superpathway of L-alanine biosynthesis) were predicted at significantly higher levels in the intestinal microbiota of the growing-finishing stage pigs (O3 and O4, Fig. 5b and d-e).

Fig. 5
figure 5

PICRUSt functional pathway analysis in pig gut microbiota at specific stages. (a) Principal component analysis (PCA) plots showing stage specific functional pathway predictions of swine intestinal microbiota. (b) LEfSe analysis of PICRUSt functional pathway in pigs at specific stages. Stage specific functional pathway prediction of swine intestinal microbiota at various specific stages using linear discriminant analysis effect size (LEfSe) analysis (Linear Discriminant Analysis [LDA] score > 3). (c-e) Relative abundance of functional pathway composition of swine microbial communities at various specific stages: (c) PWY-6901, (d) SER-GLYSYN-PWY, and (e) PWY0-1061. Statistical analysis was performed using the Kruskal–Wallis rank sum test. ****P < 0.0001.

Correlations between bacterial genera and KEGG functional pathways and interpathway correlation

We performed a Spearman correlation analysis to examine the associations between bacterial genera and KEGG functional pathways at the genus level, based on PICRUSt and LEfSe functional analyses. For the heatmap correlation analysis, all 709 samples and their OTUs from sows and their offspring piglets were used. This analysis examines the associations between key pathways identified at each developmental stage through LEfSe analysis and their corresponding bacterial genera. Escherichia-Shigella showed the strongest correlation with PWY-6629 (superpathway of L-tryptophan biosynthesis). Additionally, lactose degrading genera such as Bacteroides, Enterococcus, and Streptococcus exhibited strong correlations with LACTOSECAT-PWY (lactose and galactose degradation I), among which Streptococcus, known to carry the lac operon and used in dairy fermentation, showed the highest association (Fig. 6).

Fig. 6
figure 6

Spearman correlation heatmap between the bacterial community and 19 KEGG functional pathways at the genus level. (a) Heatmap showing Spearman correlation coefficients between bacterial genera and 19 KEGG functional pathways at the genus level. (b) Table describing the identified 19 KEGG functional pathways based on PICRUSt and LEfSe functional analyses. Statistical significance: ***P < 0.001, **P < 0.01, *P < 0.05, P < 0.1.

Meanwhile, Butyricicoccus, Parabacteroides, Ruminiclostridium, Ruminococcus, Blautia, Prevotella, Alloprevotella, and Eubacterium were significantly associated with the PWY-7208 (superpathway of pyrimidine nucleobases salvage) and SER-GLYSYN-PWY (superpathway of L-serine and glycine biosynthesis I), all enriched in the O3 stage (Fig. 6).

Campylobacter and Acinetobacter, known to harbor the HEMESYN2-PWY gene cluster (hemA–hemH), exhibited significantly correlations with the HEMESYN2-PWY (heme biosynthesis II), which was enriched in the SO stage (postpartum sows) (Fig. 6). Furthermore, Campylobacter, Acinetobacter, Psychrobacter, Chryseobacterium, and Pseudomonas were highly correlated with the PWY-3781 (aerobic respiration I), REDCITCYC (TCA cycle VIII), and PWY0-1061 (superpathway of L-alanine biosynthesis), all of which were enriched in the O4 stage (Figs. 6 and 7a). Through interpathway correlation analysis based on 19 KEGG functional pathways from PICRUSt and LEfSe functional analyses, we identified a strong association between the HEMESYN2-PWY/heme biosynthesis II (anaerobic) which was enriched in the S0 (postpartum sows) stage and the PWY-3781 (aerobic respiration I), REDCITCYC (TCA cycle VIII), and PWY0-1061 (superpathway of L-alanine biosynthesis), all of which were enriched in the O4 stage. Additionally, pathways enriched in the O1 stage showed strong correlations with other pathways within the same O1 stage. (Fig. 7b).

Fig. 7
figure 7

Spearman correlation matrix between bacterial genera and KEGG functional pathways and interpathway correlation analysis. (a) Spearman correlation matrix showing correlations between the top 10 bacterial genera and 19 KEGG functional pathways. (b) Interpathway correlation analysis based on 19 KEGG functional pathways derived from PICRUSt and LEfSe functional analyses. The strongest positive (r = 1) and negative correlations (r = − 1) are shown in red and blue, respectively.

Discussion

In our study, sequencing data provided valuable insights into how maternal sources and age influence the early microbial establishment and dynamics of the pig gut microbiota. Early gut microbiota colonizers are essential for establishing a mature microbial community, ultimately influencing the health and productivity of pigs. Despite growing research on pig gut microbiota, few studies have examined the early development of piglet gut microbiota and even fewer have systematically identified maternal effects during early life19,35. To address this gap, we conducted a large scale study investigating the influence of maternal sources on the early microbial establishment of the piglet gut microbiota from birth. Additionally, we analyzed the dynamic changes in microbiota composition, network interactions, and metabolic functions across piglet development, including the postpartum stage of the sow. Early in life, during the lactation stage (O1, Day 5), Escherichia-Shigella23,36,37,38, Bacteroides23,24,25,31,37,38, and Fusobacterium25,31,36,37,39 were core microbiota in piglet gut microbiota. Our findings highlighted the critical impact of maternal fecal microbiota on piglet gut composition, which was associated with a higher transfer rate of Escherichia-Shigella, Bacteroides, and Fusobacterium. Specifically, Bacteroides is linked to the utilization of oligosaccharides in milk23,40,41,42. Surprisingly, this study revealed that not only Bacteroides, a key genus involved in breast milk digestion, but also Escherichia-Shigella and Fusobacterium, previously believed to originate from the environment, actually originate from the sow19,43. These findings align with previous reports suggesting that mothers may influence transmission of specific taxa to maintain pregnancy and transmit them to their offspring. However, unlike the potentially beneficial genus Bacteroides, which is enriched and transmitted to support offspring survival, further research is needed to understand why Escherichia-Shigella and Fusobacterium, genera with potentially adverse implications, are specifically increased in sows but not in other adult pigs. Higher R² values indicate that differences in microbiota composition account for more variance in microbial community structure within a given niche at a specific time point. The microbiota of piglets at the nursery stage (O2, Day 35) was most similar to that of sows, with a similarity of 92.31%. The lactation stage (O1, Day 5) showed the second highest similarity at 88%. As piglets aged, the similarity decreased, with O3 (Day 80, growing period) at 83.33% and O4 (Day 145, finishing period) at 81.34%. This suggests that maternal seeding plays a key role in early life, but its influence diminishes over time as the microbiota matures with piglet growth. As piglets transitioned from a milk-based diet to a solid feed post-weaning, the composition of gut microbiota changed. Prevotella becomes dominant as piglet transition to solid feed, aiding gut microbiota adaptation by degrading complex carbohydrates. Other genera, such as Blautia24,26,38,40, Ruminococcus24,25,31,36, Coprococcus25,36, and Treponema36, also increase post-weaning, while Bacteroides, Fusobacterium, and Escherichia-Shigella decline. Weaning, the most stressful period for piglets, triggers a major shift in gut microbiota, impacting growth and immunity44,45,46. Early colonization by Prevotella and Blautia26 enhances glycan digestion and supports adaptation to a carbohydrate-rich diet47,48,49. Prevotella also promotes intestinal health through SCFA production50 and negatively correlates with E. coli infections51. As pigs mature, microbial diversity stabilizes, with Prevotella playing a key role in nutrient metabolism, immune modulation, and gut health20,23,26,37,48,51,52,53,54.

As pigs age, other bacteria, including Ruminococcus, Alloprevotella, Acinetobacter, Myroides, Parabacteroides, Psychrobacter, Rikenellaceae RC9, Treponema, and Sphaerochaeta became more dominant in the gut during the growing-finishing period. During this phase, the significant increase in feed intake and body weight is accompanied by a stable gut microbiota, which helps reduce the risk of intestinal infections while supporting optimal development. However, further research is needed to fully understand the structure and function of the gut microbiota in relation to the host, particularly its physiological, nutritional, and immunological contributions.

The observed differences in α-diversity among lactation, nursery, growing, and finishing pigs, as well as the postpartum stage of the sow, indicate variations in microbial richness, diversity, and evenness across developmental stages. Microbial diversity was lowest on Day 5, likely reflecting the early microbial establishment of the gut microbiota in neonatal piglets. As the pigs matured, microbial richness, diversity, and evenness increased, peaking at Day 80, This trend likely reflects the maturation and stabilization of the gut microbiota over time, as pigs are exposed to a broader range of environmental factors, dietary substrates, and microbial interactions. β-diversity analysis revealed shifts in microbial community composition across the five specific stages, indicating distinct microbial signatures associated with each stage of pig development. These shifts likely result from changes in diet, physiology, and environmental exposure as pig transition between growth stages. Additionally, the identification of stage specific core microbiota provides valuable insights into stable microbial communities and dynamic changes occurring at different stages. While the core microbiome represents a set of microbial taxa consistently present across individuals within a species or population, the stage specific core microbiota consists of microbial communities associated with particular developmental stages. Characterizing core and stage specific microbiota in the swine gut offers potential targets for therapeutic or nutritional interventions aimed at modulating the gut microbiota to improve pig health and productivity at different growth stages11.

Our research advances the understanding of the dynamic changes in pig gut microbiota at specific stages and provides insights into bacterial community profiles, aiding in the development of an optimum microbial composition and the identification of potentially beneficial microorganisms.

In this study, we investigated the network of stage specific microbiota to understand the potential functionality of stage specific microbes. We found that the strongest network was built within the sow’s microbiome communities, suggesting that the sow is preparing to transfer/seed her microbiome to the offspring. The network of sows immediately after birth is at least three times stronger than that of finishing stage pigs, and up to five times stronger than that of piglets. This data provides potential evidence that the microbiome undergoes significant changes in sows to support pregnancy maintenance and ensuring safe delivery.

Understanding the functional contribution of a microbial community to host physiology and health is crucial for understanding environmental interactions, nutritional processing and metabolism, immune system modulation, pathogen protection, disease prevention and management, development, and growth. We investigated the KEGG based functional metabolic pathways of stage specific microbes using PICRUSt. Functional pathway prediction data comparing S0 and O1 stages revealed that the LACTOSECAT-PWY (lactose and galactose degradation I) was significantly more active in the intestinal microbiota of 5 day old piglets than in sows. Despite both sows and piglets exhibiting a high abundance of Bacteroides, this suggests that the overall microbial community structure and interactions play a crucial role in shaping the functional potential of the gut microbiome, rather than the mere abundance of specific species.

We investigated LEfSe analysis of the KEGG pathways. In newborn piglets (5 day old pigs), metabolic pathways were primarily focused on breast milk and dairy digestion, including LACTOSECAT-PWY (lactose and galactose degradation I), GLUCUROCAT-PWY (superpathway of β-D-glucuronide and D-glucuronate degradation), PWY-6901 (superpathway of glucose and xylose degradation), GALACT-GLUCUROCAT-PWY (superpathway of hexuronide and hexuronate degradation). Energy metabolism and protein synthesis pathways were predicted to be significantly more active in the intestinal microbiota of growing-finishing pigs, as they experience substantial body weight increases during this period.

The LEfSe functional data suggest potential microbiota-host interactions. The LEfSe analysis of functional pathways based on microbial community data confirmed that abundance data alone provide only fragmentary knowledge. To gain a deeper understanding of metabolic functionality, it is necessary to consider complex factors such as the specific functions of each taxon, microbiota networks, and their interactions and relationships. Furthermore, this study investigated the associations between metabolic functional pathways and bacterial genera, as well as the interrelationships among metabolic functional pathways. Through this analysis, we explored how computational microbiome data can provide insights into biologically active pathways. Our findings revealed that the heme biosynthesis pathway, a metabolic pathway closely related to pregnancy maintenance in sows, was predicted to increase in postpartum sows. Moreover, this increase was significantly correlated with the presence of Acinetobacter and Campylobacter, which are known to harbor the HEMESYN2-PWY gene cluster (hemA–hemH). In the O1 stage (lactation stage), Escherichia-Shigella and Enterococcus showed significant associations with the PWY-6629 (superpathway of L-tryptophan biosynthesis), which is directly involved in the metabolic processes responsible for synthesizing L-tryptophan, an essential amino acid required for protein and neurotransmitter production. These findings may provide a potential clue as to why sows transfer Escherichia-Shigella to their piglets. Previous studies have reported that Escherichia-Shigella contributes to tryptophan production55, and the biological pathways related to tryptophan are not only crucial for protein synthesis but also play a key role in neurotransmitter biosynthesis. Bacteroides was closely linked to the GLCMANNANAUT-PWY (superpathway of N-acetylglucosamine, N-acetylmannosamine, and N-acetylneuraminate degradation) and Streptococcus exhibited strong correlations with the LACTOSECAT-PWY (lactose and galactose degradation I), which is known to carry the lac operon and is used in dairy fermentation; both pathways have been directly and indirectly implicated in breast milk and dairy digestion. These findings suggest that computational microbiome analysis can provide extensive data on biological activity, enabling prediction and hypothesis generation before conducting wet-lab experiments or on-farm validation studies. Notably, we identified that potentially beneficial genera involved in energy metabolism, such as Butyricicoccus, Parabacteroides, Ruminiclostridium, Ruminococcus, Blautia, Prevotella, Alloprevotella, and Eubacterium were significantly correlated with PWY-7208 (superpathway of pyrimidine nucleobases salvage) and SER-GLYSYN-PWY (superpathway of L-serine and glycine biosynthesis I) which were all enriched in the O3 stage (growing period). Additionally, interpathway correlation analysis revealed that metabolic pathways within each stage were highly interconnected, suggesting that they operate in a coordinated and dynamic manner.

Previous research has investigated the functional characteristics of the swine gut microbiome through metagenomic or predictive methods, identifying important metabolic pathways associated with growth and health. However, these studies were often limited in their ability to longitudinally track maternal microbial transmission and the developmental succession of the microbiome across large and well defined animal cohorts, which are critical for capturing the natural variation and dynamics of microbial communities. Moreover, many of these studies were conducted over a relatively short period, typically covering only the lactation to weaning or nursery stages, and focused solely on piglets rather than on the mother-offspring connection13,19,26,49,56,57. Our study addresses these limitations by conducting a comprehensive longitudinal analysis involving a substantial cohort of 30 sows and their 179 piglets, allowing us to robustly investigate maternal microbial transmission and the dynamic changes in microbial functions throughout the entire life cycle. This large scale, well characterized cohort provides a more detailed understanding of microbial succession and maternal influences on the swine gut microbiota, offering new insights beyond those available from previous cross sectional studies.

Overall, this study provides foundational computational data on the relationships between metabolic functional pathways and bacterial genera, as well as the interconnections among pathways, offering insights into how well computational microbiome analyses reflect actual biological processes. However, the study relies on PICRUSt2-based functional predictions derived from 16S rRNA data, which, while informative, cannot confirm actual microbial activity. Therefore, future validation using metagenomics and metabolomics is warranted. Moreover, integrating in silico analyses with on farm demonstration trials such as microbiome profiling and blood metabolite analysis following probiotic supplementation in swine production will be crucial for assessing the concordance between computational predictions and real biological activity. Such integration is expected to yield valuable insights for advancing applications in the swine industry.

Conclusions

Our study successfully elucidated the dynamic changes in porcine fecal microbiota across various specific stages including the postpartum stage of the sow and each growth stage revealing complex patterns of stage specific microbiota functions demonstrated that maternal microbiota transfer plays a key role in seeding piglets’ microbiota, contributing to their early microbial establishment and shaping microbial communities.

Therefore, precise nutritional strategies, including prebiotics and probiotics treatments, should consider the maternal microbiota effects and dynamic shifts in gut microbiota composition across specific growth stages and to optimize microbial communities for improved host health and performance. Achieving this requires a comprehensive understanding of host-microbe interactions, including the potential functional and physiological roles of specific microbial taxa in influencing the host phenotype. Further research is needed to elucidate these roles and to develop targeted nutritional strategies, including stage specific probiotic treatments for pigs. Integrating advanced technologies such as metagenomics, metatranscriptomics, metabolomics, and systems biology can deepen our understanding of host-microbiota interactions and support the development of precision nutrition strategies tailored to individual pig requirements. By mapping microbiome shifts and analyzing metabolic functional pathways across the entire life cycle of pigs, this research provides deeper insights into intestinal health at specific developmental stages and enhances our understanding of host-microbe interactions in the swine industry.

Methods

Ethics statement and animal rearing, feeding, and sampling procedures

This study was conducted using a total of 209 Duroc pigs. All experimental procedures involving animals were reviewed and approved by the Institutional Animal Care and Use Committee (IACUC) of the National Institute of Animal Science (NIAS), Republic of Korea (approval number: NIAS 2020 − 479). Animal care and handling were performed in strict accordance with the guidelines established in the Guide for the Care and Use of Laboratory Animals (NIAS). All pigs were housed at the NIAS experimental farm under standardized environmental and management conditions. Each pig was provided with a minimum floor space of 1 m², housed on solid concrete flooring in a semi-controlled environment. Animals were fed ad libitum with constant access to clean drinking water through nipple drinkers. The diet was based on corn, soybean meal, and wheat, formulated to meet or exceed nutrient requirements, providing 3,400 kcal/kg of metabolizable energy and 18–22% crude protein. Piglets remained with their dams for the first 30 days after birth and were suckled. Preweaning feed was provided alongside nursing starting on Day 10. Weaning was performed at Day 30 using the abrupt weaning method. Based on growth stage, piglets were categorized into the lactation phase (Day 1–30), nursery phase (Day 31–70), and growing–finishing phase (Day 71–end; Fig. 3a), with stage specific diets provided accordingly. All diets were purchased from a commercial feed company (Heungseong Feed Co., Ltd., Korea), and the nutrient compositions for each stage are detailed in Supplementary Table 7. The same feeding regimen was applied uniformly across all animals. Animal husbandry practices, performance testing, and phenotypic trait measurements were carried out according to the standardized protocols of the Korean Animal Improvement Association. For microbiome analysis, a total of 709 rectal swab samples were collected from the 209 pigs at multiple time points, using sterile swabs following aseptic procedures to minimize contamination and animal stress. This study adhered to the ARRIVE guidelines (https://arriveguidelines.org/) to ensure transparent and comprehensive reporting of animal research, with all efforts made to reduce animal suffering.

DNA extraction

DNA was extracted from 709 rectal swab samples using the ARA MagNA Plant DNA Isolation Kit (LAS, Korea). Each rectal swab sample (200 µl) was transferred to a 2 ml tube containing 20 µl of proteinase k (40 mg/ml) and 0.3 ml of PL1 lysis buffer (LAS, Korea). The samples were rotated with vibration for 10 min before being centrifuged at 12,000 g for 2 min to pellet debris. After centrifugation, 0.4 ml of the supernatant was mixed with 0.4 ml of PB2 binding buffer (LAS, Korea) and 20 µl magnetic beads. DNA extraction was performed according to the manufacturer’s instructions. The extracted DNA samples were stored at − 20 °C until further use.

Library Preparation and sequencing

A 16S rRNA sequencing library was constructed targeting the V3 and V4 hypervariable regions of the 16S rRNA gene. PCR amplification was performed using KAPA HiFi HotStart ReadyMix (KAPA Biosystems, USA), and purification of PCR products was carried out using ARAClean Beads (LAS, Korea). The initial PCR was conducted using template DNA with region-specific primers compatible with the MGI index and sequencing adapters (forward primer: 5′-GGCTCACAGAACGACATGGCTACGATCCGACTTCCTACGGGNGGCWGCAG-3′; reverse primer: 5′- TTGTCTTCCTAAGACCGCTTGGCCTCCGACTTGACTACHVGGGTATCTAATCC-3′). After the purification of PCR products with magnetic beads, a second PCR was performed using primers from an MGIEasy UDB Primers Adapter Kit A (MGI, Shenzhen, China) with a limited number of cycles. The purified PCR products were then visualized via gel electrophoresis and quantified using a Qubit dsDNA HS Assay Kit (Invitrogen, USA) on a Qubit 4.0 fluorometer. The library was further circularized using the MGIEasy Dual Barcode Circularization Module (MGI, China). The pooled library was incubated at 37 °C for 30 min for circularization, followed by digestion at 37 °C for another 30 min, after which the circularization products were cleaned up. To generate a DNA nanoball (DNB), the library was incubated at 30 °C for 15 min with a DNB enzyme. Finally, the library was quantified using a Qubit ssDNA HS Assay Kit (Invitrogen, USA). Sequencing of the performed on the MGIseq system (MGI, China) with 300 bp paired-end reads.

Sequencing bioinformatics and Microbiome analysis

The QIIME258 DADA2 package (version 2019.4.0)59 was used to denoise paired-end sequences, dereplicate them, merge forward and reverse reads, and filter chimeras. Clustered sequences were classified using QIIME2 scikit learn (version 2019.4.0)60 with a pre-trained classifier. Multiple sequence alignment was performed using QIIME2 MAFFT (version 2019.4.0)61.

Downstream data analysis was performed in the R statistical environment62 using a combination of custom scripting with the microbiome, phyloseq, vegan, ggplot2, and microeco packages.

Taxa abundances were normalized using the total sum scaling normalization method, where each amplicon sequence variant count was divided by the total library size to obtain the relative proportion of counts for each sample. Relative abundance was analyzed using the phyloseq (version 1.46.0)63 and microbiome (version 1.24.0) packages in R64.

α-diversity was assessed using the phyloseq package in R. β-diversity, which measures the dissimilarity of the microbial community composition between samples and, was characterized using the Bray-Curtis index. A PCoA plot was used to visualize Bray-Curtis dissimilarity among samples. Core microbiota analysis was performed using the microbiome package in R.

Spearman’s correlations analysis was conducted at the genus level to explore associations among stage specific microbial communities. Spearman correlation (P < 0.05) was performed in R, and the correlation network was visualized using Gephi software65.

We also predicted functional profiles of the microbial communities from our 16S rRNA gene data using PICRUSt66. STAMP v.2.1.367 was used to visualize functional pathway analyses, producing PCA plots and extended error bar plots. The Microeco package (version 1.7.1)68 in R was used for the analysis and visualization of relative abundance, LEfSe analysis, and PICRUSt functional pathway visualization.

Statistical analysis

The R statistical software was used for further statistical analyses, primarily utilizing the vegan package. Statistical analysis of α-diversity indices among groups was performed using the Kruskal–Wallis test69, while the Wilcoxon rank-sum tests were used for pairwise comparisons between groups70. Differences in β-diversity were assessed using the PERMANOVA test, implemented with the Adonis function in the vegan package of R (version 2.6-4)71, with 999 permutations. Normality was tested using the Shapiro–Wilk test. The non-parametric Kruskal–Wallis test, followed by Wilcoxon rank-sum test, was used to examine significant differences in microbial taxa between different stages.