During the weaning period, piglets face several stress factors owing to either physiological changes or farm management. Physiological changes include (1) loss of protective sow’s milk immune cells, lactoferrin and lysozyme, (2) the presence of probiotic lactic acid bacteria, and (3) the shrinkage of villi in the small intestine, which reduces nutrient digestion and absorption1,2,3. The new environment due to farm management includes being transferred from a farrowing pen to an early-weaning unit, being mixed with unfamiliar pigs, and feed changes from highly digestible milk protein and sugars to creep feed and complex solid feed4. All of these factors can impair immune functions and lead to post-weaning diarrhoea syndrome (PWDS), resulting in diarrhoea, dehydration, depression, inappetence and weight loss. PWDS is usually associated with enterotoxigenic Escherichia coli strains (ETEC)5. The severe enteric infections might lead to the overuse of antibiotics. Imbalance of the normal gut microbiota in pigs has been reported to be associated with enteric diseases such as PWD and with the flare up of pathogens even not in the gastrointestinal tract system such as Mycoplasma hyopneumoniae6,7. The enhancement of gut microbiome ability to increase disease resistance in pigs and reduce antibiotic use are the major challenges in pig industry. Several nonantibiotic alternatives have been applied to decrease gut microbiota dysbiosis in pig industry such as zinc supplements, essential oils, short- and medium-chain organic acids, prebiotics and probiotics8,9,10,11.

In fact, several probiotic microorganisms are commonly used to inhibit bacterial infection such as Lactobacillus plantarum, Bacillus licheniformis and Bacillus subtilis. L. platarum, normal flora in porcine gastrointestinal tracts, has been reported to induce endogenous antimicrobial peptide synthesis in weaning piglets and improve pig growth and pork quality12,13. Pigs that received a probiotic-containing Bacillus licheniformis were shown to reduce porcine epidemic diarrhea virus infected vero cells14. In addition, a probiotic‐containing Bacillus licheniformis and Bacillus subtilis spores could improve productive performance and carcass quality in pigs15. However, probiotic microorganisms such as Enterococcus faecium and B. subtilis might serve as a reservoir for antimicrobial resistance (AMR) determinants16,17. Subtherapeutic antibiotics have been widely used to improve growth performance and food efficiency of weaned piglets. Low-dose chlortetracycline (0.5–1 g/sow daily) was used to increase breeding, conception rate, farrowing rates and litter size in sows18. Nonetheless, antimicrobial growth promoters can promote AMR strains of both Gram-positive and Gram-negative bacteria19. The utilization of antibiotics as growth promoters has been totally banned in the European Union since January 1, 200620. In Thailand, utilization of antibiotics as growth promoters in food animals is banned21,22. In fact, antimicrobial prophylaxis at therapeutic doses has been generally used on commercial farms for a short time period to treat and prevent bacterial infection during parturition and weaning. These chemicals might cause antibiotic selective pressure and lead to bacterial genome evolution, allowing AMR variants to survive and multiply and disturbing gut microbial balance23. AMR of several antimicrobials has been reported in weaned pigs (from 0 to 28 days post-weaning), receiving chlortetracycline at a therapeutic dose and penicillin at a metaphylactic dose24. Resistant bacteria play an important role not only in pig health management but also in human health as AMR could be passed to human via direct contact or as a consumer25. Since environment can also be a reservoir for AMR resistome and maintain AMR genes, the ‘One Health’ approach to AMR surveillance in humans, animals and environments is required, not only at the laboratory level but also at the epidemiological, clinical and population levels26.

The objective of this study is to characterize the effect of weaning on the alteration of gut microbiome communities and AMR determinants in 24 commercial piglets (Landrace × Large White × Duroc Jersey) at day 3 pre-weaning (D. − 3), weaning day (D.0), days 3 (D.3) and 8 post-weaning (D.8) from 3 sows, using whole-genome shotgun sequencing.


Microbiome diversity and abundance

The Shannon diversity index showed no statistical difference of the microbiomes across weaning ages (Supplementary Fig. S1). Across the entire cohort of samples, the relative abundance of Bacteroidetes and Firmicutes constituted approximately 80% of all bacteria phyla (Fig. 1, Table 1). Bacterial beta diversity demonstrated a major shift in the gut bacterial community during suckling–weaning transition. PCoA of taxonomy demonstrated that community composition on D.8 (post-weaning) differed from that of the other sampling days (Fig. 2A). Adonis confirmed that the community composition was predominantly associated with weaning age and diet (P < 0.01) (Table 2). Relative abundance at the genus level is shown in Table 3 and Supplementary Table S1. Alistipes was markedly high at D. − 3, whereas Bacteroides and Parabacteroides were prominently enriched at D. − 3–D.3 (P < 0.05). Prevotella and Treponema were more abundant at D.8 compared with D. − 3–D.3 (P < 0.05).

Figure 1
figure 1

Stacked bar plot showing taxonomic relative abundance distribution of fecal microbial communities at the phylum level of piglets, with samples sub-categorized by maternal litter and age at day 3 pre-weaning (D. − 3), weaning day (D.0), days 3 (D.3) and 8 post-weaning (D.8).

Table 1 The relative abundance of phyla in piglets at day 3 pre-weaning (D. − 3), weaning day (D.0), days 3 (D.3) and 8 post-weaning (D.8).
Figure 2
figure 2

Principal coordinates analysis (PCoA) plot of antimicrobial resistance determinants obtained from piglets at day 3 pre-weaning (D. − 3), weaning day (D.0), days 3 (D.3) and 8 post-weaning (D.8). The oval shows a D.8 sample group that is separated from. D. − 3–D.3 groups. Taxonomic abundance (A). AMR gene abundance (B). Beta diversity group significance: P value = 0.001, PERMANOVA, 999 permutations.

Table 2 Adonis results for gut microbiome in piglets from day 3 pre-weaning to day 8 post-weaning.
Table 3 Relative abundances of the 10 most abundant genera in each piglet group at day 3 pre-weaning (D. − 3), weaning day (D.0), days 3 (D.3) and 8 post-weaning (D.8).

AMR determinant diversity and abundance

The top three abundant antimicrobial drug resistance patterns were aminoglycoside (AMG), tetracycline and macrolide-lincosamide-streptogramin (MLS), followed by multidrug resistance (MDR), β-lactam and phenicols (Table 4). D.8 showed a distinct PCoA cluster from other ages (Fig. 2B). A high abundance of AMR determinants observed on at least 2 days during D. − 3–D.3 conferred resistance to AMG, including sat, aac(6′)-aph(2″), aadA and acrF, resistance to β-lactam, including fus-1 (oxa-85), cepA and mrdA, resistance to MDR, including gadW, mdtE, emrA, evgS, tolC and mdtB, resistance to phenicol, including catB4 and cmlA4, and resistance to sulfonamide, including sul3. In contrast, a higher abundance of AMR determinants conferring resistance to MLS, mefA, resistance to β-lactam, cfxA6 and aci1, and resistance to phenicols, rlmN, was observed at D.8 (Supplementary Table S2).

Table 4 Percent of fragments per kilobase of exon model per million reads mapped (FPKM) of antimicrobial drug resistance patterns in piglets at day 3 pre-weaning (D. − 3), weaning day (D.0), days 3 (D.3) and 8 post-weaning (D.8).

Inter-relationships between abundance profiles of member taxa and AMR sequence

According to the CCA plots, highly abundant AMR genes possibly correlated with E. coli on at least 2 days during D. − 3–D.3 compared with D.8, including AMG (aac(6')-aph(2'')), MDR (emrA and mdtB), and phenicol (cat4B and cmlA4) resistance patterns. In contrast, AMR gene abundances possibly correlated with Prevotella at D.8 were in MLS (mefA) and β-lactam (cfxA6 and aci1) resistance patterns (Fig. 3, Supplementary Table S3).

Figure 3
figure 3

Canonical correlation analysis (CCA) plot showing the distribution of piglets at day 3 pre-weaning (D. − 3), weaning day (D.0), days 3 (D.3) and 8 post-weaning (D.8). Microbiome genera and antimicrobial resistance (AMR) genes according to corresponding antimicrobial drug resistance patterns. CCA plot showing inter-relationships between taxon abundance profiles and AMR sequences over all 96 samples (A). CCA plot of AMR genes corresponding to aminoglycoside drug resistance pattern (B). CCA plot of AMR genes corresponding to multidrug resistance pattern (C). CCA plot of AMR genes corresponding to phenicol drug resistance patterns (D). CCA plot of AMR genes corresponding to macrolide, lincosamide and streptogramin resistance (MLS) patterns (E). CCA plot of AMR genes corresponding to β-lactam resistance patterns (F). Blue circles indicate high abundant genes correlated with Escherichia or Prevotella. Red circles indicate Escherichia (G13) and Prevotella (G26). AMR genes (A) rpoB2 (2), parYR (47), tet(Q) (56), tet(32) (75), tet(O/W) (77), tet(W/32/O) (79), tet(W) (85), tet(O/W/O) (86), tet(W/N/W) (87), ABC transporter gene (157), aac(6')-aph(2'') (167), tet(40) (252), mefA (257), mef(En2) (267), cfxA6 (455), aad(6) (541), bifunctional aminoglycoside modifying enzyme gene (571), hygromycin-B kinase gene (526), aadE (658), isaE or putative spectomycin adenyltransferase gene (817), ermF (842), aphA3 (857), dam (919), sat4 (1160); Genus: Alistipes (G1), Anaeromassilibacillus (G2), Anaerotruncus (G3), Bacteroides (G4), Blautia (G5), Butyricicoccus (G6), Butyricimonas (G7), Chlamydia (G8), Cloacibacillus (G9), Clostridium (G10), Culturomica (G11), Desulfovibrio (G12), Escherichia (G13), Eubacterium (G14), Faecalibacterium (G15), Fibrobacter (G16), Flavonifractor (G17), Fusobacterium (G18), Intestinimonas (G19), Lachnoclostridium (G20), Lactobacillus (G21), Odoribacter (G22), Oscillibacter (G23), Parabacteroides (G24), Phascolarctobacterium (G25), Prevotella (G26), Pseudoflavonifractor (G27), Pyramidobacter (G28), Roseburia (G29), Sphaerochaeta (G30), Streptococcus (G31), Subdoligranulum (G32), Sutterella (G33), Treponema (G34), Veillonella (G35); Aminoglycoside resistance genes (B) aac(3) (A1), aac(6) (A2), aac(6) (A3), aac(6')-aph(2'') (A4), aacA4 (A5), aacC4 (A6), aad (A7), aadA15 (A8), aadA5 (A9), aadE (A10), aadE (A11), aadE (A12), aadK (A13), aadS (A14), acrD (A15), acrE (A16), acrF (A17), ant(6) (A18), ant(6) (A19), ant(9) (A20), aph(2) (A21), aph(2) (A22), aph(2) (A23), aph(3) (A24), envR (A25), hph (A26), kdpE (A27), neo (A28), npmA (A29), rmtF (A30), sat (A31), sat (A32), sph (A33), spw (A34), strA (A35), strB (A36); Multidrug resistance genes (C): acrA (M1), acrB (M2), baeS (M3), cmeA (M4), cmeB (M5), cmeC (M6), cpxA (M7), crp (M8), EB (M9), efrA (M10), emrA (M11), emrB (M12), emrK (M13), emrY (M14), evgA (M15), evgS (M16), gadW (M17), hns (M18), marA (M19), mdfA (M20), mdtA (M21), mdtB (M22), mdtC (M23), mdtE (M24), mdtF (M25), mdtG (M26), mdtH (M27), mdtK (M28), mdtM (M29), mef(En2) (M30), mefG (M31), mel (M32), mexF (M33), mprA (M34), msbA (M35), oqxB (M36), qacH (M37), smeB (M38), smeR (M39), taeA (M40), tlrC (M41), tolC (M42), yjcP (M43), yjcQ (M44), yjcR (M45), yojI (M46); Phenicol resistance genes (D): catB4 (P4), cml (P7), cmlA4 (P8), rlmN (P12); MLS resistance genes (E) ABC (m1), ABC (m2), ereD (m3), erm (m4), erm (m5), erm2 (m6), erm33 (m7), erm35 (m8), erm47 (m9), ermA (m10), ermFS (m11), ermM (m12), ermQ (m13), linG (m14), lnuB (m15), lnuC (m16), lsaE (m17), macB (m18), mefA (m19), mefA (m20), mefB (m21), mefE (m22), mphA (m23), mphB (m24), mphE (m25), oleB (m26), satG (m27), srmB (m28), tlrC (m29); Beta-lactam resistance genes (F) aci1 (B1), ampC (B2), ampH (B3), bla (B4), bla (B5), bla (B6), bla (B7), blaCARB (B8), blaLAP (B9), blaOXA (B10), blaOXA (B11), blaOXA (B12), blaTEM (B13), blaVEB (B14), cblA (B15), cepA (B16), cfxA5 (B17), cfxA6 (B18), fus-1 (B19), mrdA (B20), ompK37 (B21).


This study revealed the population of fecal microbes and AMR determinants in commercial piglets aged 21–32 days. The Shannon diversity index is used to measure species richness and evenness. Divergent data of alpha diversity have been reported in piglets during weaning period. Increased indices were demonstrated in pigs at 10 and 21 days after weaning, compared with the weaning day and 10 days before the weaning day, showing the mature gut microbiome27. However, early weaning could lead to decreased alpha diversity, possibly due to weaning stress28. In our study, the weaning day was the same as Chen et al.27, however, we did not find significant differences in the Shannon diversity index among groups (days). This is possibly due to different feeding schedules, breeds and farm environments between the studies, and other factors may also affect the alpha diversity changes. However, we found that the microbial community of piglets at D.8 significantly differed from earlier sampling dates, probably as the consequence of physiological changes and post-weaning farm management practices. Moreover, the PERMANOVA results revealed that the weaning age and diet played an important role in gut microbiome populations (Table 2). Alistipes was prominently present at D. − 3 followed by Bacteroides. Both are bile-tolerant bacteria hence they are capable of digesting high-fat diets such as sow milk, which has a higher fat content (7.5–10.1%) compared with cow’s milk (4.2%) or human milk (3.2–3.6%)29,30,31,32. Alistipes had been reported to produce sulfonolipids, which play an important role in cell signaling and morphogenesis in animals, in mice fed with high-fat diets33. Bacteroides in infants were described to utilize human milk oligosaccharides (HMOs), bioactive components of milk that could not be completely digested by the host, using mucus-utilization pathways34. HMOs played several important roles in neonatal development, such as being prebiotics for gut microbiota and protecting the mucosal surface from pathogen binding, etc35. Similar to human milk, higher fucosylated compounds in porcine milk oligosaccharide were reported to be correlated with lower sialylated compounds at D.7 and D.14 of lactation compared with D.0 and a pre-colostrum period. The fucose consuming taxa containing genes encoding fucose-permease enzymes were also changed from Enterobacteriaceae in nursing pigs to Lactobacillaceae in weaned pigs36. Piglets are considered a good model for the study of human infant nutrition issues because of similar nutritional physiology such as a postnatal development of intestinal microbiota, the effect of gut microbiota diversity in early life on immune systems, and milk oligosaccharides36,37. In addition, Bacteroides in the piglet fecal microbiome has been shown to contain large amounts of genes encoding key catalytic enzymes such as sialidases and beta-hexosaminidases, that could digest sow milk glycans38. Clostridium was the major genus at D.0 and D.3, whilst the predominantly polysaccharide-degrading Prevotella was the major population at D.8. Soluble-fiber-degrading Treponema was also observed at higher abundance at D.8. Our results were similar to a previous report of Prevotella being markedly increased in weaned animals, supplanting the Bacteroides population38. The dynamic of the fecal microbiome population has been reported in antibiotic-free nursing and 7-day post-weaning piglets. Bacteroides was reported to be the most abundant microbe in nursing pigs, whereas in weaned piglets, Prevotella was enriched39. In our study, not only weaning age but diet was also shown to be associated with the microbial community composition. The same pre-starter (nursery) feed was provided throughout this study at the age of day 7–day 32 (D.8) (Table 5). After D.8, pigs would receive another feed formula of solid starter feed. Hence our diet factor that affected microbiota community was possibly a consequence from sow milk exclusion on the weaning day and more consumption of pre-starter feed. In the previous report of piglets receiving creep feed on D.14 and being weaned on D.28, age and diet were shown to play an important role in the bacterial community, with the most diversity at 21 days post weaning40. In general, during the weaning period, ETEC often flare up and cause diarrhea and other symptoms due to impaired immune functions. However, for the farms from which we collected fecal samples, diarrhea was rarely observed and E. coli was found to be lower at D.8, indicating good farm management, which was probably due to chlorination of drinking water for disinfection and the evaporative cooling housing system. Chlorination was shown to have a bactericidal effect on E. coli41. And in the housing equipped with evaporative cooling system, temperature and humidity of the housing are well controlled, leading to reduced heat stress and good health42. Lactobacillus was enriched at D. − 3 (1.17%). However, low amounts were observed at all ages (0.22–1.17%) despite being fed probiotics, containing Lactobacillus acidophilus and Lactobacillus plantarum, at postnatal D.1–3. According to a previous report, lactobacilli with probiotic potential were sensitive to several antibiotics used on the farms43. An antibiotic susceptibility test should be performed. On the other hand, low amounts of, or rare, probiotic microorganisms observed indicated that they did not serve as a reservoir for AMR determinants.

Table 5 Programs of feeds, antibiotics and probiotics for pregnant sows and piglets.

For the AMR patterns, the highest abundance of AMR determinants at D. − 3–D.3 conferred resistance to AMG, including the streptothricin acetyltransferase gene (sat) and aac(6')-aph(2''), encoding a bifunctional enzyme, AAC(6′)-APH(2"). Sat and aac(6')-aph(2'') encoded enzymes linked to the antibiotic inactivation mechanism by acetyltransferase. sat conferred resistance to streptothricin via acetylation of the drug44. Streptothricin was not used on our farms but the other AMG, kanamycin, was intramuscularly injected into the sows on parturition day, and neomycin was mixed with feed for piglets at D.25–D.8. SAT has been shown to acetylate kanamycin and neomycin at lower levels than streptothricin45. From our study, high abundance of sat was observed at D.8, although lower than at D. − 3–D.3 (Supplementary Table S2). For aac(6′)-aph(2″), it was carried on transposons, causing AMG resistance not only in Gram-positive bacteria, but also in Gram-negative E. coli clinical isolates46. From the CCA plot in our study, we found correlation of aac(6')-aph(2'') with E. coli in the D. − 3–D.3 group (Fig. 3B).

The other group with increased AMR determinants at D. − 3, D.0 and/or D.3, although at a lesser abundance than the AMG, conferred an MDR pattern such as gadW, mdtE, emrA, evgS, tolC and mdtB (Supplementary Table S2). emrA encodes the EmrA periplasmic adaptor of a multidrug efflux pump belonging to the major facilitator superfamily (MFS) efflux pumps. The EmrA periplasmic adaptor has been reported to link the outer membrane protein TolC as an EmrAB–TolC tripartite efflux system in E. coli, similar to that of AcrAB–TolC complex, which is in the resistance-nodulation-cell division (RND) family of transporters47. EmrAB–TolC and AcrAB–TolC complexes have been reported to play an important role in the tolerance of E. coli to bile salts in the GI tract48. In our study, we observed high abundance of tolC and acrB. We also observed higher abundance of mdtB at D. − 3–D.3. mdtB encodes MdtB, a part of the MdtABC system, which is in the RND family similar to the AcrAB–TolC system49. We also found high abundance of mdtE. MdtE is part of the MdtEF–TolC tripartite efflux system, conferring resistance to several compounds such as erythromycin, cloxacillin and oxacillin50. We also found high catB abundance at D. − 3–D.3 (Fig. 3B, Supplementary Table S2). Plasmid-encoded catB and cmlA are known to cause chloramphenicol resistance51. Chloramphenicol has been prohibited for use in food-producing animals (; accessed 10 November 2020). Both genes have been previously reported in E. coli, corresponding to our CCA plot results (Fig. 3D)51. Since this antibiotic and its derivatives have not been used in nursing and growing/finishing farms, the possibility of E. coli to be a reservoir for these AMR genes should be investigated further.

On the other hand, the highest abundance of AMR determinant at D.8 was mefA in the MLS resistance pattern (Supplementary Table S2). mefA is in the MFS efflux pump superfamily. In fact, mefA confers resistance to macrolide and has been reported to locate in transposons. Hence, it can be possibly transferred between bacterial species52. The high levels of mefA at all ages, particularly at D.8, might lead to a concern of macrolide usage on the farm, tylvalosin for sows at D. − 7–D.7 and turathromycin for piglets at D. − 3–D.23. However, the AMR genotype might not reflect its phenotypic resistance as the ermF gene, another AMR gene in the MLS resistance pattern, detected in various human clinical specimens, did not show clindamycin- or erythromycin-resistant phenotypes53. Hence, the macrolide resistance phenotype needs to be investigated further. rlmN encodes the methyltransferase RlmN, which is a member of the radical SAM enzyme superfamily and is involved in the methylation of 23S rRNA. The effect of rlmN mutation on the AMR is still obscure54. At D.8, high abundance of AMR determinants conferred resistance to β-lactam (cfxA6 and aci1) was also observed. The cfxA6 gene was positively correlated with Prevotella (Fig. 3F, Supplementary Table S3). cfxA was the most abundant β-lactam gene family in pigs, followed by aci55. cfxA has been reported in most β-lactamase-positive Prevotella strains56. However, another report revealed that approximately half of all Prevotella strains containing cfxA genes were resistant to β-lactam antibiotics57. In our case, as Prevotella was the most predominant bacterial population at D.8 owing to the post-weaning farm management practice (i.e. feed changes to solid feed), the associated AMR gene abundance was high as well. The occurrence of cfxA in β-lactamase-positive and negative Prevotella strains should be investigated further.

Tetracyclines are bacteriostatic antibiotics with broad spectrum activity. Tetracycline has been shown to be a selective pressure in fattening pigs, resulting in a greater number of tetracycline-resistant isolates23. In this study, tet(40) presents at the highest relative abundances across all samples, following by tetW. It encodes tetracycline efflux transporters under a MFS antibiotic efflux pump AMR gene family58. tet(40) is commonly found in pig gut microbiome. tet(40) from feces of organic pigs could present as a single tetracycline-resistance gene on a putative transposon and could be linked to tetW on a putative plasmid58. High tet(40) abundance has been reported in healthy sows not receiving antibiotics since weaning, probably reflecting the natural resistome59. In our study, sows were treated with chlortetracycline in feed at D. − 7–D. − 6 before parturition, whereas piglets from birth did not receive any tetracycline drug or its derivatives. However, residues of tetracycline and its derivatives have been reported in human breast milk60. The detection of antimicrobial residues in sow milk and of reservoirs of AMR genes in environments, such as soil and water, and the transmission of AMR genes among the microbiome should be investigated further. A limitation of the present study is the lack of phenotypic–genotypic comparison of resistance which is not available for frozen fecal samples.

The maintenance of AMR determinants on the farm is a complex problem. Several factors are involved, such as selective pressure, co-selection whereby the use of one antibiotic causes resistance to other drugs, and horizontal and vertical transmission of AMR determinants in the chromosome, plasmid, transposon or integron by bacteria61. As several antibiotics have been used on the farm for decades, such as tetracycline and AMG, and a number of strong positive correlations were observed, co-selection should be a concern. However, the withdrawal of antibiotics might not be able to solve such problems, as AMR determinants still presented even though pigs did not receive antibiotic, probably due to mobile genetic elements in the ecosystem58.

In order to resolve the AMR concerns in the weaning pigs, manipulation of gut microbiota has been suggested. Due to the absence of maternal immunity in weaning piglets, biotic supplements including probiotics, fermented prebiotics and synbiotics should be considered to strengthen gut microbiota. In neonatal piglets and pregnant and lactating sows fed with prebiotics-supplemented diets, the activity of bacteria and intestinal immunity, in addition to immunity in piglets were significantly increased62. The strategy of using these biotics was to replace the AMR microorganism communities with good microorganism populations. Another technique that has been successful in treating diseases relating to gut microbiota dysbiosis in humans is fecal microbiota transplantation (FMT). FMT has been reported to decolonize several AMR pathogens such as methicillin-resistant bacteria, extended spectrum β-lactamase (ESBL)-producing Enterobacteriaceae and vancomycin-resistant enterococci63.


This study unveiled alteration of microbiome and AMR determinants in piglets at D. − 3–D.8 and that at D.8 or 8 days after weaning, piglets showed a different microbiome community and AMR determinants compared with other ages, reflecting the effects of weaning activity, dietary changes to a solid diet and farm transferring. The tracking of AMR gene abundance in other pig ages such as fattening pigs, slaughterhouse, pork in the markets and pig farmers should be investigated.

Materials and methods


All methods were carried out in accordance with guidelines and regulations and the study was carried out in compliance with the ARRIVE guidelines. All animals were managed following the ethical guidelines required under the Chulalongkorn University Animal Care and Use Committee (CU-ACUC), Thailand (approval number 1731036).

Animals and sampling

A total of twenty-four crossbred Landrace × Large White × Duroc Jersey piglets from three sows raised on a local commercial farm were used in the study. Pigs were raised under the evaporative cooling housing system which can control air temperature and humidity in a building. The programs of feeds, antibiotics and probiotics for pregnant sows and piglets are shown in Table 5. All antimicrobial prophylaxis given to sows or piglets was at therapeutic doses and was used for a short-term period only (≤ 14 days), hence, they did not serve as growth promoters. Weaning pigs were transferred to an early weaning unit in a weaner/finisher farm. Fecal samples were collected from the rectum of each pig at D. − 3 (before receiving tulathromycin), D.0, D.3 and D.8, delivered to the laboratory under dry ice and stored at − 80 °C until DNA extraction was performed.

DNA extraction

DNA was extracted from 180 mg fecal samples using a QIAamp Fast DNA Stool Mini kit (Qiagen, Hilden, Germany) according to the manufacturer’s protocol. Genomic DNA was cleaned and concentrated by a Genomic DNA Clean & Concentrator Kit-10 (Zymo Research, Irvine, CA, USA), according to the manufacturer’s directions. DNA concentration and purity were determined using a NanoDrop ND-1000 Spectrophotometer V3.7 (Thermo Fisher Scientific, Waltham, MA, USA) and the integrity of total DNA samples was evaluated with a 2100 Bioanalyzer (Agilent Technologies, Santa Clara, CA, USA). DNA samples were stored at − 20 °C until further analysis.

DNA library preparation and metagenomic sequencing

DNA library preparation was performed according to the TruSeq Nano DNA Sample Preparation Kit protocol (Illumina, San Diego, CA, USA). The samples were sheared on a Covaris S220 or E220 focused ultrasonicator (Covaris, Woburn, MA, USA) to approximately 450 bp, following the manufacturer’s recommendation, and uniquely tagged with one of the TruSeq LT DNA barcodes (Illumina). The finished libraries were quantitated using a Quant-iT PicoGreen dsDNA Kit (Thermo Fisher Scientific) and the average library size was determined using a Bioanalyzer 2100 instrument, using a DNA 7500 chip (Agilent Technologies). Library concentrations were then normalized to 4 nM and validated by qPCR on a ViiA-7 real-time thermocycler (Thermo Fisher Scientific), using the KAPA Library Quantification Kit for Illumina platforms (Roche, Basel, Switzerland). The libraries were then pooled at equimolar concentrations and sequenced on an Illumina HiSeq2500 sequencer in rapid mode at a read length of 250 bp (paired-end read).

Data analysis

The sequencing reads for all samples were trimmed using Trimmomatic version 0.3864. DIAMOND version was used to map the trimmed read pairs to the NCBI non-redundant (NR) protein database, retrieved on June 8, 201865. An operational taxonomic unit (OTU) table was constructed from the taxonomic classification results with a 97% confidence threshold. OTUs with their total number of mapped reads across all samples occupying less than 0.005% of overall mapped reads were filtered out, which was then subsampled to 1 262 472 reads per sample. This subsampling value is 80% of the sample with the lowest number of paired reads after trimming. The OTU table filtering and subsampling, in addition to subsequent alpha and beta diversity analyses, were performed using the QIIME 2 platform ( A principal coordinates analysis (PCoA) plot of fecal microbiome taxonomy was constructed based on a pairwise dissimilarity matrix.

The reference AMR gene sequences were obtained by integrating the ResFinder version 3.2 (; accessed 21 September 2018)67, ARG-ANNOT version 468, and CARD version 2.0.3 databases using ARGDIT69,70. This reference sequence set was then clustered using CD-HIT with a 90% sequence identity threshold71. The trimmed read pairs were mapped to the reference AMR gene sequences using Bowtie 272 and those mapped pairs were assigned to the reference AMR gene sequence clusters accordingly. The gene abundances in fragments per kilobase of exon model per million mapped reads (FPKM) were then calculated from the mapped read counts of the clusters. Any cluster with its total abundance across all samples lower than 0.005% of the overall abundance was discarded. A stacked bar graph showing relative abundance distribution of antimicrobial resistance genes by antimicrobial drug resistance patterns was constructed from the proportion of read counts from the ResFinder annotation and presented using Microsoft Excel. Beta diversity analysis and a PCoA plot were performed for AMR abundance as for taxonomic abundance.

Canonical correlation analysis (CCA) plots showed interrelationships between taxon profile and AMR profiles, using the regularized version implemented in the R package CCA because of there being a larger number of variables (taxa or AMR sequences) than samples73. The association of AMR genes, bacterial community structure at the genus level and pig samples in each antimicrobial drug resistance pattern was analyzed using the vegan R package.

Statistical analyses

For DIAMOND results of microbiome communities, two statistical analyses were performed between groups of samples, namely: (1) permutational multivariate analysis of variance (PERMANOVA) to examine differences in microbiome community composition among groups of samples, under the null hypothesis of no differences among groups. PERMANOVA was performed using the adonis function in the R package vegan (version 2.5-2)74; (2) Alpha diversity of the samples was estimated using the Shannon index. Compositional difference between any two samples (beta diversity) was quantified with Bray–Curtis dissimilarity, and the PCoA plot at the family level was computed from the pairwise dissimilarity matrix obtained. This PCoA plot was visualized through the Emperor plugin for QIIME 275. Both PERMANOVA and alpha diversity calculations employed uniformly subsampled data, as described above.

For both taxa and detected AMR determinants, we tested for differences in relative abundance of each taxon or AMR sequence entity, respectively, among groups using generalized linear models (GLM) implemented in the R package mvabund76. Statistical analyses of Shannon diversity index and relative abundance of microbial phyla and microbial genera were performed using the Kruskal–Wallis test. For AMR gene data, we employed the function manyglm with a negative binomial distribution and with the offset component set to the log of the sum of FPKM values for each sample. Day of sampling was treated as the factor of interest. We estimated P-values using the anova.manyglm function, using 1000 bootstrap resamples (resample parameters set to ‘PIT-trap’) and we unadjusted for multiple hypothesis testing using the step-down procedure specified by the parameter uni.p set to "adjusted". All other parameters in anova.manyglm had default settings. Differential abundance of AMR genes corresponding to antimicrobial drug resistance patterns was analyzed using the DESeq2 version 1.30.0 in R software77, and data were visualized using ggplot2 version 3.2.1 in the tidyverse package (; accessed 10 October 2020).

Ethics approval and consent to participate

The study was approved by the Chulalongkorn University Animal Care and Use Committee (CU-ACUC), Bangkok, Thailand (approval number 1731036).