Sampling locations and nematode lines
In northern Germany, we collected C. elegans and C. remanei nematodes from four sampling sites in 2011 and 2012 (Additional file 1: Table S1-1). A detailed description of the sampling sites and substrates has been previously published . Experiments were performed using the laboratory strain N2 or the northern German C. elegans wild isolates MY316 and MY379, following standard maintenance procedures . C. elegans, C. briggsae, and C. remanei were also isolated from nine locations in central and northern France and in one case Lisbon, Portugal (Additional file 1: Table S1-1; [19, 28]).
Isolation, characterization, and maintenance of associated microbes
Microbial isolates were obtained from the northern German samples, either using aliquots of frozen worm populations or from environmental substrates, from which we successfully isolated C. elegans (Additional file 1: Tables S1-1 and S1-2). For microbe isolation, the respective nematode samples were washed three times in 1 mL M9, then resuspended in 250 μL M9 containing three 1-mm zirconium beads, followed by 2 min vortexing to break up the worms. The environmental samples were taken up in sterile ddH2O and shaken for 1 h to suspend the microbes present. Afterwards, the solid particles in both sample types were pelleted by centrifugation and 100 μL of supernatant in serial dilutions were plated onto 9-cm agar plates containing either diluted trypticase soy agar (TSA, 10 % strength), MacConkey agar, Sabouraud glucose agar, potato dextrose agar, or yeast peptone dextrose agar. Culture plates were incubated at 15 °C, to simulate average temperature conditions in the northern German sites. Single colonies were picked upon appearance and re-cultured for purification on diluted TSA. For long-term storage, stocks with 30 % glycerol were prepared from fresh liquid cultures in trypticase soy broth (TSB) and stored at −80 °C.
The microbial material was used to select specific isolates as representatives of the abundant genera from the native C. elegans microbiome, as inferred from bacterial MiSeq genotyping analysis (Fig. 1 and Additional file 1: Table S1-3). For bacteria, taxonomic identity was determined through Sanger-sequencing of the complete 16S rRNA gene using the primers 27f (AGAGTTTGATCMTGGCTCAG) and 1492r (AAGTCGTAACAAGGTAACC) , as well as 701f (GTGTAGCGGTGAAATGCG) and 785r (GGATTAGATACCCTGGTAGTCC). Fungal taxonomic identity was inferred through sequencing of the ribosomal internal transcribed spacer using primers ITS1f (CTTGGTCATTTAGAGGAAGTAA)  and ITS4r (TCCTCCGCTTATTGATATGC) . The approximate taxonomic position of the isolates was subsequently assessed with the help of a BLAST-based similarity analysis, which is sufficient for an approximate classification of the isolates, especially at higher taxonomic levels and as required at this particular step, even though exact species designations may not always be correct. In particular, the sequences were aligned to obtain a single consensus sequence per isolate and these consensus sequences were compared to NCBI’s nucleotide data base using NCBI BLAST .
In addition, we used a phylogeny-based approach for a more reliable taxonomic classification of the 24 bacterial and six fungal isolates, which were characterized in more detail at the phenotypic level. We performed six separate phylogenetic analyses: one for the considered fungi and one each for the Actinobacteria, the Firmicutes, the Alpha-/Beta-Proteobacteria, and also the Gamma-Proteobacteria. For each of these groups, we compared DNA sequences of our isolates to either bacterial 16S type strain sequences obtained from the Ribosomal Database Project (RDP, ) or fungal ITS sequences, comprising both reference and representative sequences, obtained from UNITE . Several of the considered genera had a large number of type sequences in the database (e.g. RDP has 140 type strain sequences of the genus Pseudomonas alone). To enhance efficiency of the analyses, we chose the most similar sequences (10 for bacteria, five for fungi) to our isolates by BLASTing the latter against the respective type sequences. For each of the six groups, we subsequently created multiple sequence alignments with the program MUSCLE  using the sequences obtained by us for our isolates, the chosen reference type sequences, and also always several outgroup taxa, either from the same bacterial phylum (all bacterial analyses) or from the major fungal clades (the fungal analysis). Phylogenetic inference was based on Maximum Likelihood. The optimal substitution model was identified using JModelTest2 . Maximum-likelihood based tree reconstruction and parameter optimization was performed using PhyML . Trees were visualized by the R-package ape  and shown in Additional file 5.
Prior to the phenotypic assays, bacteria and fungi were streaked out on TSA plates and incubated at 25 °C until single colonies (for bacteria and yeast-like fungi) or growth (for hyphae-growing fungi) were visible. The single colonies were transferred to 5 mL TSB and incubated at 28 °C for 48 h to allow for recovery from freezing. These cultures were checked for contaminations by streaking subsamples onto TSA plates. To obtain a sufficient amount of bacterial biomass for the assays, bacteria were cultured at 28 °C for 48 h in 50-mL falcon tubes filled with 15 mL TSB or 500-mL Erlenmeyer flasks with 150 mL TSB. Bacterial cultures were harvested by centrifugation in 50-mL falcon tubes for 20 min at 4000 rpm. Growth was quantified by measurement of optical density at 600 nm.
Nematode and substrate isolation and DNA extraction for MiSeq genotyping
Nematodes were isolated using three main methods: (1) the previously established standard approach, which uses the laboratory food E. coli as an attractant on Agar plates; (2) an approach based on a viscous medium in the absence of E. coli; and (3) a plate-based approach without E. coli. Substrate samples were collected from the German locations. In detail, several nematode samples from Germany were isolated following the previously established method that uses E. coli OP50 as attractant for worms . Single C. elegans were individually transferred without any washing or sterilization step to fresh NGM plates, seeded with E. coli, and allowed to produce offspring via selfing, subsequently resulting in a growing worm population. These worm populations were maintained on E. coli for 2–3 weeks before they were frozen at −80 °C. Prior to DNA isolations, these samples were thawed and washed three times in M9 with 0.05 % Triton X-100 (M9-T). Total genomic DNA was extracted from these German samples using the PowerSoil DNA Isolation Kit (MO-BIO, Carlsbad, USA) following the manufacturer’s instructions with the addition of 0.4 mg/mL proteinase-K (Fermentas/Thermo Fisher Scientific, Waltham, USA) per spin column and subsequent incubation at 2 h at 55 °C before the bead-beating step. A Geno/Grinder 2000 (SPEX SamplePrep, Metuchen, USA) was used to homogenize the samples for 1 min at 1500 strokes/min. These samples were denoted “lab-enriched worms”.
For the German locations, we additionally isolated single nematodes directly from the substrates and without using E. coli as attractant. In these cases, environmental samples were spread out evenly on sterile 9-cm PFM agar plates and covered carefully with 20 mL sterile S-buffer containing 1.2 % hydroxymethylcellulose, 5 mg/mL cholesterol, 1 mM MgSO4, 1 mM CaCl2, and 0.1 % acetone. In this viscous medium, nematodes float to the surface within 1–2 h and can be collected under a dissecting microscope. For each sample, worms were aseptically collected in as little liquid as possible and transferred into 1 mL M9-T in a sterile 3-cm petri dish and washed three times by first incubation for more than 10 min in M9-T, followed by transfer into fresh M9 and repetition of the incubation step. To extract DNA, single worms were transferred immediately after washing to sterile wells of a 96-multi-well plate filled with 10 μL 2x Tris-EDTA buffer, pH 8 with 1 mg/μL proteinase K, and one to three 1-mm zirconium beads per well. Crude DNA was obtained by freezing the plates for at least 16 h at −80 °C, followed by bead-beating twice for 3 min at 1500 rpm in a Geno/Grinder and proteinase K digestion (1 h 55 °C, 20 min 98 °C). The nematode species was identified by diagnostic PCR  using 1 μL of crude DNA as template for a 15 μL duplex PCR reaction performed with GoTaq DNA Polymerase (Promega, Mannheim, Germany) and containing the primer pair nlp30 diagnostic for C. elegans (0.53 μM each) and Cre-ITS2 diagnostic for C. remanei (0.27 μM each). Cycling conditions included an initial denaturation step at 95 °C for 2 min, followed by 35 cycles of 95 °C for 45 s, 55 °C for 30 s, 72 °C for 1 min, and a final elongation step at 72 °C for 5 min. The species of the nematode was determined through the length of the PCR product, which was 154 bp for C. elegans/nlp-30 and 300 bp for C. remanei/Cre-ITS2. Positively tested DNA was directly used for amplification of the bacterial V4 region. These samples were denoted “natural worms”.
Substrate samples, from which worms were successfully isolated from the German locations, were homogenized in liquid nitrogen, followed directly by DNA isolation, using the same methods as for the lab-enriched worms.
Nematodes from the French and Portuguese locations were processed in groups of 30–100 worms either directly after isolation from the substrates (denoted natural worms) or after they had been maintained for several weeks in the laboratory (lab-enriched worms). In both cases, worms were surface-sterilized following a previously described method . From these worms, genomic DNA was isolated using a standard phenol-chloroform protocol with a 30-minute RNAse A step.
Control of contamination with airborne microorganisms and removal of microbes from the worm surface
Contamination with airborne microorganisms in the laboratory environment can represent a serious problem for microbiome analyses. Therefore, we took precautions at several steps during processing of the natural samples. In particular, for the German material, all work with the natural samples was performed in a separate lab, in which no other research work was performed. This lab was repeatedly disinfected, resulting in high sterility conditions. The efficacy of these disinfection measures had been tested through positioning of open LB Agar plates, which usually did not contain any contaminations. It is worth noting that a large part of the Schulenburg group works with spore-forming bacteria (i.e., Bacillus thuringiensis [66, 67]), whereby the spores are easily transmitted through air and can easily cause contaminations. Contaminations with these spore-forming bacteria were never observed in this particular laboratory dedicated to work with natural C. elegans samples.
Furthermore, almost all steps of the DNA isolation protocol were done in a laminar flow cabinet (only excluding incubation in a thermoshaker and centrifugation). This laminar flow cabinet was restricted to work with the natural samples in the above mentioned lab, which itself was restricted to work with natural samples. Prior to DNA isolation, all required equipment was moved into the laminar flow cabinet. All equipment and the clean bench itself was very carefully disinfected using DNA Away (Molecular Bio-Products, Inc.), followed by UV irradiation. Only thereafter did we start with the DNA isolation protocol. In addition, DNA was always first isolated from worm samples and only thereafter for substrate samples, in order to avoid any possible carry-over contamination from putatively high-yield (substrate samples) to low-yield extractions (worm samples). After each DNA isolation session, we again carefully disinfected the laminar flow cabinet using DNA Away and UV irradiation, in order to keep the highest possible sterility level.
PCRs were always set-up under similarly high sterility conditions in the laminar flow cabinet. For each PCR performed, we always included a positive and, importantly, a negative control. The latter contained all reaction components excluding DNA. PCR results were always inspected through gel electrophoresis and, for selected cases, using Nanodrop measurements. The negative control never produced any amplification product. In addition to the above measures, our results argue against a contamination problem. If there was a general contamination problem, then these should have been most problematic for samples, for which one could expect few bacteria (and thus little bacterial DNA and low PCR yield); thus, all worm samples processed in our labs should have been affected to a similar extent. In contrast, we consistently identified significant differences in the identified microbiome from C. elegans versus C. remanei. Moreover, if there was a general contamination problem, then it is unlikely to consist of similar taxa in different labs in different countries. However, we consistently uncovered highly similar microbial communities for worm samples isolated in the Schulenburg lab in Germany and also worm samples isolated in the Félix lab in France. Moreover, these similarities were revealed from sample preparations, based on slightly different DNA isolation protocols, performed by different researchers in different countries. In consideration of these different observations, we deem it highly unlikely that the results were dominated by laboratory contaminations.
In addition to the measures against general microbial contaminations, we also minimized the presence of microorganisms from the surface of the nematodes in order to restrict our analysis to microbes from within the worm body. In particular, directly before DNA isolation for 16S genotyping of the German material, all nematode samples were washed three times in sterile M9-T. The same washing regime was also applied to the nematode samples characterized by differential interference contrast microscopy and FISH-staining combined with fluorescence microscopy (see below). During microscopy of these nematodes, we usually observed no microbes and, in very few cases, only single microbes attached to the cuticle. This is true for microscopy of natural nematode samples or the nematodes from the recolonization experiments. This was in strong contrast to the high abundance of microbes in the worm gut, again true for natural or experimental samples, as, for example, illustrated in Figs. 1d and 2c, and the movie in Additional file 6. Furthermore, the efficacy of the washing protocol was also assessed by comparing colony forming units of the pelleted worm samples (after the final washing step) with those of the supernatant of the final washing step, the wash buffer itself, and a control buffer, revealing significant removal of adherent bacteria, as presented in Additional file 7B. These observations, taken together, strongly suggest that rare cuticle colonizers are unlikely to have biased our main analyses of the worm’s microbiome.
MiSeq sequencing of bacterial 16S ribosomal RNA
Bacterial 16S sequences were amplified using the Illumina variants of the primers 515 F and 806R as previously described . Briefly, PCR reactions were carried out in duplicates of 25 μL volume, containing 10 ng template DNA and using the Phusion High Fidelity DNA Polymerase (Thermo Fisher Scientific, Waltham, USA) with the following conditions: initial denaturation at 98 °C for 3 min; 35 cycles of 98 °C for 10 s, 58 °C for 30 s, and 72 °C for 30 s; and final elongation at 72 °C for 10 min. Since the yield for single nematodes was sometimes low, the respective PCR amplicons were concentrated with NucleoFast 96 PCR ultrafiltration membranes (Macherey-Nagel, Düren, Germany) according to the manufacturer’s instructions. Amplicon libraries were prepared from pooled PCR reactions, standardized after QUBIT DNA quantification (French and Portuguese samples) or normalized with SequalPrep Normalization plates (Invitrogen, Carlsbad, USA; all German samples) according to the manufacturer’s instructions. The samples were sequenced on an Illumina MiSeq platform at either the CNRS facility Imagif (CNRS, Gif-sur-Yvette, France; all French and Portuguese samples) or the sequencing facility at the Kiel Institute for Clinical Molecular Biology (all German samples).
MiSeq sequence quality control and processing
The obtained MiSeq paired-end reads were assembled and quality filtered using USEARCH 7.0.1090 . Single reads with a minimum length of 200 were truncated if quality was lower than 5 and contigs of 200–270 bp length were formed by merging sequences with at least 200 bp overlap and without allowed mismatches Resulting contigs with an overall expected error probability of ≥ 0.1 were removed. We used mothur 1.33.3  for downstream processing of reads. In brief, reads were aligned to a reference based on the Silva V119 alignment  using a k-mer based Needleman algorithm. Sequence chimeras were removed with UCHIME . Sequences were assigned a taxonomy using a Bayesian classifier  on the RDP trainset with an 80 % bootstrap confidence. In all subsequent analyses, a normalized subset of 2000 sequences was used. OTUs were clustered at 97 % similarity and classified based on the previously created taxonomy. Metrics for alpha and beta diversity were calculated based on the clustered OTUs with the mothur-implemented methods and visualized with R.
Statistical analysis of MiSeq 16S ribosomal RNA genotyping
We conducted statistical analysis using R. We compared strain frequencies using non-parametric Wilcoxon rank sum tests. Microbial alpha and beta diversity metrics were calculated with the methods implemented in mothur 1.33.3 . We analyzed the alpha diversity of the wild Caenorhabditis samples with generalized linear models assuming a Gaussian error distribution and considering host species and sample type, location, and environment as possible explanatory variables. Beta diversity dissimilarities were analyzed using the vegan-implementations of the ADONIS function for non-parametric permutational multivariate analysis of variance  and for unconstrained ordination by principle coordinates (principal coordinate analysis). Model selection for canonical correspondence analysis  of OTU abundance aimed at explaining most of the inertia while retaining the least amount of explanatory variables. We considered sample type, location, and environment as possible explanatory variables.
Establishment and analysis of an experimental microbiome
The experimental microbiome consisted of 14 different bacterial isolates (Additional file 1: Tables S1-3 and S1-9). Of these, nine were representatives of the 15 most abundant genera, which could be identified in the MiSeq genotyping analysis for native C. elegans and for which culturable isolates were available (Additional file 1: Table S1-3; note that several genera were found to be abundant more than once). We added representatives of two additional abundant genera, namely Comamonas and Rhodococcus, both of which belong to the top 25 most abundant genera, that could be identified through MiSeq genotyping and for which isolates were available (Additional file 1: Table S1-3). We further included representatives of three additional genera that belonged to abundant and taxonomically distinct bacterial orders such as Achromobacter (order Burkholderiales), Bacillus (order Bacillales), and Microbacterium (order Actinomycetales; Additional file 1: Table S1-3).
Synchronized C. elegans L1 larvae were raised at 20 °C on 9-cm agar plates seeded with 400 μL of a suspension containing the 14 bacterial isolates, with a final OD600 per bacterium of 5. Nematodes and bacterial lawns were harvested after 48 h (L4 larvae) and 72 h (adults) with M9-T + 30 mM NaN3 to anesthetize worms for a short period and prevent the intake of bleach during the following washing step. To remove bacteria outside of the nematode gut, worms were washed by placing them onto a 10-μm filter, followed by addition of M9-T mixed with 1:100 bleach solution , 5 min incubation, and subsequent centrifugation. Thereafter, worms were washed twice more in M9 only. This procedure allowed for an efficient removal of bacteria attached to the worm’s surface (Additional file 7B), while retaining nematodes alive. For performance of the experiment, we used number codes for the treatments to avoid observer bias, treatments were spatially randomized in the incubator and assessed in a randomized order to minimize the influence of random environmental effects, and all treatments were replicated eight times. Worm and lawn samples were then processed and statistically analyzed following the details given above for the wild C. elegans samples.
Inference of bacterial frequencies was based on a customized alignment consisting of 16S sequences from all used bacteria, which were obtained by Sanger-sequencing. For safety, we additionally performed a BLAST search for all MiSeq sequences obtained in order to assess whether the obtained MiSeq sequences were indeed the best match for the used strains. This additional analysis revealed a mismatch for one of the major OTUs, where a sequence was most similar to the Ochrobactrum sequence in our reference alignment whereas it was identified by BLAST to belong to the genus Sphingomonas (related NCBI Accessions gb|HM438390.1| or gb|AF408323.1|). In order to avoid any biases in the results, we decided to exclude any sample from further analysis which had more than 1.5 % of all reads showing highest BLAST similarity to the above Sphingomonas sp. This was the case for two out of eight replicates of our L4 staged nematode samples of strain MY379 (i.e., the treatment group “MY379 L4 worms”), and also single replicates from the groups “N2 L4 worms”, “N2 adult worms”, “MY379 adult worms”, and “MY316 L4 worms”. Furthermore, three samples of “MY379 L4 worms” and single samples of “N2 L4 lawn” and “MY316 L4 worms” did not have sufficient sequence coverage (less than 1000 sequence reads after quality control) and were therefore excluded. After exclusion of these cases, only three replicates remained for treatment “MY379 L4 worms”, which would have made comparison with the other treatments unbalanced. Therefore, we excluded this particular treatment from all further statistical analysis and only showed the results for the remaining three replicates in Fig. 2a. An overview of replicate numbers per treatment and the included samples per treatment are provided in Additional file 1: Tables S1-10 and S1-11.
Population size analysis
Population size was used as a proxy for evolutionary fitness and the assay generally followed the previously established protocol . We assessed the effects of the same 14 bacterial isolates included in the experimental microbiome. We considered 10 additional isolates from the same genera, in order to obtain a first indication of within-genus bacterial variation (see Tables S1-3 and S1-9 for an overview of the considered isolates). Three synchronized L4 hermaphrodites were placed with a platinum wire on a 6-cm NGM-agar plate seeded with 400 μL of the respective food bacterium with an OD600 of 10 or the experimental microbiota mix (see above). After 5 days at 20 °C, the worm populations were washed with 2 mL M9-T and frozen at −20 °C. The number of worms in 5 μL of suspension was counted three times to calculate the total number of worms per plate. To correct for the uneven liquid loss during washing, we weighted the test tubes afterwards and corrected our calculations accordingly.
The population growth assays always consisted of 10–11 independent replicates per treatment. Treatments were randomized and coded by numbers to avoid any observer bias. Normality of the data was examined using quantile plots and the Shapiro–Wilk normality test. All treatments were then compared to the E. coli OP50 control using Wilcoxon’s rank sum test and P values were corrected for multiple testing using the false discovery rate .
Fluorescence in situ hybridization assay for bacterial quantification
Synchronized C. elegans L1 larvae were raised on 9-cm agar plates seeded with 400 μL of the respective test bacterium with an OD600 of 10 for 72 h at 20 °C until adulthood (time point 0 h). Populations were then split, washed three times in M9-T, and transferred to a PFM-plate containing either the same food or no food (TSB mock inoculated). 0 h and 24 h after transfer, nematodes were harvested, washed, and fixed in 3 % formaldehyde for 1 h at room temperature (RT). FISH was essentially performed as previously described , based on the probe EUB338, which binds to ribosomal RNA and should thus particularly highlight alive cells, in which RNA had not yet been degraded by exogenous RNAses. The exact protocol was modified to increase hybridization efficacy in nematodes. In particular, worms were washed for 30 min in PBS and 30 min in 50 % EtOH/PBS at RT. Samples were collected in 250 μL hybridization buffer (20 mM Tris, 0.1 % SDS, 900 mM NaCl) and heated at 80 °C for 5 min before adding the probe. Then, 2.5 μL 100 μM probe EUB338 , 5’-labeled with Cy3, was added to the buffer and staining commenced for 20 min at 55 °C. Samples were washed for 30 min in hybridization buffer containing no probe at 55 °C and 30 min in PBS at RT. Stained samples were transferred to 90 % glycerol/PBS and analyzed with a confocal LSM700 microscope using a 555 nM solid-state laser. We quantified bacterial load as ranked prevalence of stained bacteria in the pharynx and the anterior and posterior intestine, separated by the position of the vulva, using four categories: (0) absent, (1) single cells, countable, (2) clumps of cells, too many to count, and (3) region is completely filled. For each replicate, we assessed 10 worms and then calculated the mean categorical rank for these worms and for each three-body region. The evaluation of worms was performed for coded samples in fully randomized order of treatments by an experienced technician, otherwise not connected to the project. This assay was performed in three independent biological replicates.
The fungal isolates Mucor sp. MYf197, Dipodascus sp. MYf82, Mortierella sp. MYf35, Penicillium sp. MYf125, Fusarium so. MYf198, and Trichoderma sp. MYf192 were allowed to completely overgrow a TSA plate at 25 °C. A 0.5 mm2 piece from the center of the stock plates was aseptically transferred to the center of a TSA plate seeded with 400 μL of either the Pseudomonas isolates MYb11, MYb187, or MYb193, or E. coli OP50 with an OD600 of 10. We scored the diameter of the growing fungus over 3 days and calculated the relative growth in comparison to the mean fungal growth on E. coli OP50.
The anti-fungal effect of Pseudomonas co-isolates was performed in triplicate and analyzed within the linear model framework with the relative growth as response variable and the fungal and bacterial strains as explanatory variables. All treatments were randomized and coded by numbers to avoid any observer bias.
Survival on Drechmeria coniospora
Synchronized C. elegans L1 larvae were grown at 20 °C on 9-cm agar plates seeded with 400 μL of a suspension containing either Pseudomonas MYb11 or E. coli OP50 with an OD600 of 5 until they reached the L4 stage. Subsequently, 30 L4 larvae were transferred to fresh plates seeded with a mixture of either bacterium and additionally conidia of the fungal pathogen Drechmeria coniospora (prepared as previously described [77, 78]) or M9-T buffer (controls). Nematode survival was scored after 48 h at 25 °C. The assay was performed in triplicate with randomized order of treatments and number-coded treatments to avoid observer bias. The significance of worm mortality on D. coniospora relative to M9 controls was assessed using Wilcoxon rank sum tests.
Statistical analysis packages
We utilized R  for all statistical analyses, using the following non-base packages: ggplot2 , gridBase , gridExtra , gtable , lawstat , rcolorbrewer , reshape , rgl , scales , and vegan .