Experimental protocol

Eighty 4L tanks received four O. septentrionalis tadpoles (juveniles) each, which were collected from pools at the University of South Florida (USF) Botanical Gardens, Hillsborough County, FL, USA (scientific collecting permit #LSSC-15-00014). All animal care procedures were in accordance with University of South Florida’s Institutional Animal Care and Use Committee (IACUC protocol #IS00001610). The mean (±s.e.m.) Gosner stage for juveniles at the beginning of the experiment was 32.10 (±1.10); Gosner stage represents the development stage of advancement toward metamorphosis in tadpoles29. Juveniles were assigned randomly to one of four water treatments (20 tanks per treatment): pond water (PW), sterile (autoclaved) pond water only (SPW), sterile pond water and short-term antibiotics (STAB), or sterile pond water and long-term antibiotics (LTAB). Juveniles from the short-term and long-term antibiotic treatments were exposed to a cocktail of antibiotics (30 mg/L enrofloxacin (Fluka, Sigma, St. Louis, MO, USA), 13.3 mg/L sulfamethazine and 2.67 mg/L trimethoprim (Thomas Labs, Fish Sulfa Forte, Tolleson, AZ, USA), and 5000 µg/L streptomycin and 5000 I.U./L penicillin (Mediatech, Inc., Manassas, VA, USA)) in sterile pond water for 24 h and 4 weeks, respectively; these were half the recommended doses from Holden et al.30. For the long-term antibiotic treatment, the antibiotic cocktail was added to the tank during each weekly water change. For sterilization, pond water was autoclaved in 10L carboys for 60 min at 121 °C.

Tanks were maintained in the laboratory (12 h light cycle, air temperature: 22 °C, water temperature: 22.6 °C, pH: 7.7, dissolved oxygen: 5.9 mg/L, nitrates: 0.96 mg/L) and all juveniles were fed ad libitum with a mixture of sterilized spirulina (NOW foods, Bloomingdale, IL, USA) and fish flakes (Omega One, Sitka, AK, USA) in an agarose block (autoclaved for 15 min at 121 °C). Juvenile survival was checked daily and water was changed weekly. After 4 weeks in the water treatments, 10 juveniles from each water treatment were euthanized to characterize their bacterial community (Fig. 1). Their skin was swabbed with sterile cotton swabs to characterize skin bacteria and then juvenile GI tracts were removed to characterize their gut bacteria. Skin swabs and guts were frozen at −80 °C until DNA extractions.

The remaining juveniles in each tank were allowed to metamorphose. Individuals with all four limbs were removed from the tanks daily, weighed, and placed in cups (6 cm high × 12 cm diameter) with sterile organic Sphagnum sp. moss (Mosser Lee, Millston, WI, USA) (autoclaved for 30 min at 121 °C). The adults were maintained in the laboratory (12 h light cycle, 22 °C) on vitamin- and mineral-dusted crickets (vitamins and minerals: Rep-Cal Herptivite Multivitamin powder and Rep-Cal Calcium with Vitamin D3 powder, Los Gatos, CA, USA; crickets: Acheta domesticus, Armstrong’s Cricket Farm, Glenville, GA, USA) (fed ad libitum) and survival was checked daily.

Approximately 2 months after metamorphosis (mean ± s.e.m. = 63.21 ± 2.75 days), frogs were weighed and then exposed to A. hamatospicula worms, which were collected from naturally parasitized adults at Flatwoods Park, Hillsborough County, FL, USA. Frogs were placed individually in parafilm-sealed petri dishes (100 mm diameter) with an air hole at the top of the lid; frogs were then exposed to worms (see Fig. 1 for sample sizes) or sham-exposed (PW: n = 17 individuals from 13 tanks; SPW: n = 20/18; STAB: n = 22/17; LTAB: n = 16/14) by pipetting 10 infectious larval A. hamatospicula worms in 3 mL of autoclaved pond water or 3 mL of autoclaved pond water without worms through the hole in the lid, respectively. After 24 h in the petri dish, we returned frogs to their individual cups with sterile Sphagnum sp. moss and used a dissecting microscope to count the worms remaining in the petri dish to determine the number of worms that penetrated each frog. Three weeks after exposure to A. hamatospicula, frogs were euthanized and necropsied to count the number of worms that established in their GI tracts. Frog guts were then collected from a subsample of individuals (sham-exposed: PW: n = 10 individuals, SPW: n = 10, STAB: n = 10, LTAB: n = 9; see Fig. 1 for sample sizes for the parasitized treatment) and frozen at −80 °C until DNA extractions.

We also determined whether juvenile worms could be observed on the surface of the frog’s skin without penetrating the skin successfully after parasite exposure. We exposed five additional frogs to juvenile worms using the methods described above. After 24 h, we anesthetized frogs and scanned the surface of the skin for visible worms that did not penetrate it successfully. We did not observe any juvenile worms on the surface of the skin, which suggests that if worms were not found in the petri dish, they penetrated the host successfully.

Bacterial DNA extraction and sequencing

We isolated total DNA from frog guts and skin using a MoBio PowerFecal DNA Isolation Kit; DNA extracts were then sent to Argonne National Labs for sequencing. We also extracted and sequenced “blank” samples, which were collected using sham-necropsies and sham-extractions (i.e., without an experimental sample) to control for methodological contamination31. Bacterial inventories were conducted by amplifying the V4 region of the 16S rRNA gene using primers 515F and 806R and paired end sequencing on an Illumina MiSeq platform32. Sequences were analyzed using QIIME version 1.9.133. We applied standard quality control settings and split sequences into libraries using default parameters in QIIME. Sequences were grouped into OTUs using pick_open_reference_otus.py with a minimum sequence identity of 97%. The most abundant sequences within each OTU were designated as a “representative sequence” and aligned against the Greengenes core set34 using PyNAST35 with default parameters set by QIIME. A PH Lane mask supplied by QIIME was used to remove hypervariable regions from aligned sequences. A phylogenetic tree of representative sequences was built using FastTree36. OTUs were classified taxonomically using UCLUST37 with the reference Greengenes database34. Singleton OTUs and sequences identified as chloroplasts or mitochondria were removed from the analysis. In addition, any OTUs present in the “blank samples” were considered contaminants and were removed from all other samples31. Contaminant OTUs were largely similar to those presented in Salter et al.31.

Several measurements of alpha diversity were calculated. We calculated the number of observed OTUs, equitability, the Shannon index, and Faith’s phylogenetic diversity38, the latter of which measures the cumulative branch lengths from randomly sampling 1900 sequences from each sample (the minimum number of sequences returned from each sample). For each sample, we calculated the mean of 20 iterations. We calculated unweighted and weighted UniFrac distances between samples in QIIME using 1900 sequences for bacterial community composition analyses.

Statistical analyses

We determined the effect of water treatment on juvenile bacterial diversity using generalized linear models (GLMs) with Gaussian errors. To determine the effect of juvenile water treatment on adult bacterial diversity, mass at metamorphosis, days to metamorphosis, and adult mass, as well as the effect of parasitism on adult bacterial diversity, we used generalized linear mixed models (GLMMs) with Gaussian errors and tank as a random effect. Juvenile and adult samples were collected from different individuals within the same replicate (tank) because juvenile sampling required destructive sampling. Therefore, the juvenile and adult samples within tanks were paired in the analyses. Gaussian analyses were conducted using the glm (GLM) and lmer (GLMM) functions with the lme4 package. We determined the effect of water treatment on juvenile and adult survival using a censored Cox mixed effects model with the coxme function. Probability values were calculated using log-likelihood ratio tests using the Anova function in the car package. GLM, GLMM, and survival analyses were conducted in RStudio (2013, version 0.98.1062). All figures were made in Prism (2008, version 5b).

We determined the effect of juvenile water treatment on bacterial community membership (unweighted) and structure (weighted) using PERMANOVA + (with 999 permutations; 2008, version 1.0.1) in PRIMER (2008, version 6.1.11). Bonferroni post hoc multiple comparison tests were used to compare bacterial communities among treatment levels. For adults, tank of origin was included as a random effect. We used principal coordinate analyses on unweighted UniFrac distances to visualize similarities of bacterial community membership across water treatments. Unweighted scores represent bacterial community membership, which is based on the presence or absence of bacterial taxa, whereas weighted scores represent bacterial community structure, which also takes into account relative abundance of bacterial taxa.

To compare relative abundances of bacterial taxa across groups, we first removed any phyla that were present in <25% of samples. Given that the gut bacterial community is largely restructured over the course of metamorphosis19, we compared relative abundances of bacteria in juveniles and adult frogs separately. Relative abundances (arcsine square root transformed)39, 40 of bacterial phyla in juveniles and adults were analyzed in JMP (version 12) using ANOVAs with water treatment as an independent variable and, for adults, with tank as a random effect. For all analyses, P-values were corrected using the false discovery rate correction for multiple comparisons. We used GLMs (for juveniles) and GLMMs (for adults with tank as a random effect) to compare the relationship between relative abundance of phyla and genera and parasite establishment.

To determine the overall relationship among water treatment, juvenile and adult bacterial phylogenetic diversity, and adult parasite susceptibility, we employed SEM and factor analyses. SEM is a statistical technique based on the analysis of variance–covariance matrices41, which can test web-like hypotheses because variables can serve as both independent and dependent variables. The type of analysis chosen for a candidate model was dependent on whether juvenile skin and gut microbiota were combined as a latent variable (SEM; which combines factor analysis with path analysis) or considered separate variables (path analysis only). Analyses were conducted using the lavaan package in RStudio. SEMs were only conducted on tanks for which we had all the measured variables: juvenile bacterial diversity (gut and skin), adult gut bacterial diversity, and infection data. Water treatment was either categorized as control (pond water) or experimental (sterile pond water, short-term antibiotic exposure, or long-term antibiotic exposure) for the SEM. We tested eight a priori hypothesized path models that removed various sets of paths from the starting full model (Supplementary Fig. 1, Supplementary Table 2). These eight models were ranked using AIC.

Data availability

The 16S recombinant DNA sequences have been deposited in the BioProject database under accession code PRJNA342830. The authors declare that all other relevant data supporting the findings of the study can be found on FigShare (doi: 10.6084/m9.figshare.5044825).