In Vivo Microbial Coevolution Favors Host Protection and Plastic Downregulation of Immunity

Abstract Microbiota can protect their hosts from infection. The short timescales in which microbes can evolve presents the possibility that “protective microbes” can take-over from the immune system of longer-lived hosts in the coevolutionary race against pathogens. Here, we found that coevolution between a protective bacterium (Enterococcus faecalis) and a virulent pathogen (Staphylococcus aureus) within an animal population (Caenorhabditis elegans) resulted in more disease suppression than when the protective bacterium adapted to uninfected hosts. At the same time, more protective E. faecalis populations became costlier to harbor and altered the expression of 134 host genes. Many of these genes appear to be related to the mechanism of protection, reactive oxygen species production. Crucially, more protective E. faecalis populations downregulated a key immune gene, , known to be effective against S. aureus infection. These results suggest that a microbial line of defense is favored by microbial coevolution and may cause hosts to plastically divest of their own immunity.


Introduction
Organisms have repeatedly evolved methods to defend themselves against pathogen attack, yet the host microbiota also acts to prevent infection in plants and animals (Mej ıa et al. 2002;Mart ın-Platero et al. 2006;. Importantly, microbes can evolve quickly due to short generation times and strategies that favor innovation and variation (Hall et al. 2017). This potential for rapid evolution presents the possibility that components of the microbiome could adapt to defend against pathogen infection within a host's lifetime Ashby and King 2017) and even coevolve against pathogens (Kwiatkowski et al. 2012;Ford et al. 2017;Vorburger and Perlman 2018).
Coevolution between microbial species is likely ongoing within long-lived hosts. The existence of these interactions is suggested by patterns of protective microbe-pathogen specificity in natural systems (Koch and Schmid-Hempel 2012;Rouchet and Vorburger 2012;Vorburger and Perlman 2018) and in theoretical work (Kwiatkowski et al. 2012). Microbial coevolution has been predicted to drive an increase in protective ability and also the cost to hosts of possessing protective microbes (Nelson and May 2020). Many natural defensive symbioses are costly to the host constitutively or in a context-dependent way, such as in the absence of enemy attack or in different environments (Oliver et al. 2014). The costs conferred by microbial symbionts can be a major determinant of their ability to spread in a host population (Oliver et al. 2008). Moreover, with competition between microbial species a dominant interaction within the host microbiome (Granato et al. 2019), over coevolutionary time enhanced host resource exploitation-and thus virulence or cost-could be favored (Frank 1996;West and Buckling 2003). Coevolutionary interactions could therefore alter the impact of resident microbes on the host, including their associated costs and protective effects (Nelson and May 2020).
If the net benefits of microbe-mediated protection are high enough to outweigh the costs, hosts might be freed from responding to pathogens themselves. Whether protective microbes could "take-over" defenses might be determined by whether the host itself is involved in the protective process. In some symbioses, the protective microbial species primes a component of the immune system (Mej ıa et al. 2002;Weiss et al. 2012). However, it is also frequently observed in nature for protective microbes to suppress pathogens via resource competition (Lindsey et al. 2018) or production of toxic molecules (Degnan and Moran 2008;Kroiss et al. 2010;Pan et al. 2012). Such direct suppression of pathogens by protective microbial species, may make parts of the host immune response during infection redundant. It is unclear whether hosts can plastically depend on their microbiota for antipathogen defenses. Theory (Vorburger and Perlman 2018;Metcalf and Koskella 2019) and empirical work (Martinez et al. 2016) suggest that microbe-mediated protection could select for reduced host investment in defense over evolutionary time. The loss of key immune genes in symbiont-colonized host species (Gerardo et al. 2010;Parker et al. 2011;Kaltenpoth and Engl 2014) is also a pattern suggestive of divestment of hostbased immunity in defensive symbioses.
We experimentally copassaged a protective bacterium (Enterococcus faecalis) and pathogen (Staphyloccocus aureus) within nonevolving nematode (Caenorhabditis elegans) populations to track changes in the cost (protective bacteriuminduced host mortality) and benefit (reduction in pathogeninduced mortality) of the protective microbe to the host, along with the host's transcriptional response. This nematode is well established for investigating host-microbe associations (Clark and Hodgkin 2014;Petersen et al. 2015). Enterococcus faecalis is naturally protective in a variety of animals (Heikkil€ a and Saris 2003;Mart ın-Platero et al. 2006), and although C. elegans likely encounter Staphylococcus species in their natural habitat (Montalvo-Katz et al. 2013;Rossouw and Korsten 2017), specific interactions with S. aureus here are considered novel. These microbial species can undergo antagonistic coevolution in vivo (Ford et al. 2017). We have previously shown that within nematodes, E. faecalis adapts to interactions with S. aureus by increasing the production of reactive oxygen species (ROS) that suppress pathogen growth . Enterococcus faecalis can also exploit the iron-binding siderophores produced by S. aureus  favoring the evolution of reduced S. aureus virulence through decreased siderophore production .
In this study, we tested whether five independent E. faecalis populations that coevolved in vivo with S. aureus for ten host generations (isolates from Ford et al. , 2017 demonstrated evolutionary changes in protective ability and cost relative to E. faecalis populations that evolved alone ( fig. 1A; see Materials and Methods).

Results and Discussion
Coevolution Increased E. faecalis Protective Ability and Cost Our results were consistent with in vivo microbial coevolution favoring more protective, but also costlier, protective microbes. We measured host mortality after 24 h of E. faecalis monocolonization and found the coevolved bacterium was significantly costlier relative to the evolved (fig. 1B, binomial GLM: df ¼ 1, P ¼ 0.0062). Although significant, the mortality caused by coevolved E. faecalis remained relatively low (1% mortality in the host population after 24 h). We cannot rule out that host mortality following E. faecalis colonization could have further increased linearly given more evolutionary time. It is also likely there are sublethal costs to E. faecalis colonization that we did not measure. In natural host-protective microbe relationships, constitutive or context-dependent costs measured are often sublethal and can cause reductions in host fitness (Oliver et al. 2014).
We then compared the protective ability of E. faecalis across treatments against a common, ancestral pathogen stock (see Materials and Methods). Although we found that E. faecalis colonization reduced pathogen-induced mortality in both treatments (fig. 1C, Quasibinomial GLM: F ¼ 122.34, df ¼ 2, P ¼ 1.044e-08; post hoc Tukey: S. aureus alone vs. with coevolved E. faecalis: P < 0.001; S. aureus alone vs. with evolved E. faecalis: P < 0.001), coevolved E. faecalis was more protective than populations evolved as sole colonizers of the nematode gut (post hoc Tukey: with coevolved E. faecalis vs. with evolved E. faecalis: P ¼ 0.005). This costbenefit trade-off for the host is reflected in many natural defensive interactions (Polin et al. 2014;Martinez et al. 2015; for exception see Cayetano et al. 2015).

Coevolution Increased E. faecalis-Mediated ROS Production
Our previous work showed that ROS production by E. faecalis contributes to host-protection and can evolve rapidly . To test for differences in ROS production between treatments, we measured S. aureus growth in liquid coculture with E. faecalis, in the presence and absence of enzymes that remove ROS, superoxide dismutase (SOD), and catalase (CAT, see Materials and Methods). SOD converts superoxide to hydrogen peroxide, whereas CAT converts hydrogen peroxide to water and oxygen. We found that only coevolved E. faecalis produced sufficient ROS to inhibit S. aureus growth ( fig. 1D, t-test, Coevolution: control vs. SOD&CAT, t¼À4.6, df ¼ 8, FDR-adjusted P ¼ 0.003; Evolution: control vs. SOD&CAT, t ¼ 0.98, df ¼ 8, FDRadjusted P ¼ 0.35). Consistent with this, we found numerous differences between our evolved E. faecalis populations at single nucleotide polymorphisms (SNPs) in genes linked to ROS production (supplementary table 1, Supplementary Material online). These data were collected by sequencing 40 pooled clones from each population. Supplementary table 1, Supplementary Material online, lists all the SNPs observed at frequencies higher than a minimum noise threshold of 15% per population. In the right-most column, we have annotated SNPs that appear to link to ROS. SNPs linked to ROS included ones that were within or next to genes involved in energy metabolism, flavin-containing oxidoreductases known to lead to ROS production (Messner and Imlay 2002), ROS scavenging, and the production and transport of xanthine which can be oxidized to produce ROS (Huycke et al. 2002).

Increased Protection Stimulates Iron and ROS Homeostasis in Infected Hosts
We tested whether increased microbe-mediated protection corresponded with reduced host immune gene expression during pathogen attack. First, we examined whether there were any differences in host transcription in response to colonization by coevolved and evolved E. faecalis populations in the absence of the pathogen ( fig. 2A, see Materials and Methods). We did not find any genes that were significantly differentially regulated. This indicates that differences in protective ability or cost do not affect host transcription in uninfected hosts. Second, we examined whether there were differences in host transcription during colonization by the E. faecalis populations in the presence of the pathogen (fig. 2B, see Materials and Methods). We found that coevolved E. faecalis significantly altered the expression of 134 Host Protection and Plastic Downregulation of Immunity . doi:10.1093/molbev/msaa292 MBE C. elegans genes relative to evolved E. faecalis within infected hosts (supplementary file 1, Supplementary Material online). We performed a GO-term enrichment analysis (see Materials and Methods) and found that these genes were significantly enriched for molecular functions that point to ROS production and iron metabolism, including: oxidoreductase activity (GO: 0016491, FDR-adjusted P ¼ 1.5E-06), iron ion binding (GO: 0005506, FDR-adjusted P ¼ 0.0001), heme binding FIG. 1. In vivo coevolution with pathogens favors costlier, but more protective microbes. (A) Within nonevolving Caenorhabditis elegans hosts, Enterococcus faecalis populations were either coevolved with Staphylococcus aureus or were evolved on their own. This procedure was continued for ten passages (see Materials and Methods for full protocol). (B) Host mortality (cost) due to colonization by coevolved/evolved E. faecalis. Binomial GLM: df ¼ 1, P ¼ 0.0062. (C) Host mortality following exposure to S. aureus exposure alone (magenta) or with either coevolved or evolved E. faecalis (dark or light turquoise, respectively). Quasibinomial GLM: F ¼ 122.34, df ¼ 2, P ¼ 1.044e-08. Post hoc Tukey: S. aureus alone versus with coevolved E. faecalis: P < 0.001; S. aureus alone versus with evolved E. faecalis: P < 0.001. Coevolved E. faecalis versus with evolved E. faecalis: P ¼ 0.005. (D) In vitro population size of S. aureus in colony-forming units per ml (CFU/ml) after coculture with either coevolved or evolved E. faecalis. CFUs/ml were also counted upon the addition of superoxide dismutase and catalase enzymes which remove superoxide and hydrogen peroxide from the media. t-Test, coevolution: control versus SOD&CAT, t ¼ À4.6, df ¼ 8, FDR-adjusted P ¼ 0.003; evolution: control versus SOD&CAT, t ¼ 0.98, df ¼ 8, FDR-adjusted P ¼ 0.35. All experiments were repeated twice and results were combined. Each treatment was replicated five times. *P < 0.05, **P < 0.01, ***P < 0.001. Bar plots show 62SE. Caenorhabditis elegans hosts were exposed to either the coevolved or evolved E. faecalis populations. After 12 h, worm RNA was extracted for gene expression analysis, and we found no significantly differentiated host genes. (B) Caenorhabditis elegans hosts were exposed to ancestral S. aureus alongside either the coevolved or evolved E. faecalis populations. After 12 h, worm RNA was extracted, and we found 134 genes that were differentially expressed between the treatments. Ford and King . doi:10.1093/molbev/msaa292 MBE (GO: 0020037, FDR-adjusted P ¼ 0.035), and flavin adenine dinucleotide (FAD) binding (GO: 0071949, FDR-adjusted P ¼ 0.03), among others (see supplementary file 2, Supplementary Material online). FAD is the coenzyme for flavoprotein oxidoreductase enzymes which can contain iron and are important for ROS production (Messner and Imlay 2002). Likewise, heme proteins contain iron and play a key role in oxidoreductase activity (Zhang et al. 2019).
We have presented the 134 genes and the corresponding molecular functions as a chord plot in figure 3, where for ease of visualization, we have collapsed molecular functions into broader "parental terms" (we set the minimum term size to 120 within g: profiler). This plot shows that most genes, in particular those relating to oxidoreductase activity, have been relatively downregulated (depicted by beta values which are the natural log-fold change in expression). These changes could, however, lead to increased or decreased ROS production by nematodes due to the complex interaction of genes within and across pathways.
The same group of 134 genes that were differentially expressed in infected hosts responding to coevolved E. faecalis (relative to the evolved E. faecalis treatment), showed enrichment for cellular compartments linked to ROS production and iron-utilization. These cellular compartments include microbody (GO: 0042579, FDR-adjusted P ¼ 0.0005), peroxisome (GO: 0005777, FDR-adjusted P ¼ 0.0005; KEGG: 04146, FDR-adjusted P ¼ 0.003), and mitochondrion (GO: 0005739, FDR-adjusted P ¼ 0.005) (see supplementary file 2, Supplementary Material online). These compartments are sites of iron utilization and can generate ROS. The mitochondrion synthesizes iron-containing prosthetic groups including heme and iron-sulfur clusters and is the site of the electron transport chain which produces ROS. In addition, peroxisomes are microbodies that also contain catalase enzymes which contain iron and remove hydrogen peroxide.
Taken together, these results suggest that coevolved and evolved E. faecalis populations are differentially affecting nematode iron and ROS homeostasis. ROS production is a major protective mechanism by E. faecalis, but also an effective antipathogen defense across numerous animal species including C. elegans (Ch avez et al. 2007). These molecules can also Host Protection and Plastic Downregulation of Immunity . doi:10.1093/molbev/msaa292 MBE cause damage to animal host cells (Staerck et al. 2017), suggesting that the cost-benefit trade-off for the host to harbor E. faecalis may be the result of antagonistic pleiotropy in the ROS mechanism. Moreover, iron homeostasis is inherently linked to ROS production. Too much cellular iron catalyzes the generation of ROS that damages DNA and proteins, whereas too little cellular iron causes cell cycle arrest and cell death (Anderson and Leibold 2014). We know from previous research that S. aureus produces siderophore proteins that bind iron . It is therefore likely that increased S. aureus suppression by coevolved E. faecalis alters iron availability relative to evolved E. faecalis. We therefore hypothesize that nematodes are making plastic physiological adjustments to respond to either E. faecalis-produced ROS, the reduction in S. aureus infection load, or both. These factors resulting from the microbial warfare within may reduce the incentive for hosts to produce ROS themselves.

Increased Microbe-Mediated Protection Downregulates a Key Immune Gene in Infected Hosts
Of the 134 differentially regulated genes, the most significantly differentiated was a key immune gene, . This gene encodes a sorbitol dehydrogenase that has been shown to be upregulated in C. elegans upon S. aureus infection and to contribute toward nematode resistance to this pathogen (Irazoqui et al. 2010). Upregulation of has also been documented in nematodes infected by other pathogens (O'Rourke et al. 2006). We found that was significantly downregulated in nematodes colonized by coevolved E. faecalis compared with evolved E. faecalis populations (supplementary file 1, Supplementary Material online, fig. 4, Sleuth test for differential expression: adjusted P ¼ 0.0033, test statistic¼ 27.7, df ¼ 1, beta value¼À1.27). This downregulation was only observed in S. aureus-infected hosts (we did not find any differentially expressed genes when comparing hosts monocolonized by protective microbes, see previous section). These findings indicate that stronger microbe-mediated protection against pathogens causes a plastic reduction in a key host immune gene against S. aureus. Our results do not however rule out the involvement of other host immune genes in defense or that might be upregulated at other time points to compensate for the downregulation of we observed. Moreover, future work should measure the protein activity to investigate functional links with immune system responses.
There may be a relationship between , oxidative stress, and antipathogen defense in our system. Electronic annotation (NCBI) infers that has oxidoreductase activity (GO: 0016491; GO: 0055114), suggesting a role in regulating host ROS levels. Previous research has also found that can be positively regulated by the DAF-16-mediated stress response pathway in C. elegans (Senchuk et al. 2018) with daf-16 expression itself positively regulated by host ROS. Conversely, we find that the protective E. faecalis populations producing more ROS drove relatively lower expression during host infection. Given we also do not see differential regulation of daf-16, could be controlled by more than one pathway, or the relationship between ROS and is more complex. We do note a slight downregulation of the gene lbp-5 in the coevolution treatment, a gene which can regulate expression (Xu et al. 2014). However, contrary to our findings, a deficiency in lbp-5 expression has been shown to decrease oxidative stress resistance, and ramp up ROS production as well as expression by C. elegans (Xu et al. 2014). The extent to which interactions between these pathways control , and with expression-level dependent regulation, is unclear. Nonetheless, the apparent relationship between , oxidative stress, and defense against pathogens warrants further research in protective microbiota research.

Conclusion
Microorganisms can rapidly evolve in response to the ecological interactions taking place within the host microbiome (Barroso-Batista et al. 2020), but also with infecting pathogens (Ford et al. 2017). We found that the coevolutionary race between protective and pathogenic microbial species in animal populations caused a trade-off whereby enhanced microbe-mediated defense was associated with a larger cost. Specifically, we found that in vivo coevolution with S. aureus favored E. faecalis populations that produce more ROS. Patterns of host transcription indicated that hosts responded to increases in the strength of microbemediated protection. Highly protected hosts differentially regulated iron metabolism and ROS production pathways, suggesting hosts monitored changes in their internal environment caused by the ROS protective microbial weaponry. These hosts may also have divested of a component of their own defenses in favor of the microbial one. They reduced expression of an important immune gene, , known to be useful in C. elegans against S. aureus and other pathogens. These findings hint at the ability of hosts to maintain control over their microbiota by detecting and responding to evolutionary changes in beneficial as well as harmful microbial traits (Foster et al. 2017).

FIG. 4. Coevolved Enterococcus faecalis downregulates the expression of in infected
Caenorhabditis elegans compared with E. faecalis that evolved alone. After 12 h of exposure to Staphylococcus aureus and either E. faecalis from the coevolution or evolution treatment, we measured host transcription. Here, we show the transcripts per million (TPM) of the most significantly differentially expressed gene between the two treatments, (supplementary file 1, Supplementary Material online, Sleuth test for differential expression: , adjusted P ¼ 0.0033, test statistic¼ 27.7, df ¼ 1, beta value¼À1.27). *P < 0.05, **P < 0.01, ***P < 0.001. Bar plots show 62SE. Ford and King . doi:10.1093/molbev/msaa292 MBE The dynamic balance between the evolving benefits and costs highlights the riskiness of a host strategy to depend on protective microbiota for antipathogen defenses. Once the pathogen is cleared or absent from the community, the microbial symbiont may become too expensive. As infection risks vary during the lifetime of a larger host, maintaining plasticity in immune responses may allow hosts to break up the symbiosis when costs are too great (Palmer et al. 2008). Evolved dependence may make hosts highly vulnerable to harm from protective microbes, but also to pathogens if the microbial line of defense was ever lost. The evolution of host dependence on microbes is uncommon among defensive symbioses in nature, compared with nutritional hostmicrobe symbioses (Fisher et al. 2017), perhaps because of these shifts in the net benefits.

Nematode Host and Bacteria System
The simultaneous hermaphroditic N2 wild-type C. elegans was sourced from the CGC (University of Minnesota, MN). A genetically homogenous line was generated by selfing a single hermaphrodite for five generations. Populations of these worms were frozen in 50% M9 solution and 50% liquid freezing solution in cryotubes at À80 C (Hope 1999). Populations were regularly resurrected throughout experimentation to prevent the accumulation of de novo mutations in host populations. Nematodes were maintained at 20 C on nematode growth medium (NGM) with Escherichia coli OP50, a standard lab-based food (Hope 1999). The E. coli OP50 was grown at 30 C shaking (200 rpm) overnight in lysogeny broth and 100 ml of culture was spread on NGM plates and incubated overnight at 30 C (Hope 1999). To clean stocks and synchronize life stages, worms were treated with NaClO and NaOH which kills everything except unhatched worm eggs (Hope 1999).
We used S. aureus MSSA 476 (GenBank accession number BX571857.1), an invasive community-acquired methicillinsusceptible isolate, as the pathogen in our system. As the protective microbe, we used Enterococcus faecalis OG1RF (GenBank accession number CP002621.1), an isolate from the human digestive tract. A single ancestral population of each species was grown from a single colony overnight in 6 ml Todd Hewitt Broth (THB) shaking at 200 rpm at 30 C. Bacteria were frozen in a 1:1 ratio of sample to 50% glycerol solution in cryotubes at À80 C.

In Vivo Experimental Coevolution
The evolution experiment consisted of two treatments: 1) S. aureus and E. faecalis were copassaged within C. elegans (and so allowed to coevolve), and 2) E. faecalis was passaged alone within C. elegans ( fig. 1A). Each treatment consisted of five replicate populations with ten passages. We have previously found that this number of passages is sufficient for microbial evolution in the traits of interest to occur within populations of C. elegans .
Populations of E. faecalis and S. aureus were cultured overnight in 6 ml THB shaking (200 rpm) at 30 C. After standardizing the cultures to OD600 of 1.00, 120 ml E. faecalis liquid culture or a mixture of 120 ml S. aureus and 120 ml E. faecalis was spread onto Trypic Soy Broth (TSB) agar plates and grown overnight at 30 C. Both treatments provided bacterial cells in abundance to avoid differences in cell numbers ingested by the worms. Approximately 1,000 young adult nematodes were exposed to each replicate plate across both treatments at 25 C. This was done by homogenously mixing a solution of worms in M9 buffer and using a pipette to measure how many worms were in 5 ml droplets. We found that the most accurate results were achieved by cutting the end of the pipette tip for a wider aperture. We took five of these measurements and calculated an average. We then calculated how much of the worm-M9 solution to add to each plate in order to achieve $1,000 worms. We allowed the M9 on the exposure plates to dry for 10 min prior to incubation.
After 24-h exposure, ten dead worms per replicate (considered dead after not responding to touch with a platinum wire) were washed by being transferred with platinum wire between five 5-ml drops of M9 buffer. Worms were then crushed in 20 ml M9 with a pestle and streaked onto selective media (TSB with 100 mg/ml rifampicin to select E. faecalis and Mannitol Salt Agar, MSA to select S. aureus) and cultured overnight at 30 C. Ten colonies per species per replicate were grown in THB overnight, shaking (200 rpm) at 30 C, and then used to make the exposure plates for the next passage. The above steps were repeated nine more times.

Evolution of Microbe-Mediated Protection and Costs to Hosts
Protective ability was assessed by calculating the proportion of dead worms in the population after 24-h pathogen exposure, with and without E. faecalis cocolonization. Cost was assessed by calculating the proportion of dead worms in the population after 24-h exposure to E. faecalis. The protocol of exposure was the same as in the coevolution experiment (see above). Approximately 150 young adult worms from the stock population were placed onto exposure plates and incubated at 25 C for 24 h. Exposure plates were labeled with a random code so that the treatments were unknown during measurement. The total number of worms and the number of dead worms were counted and the proportion dead calculated as mortality rate. Both cost and protection experiments were repeated twice independently and the counts of total and dead worms were summed prior to statistical analysis.

Reactive Oxygen Species Production
Enterococcus faecalis-mediated suppression of S. aureus via ROS production was assessed in vitro. We performed this experiment with either coevolved or evolved populations of E. faecalis against the ancestral stock of S. aureus. Bacteria were cultured overnight in THB shaking (200 rpm) at 30 C. THB solution was made with 0.25 M potassium phosphate buffer containing SOD from bovine erythrocytes (Sigma-Aldrich) and CAT from bovine liver (Sigma-Aldrich), each at a concentration of 0.25 mg ml À1 . An enzyme-free THB Host Protection and Plastic Downregulation of Immunity . doi:10.1093/molbev/msaa292 MBE solution served as control with only 0.25 M potassium phosphate buffer. After standardizing the bacteria (OD600 of 1.00), 3 ml of each species was added to 194 ml of THB and shaken at 30 C for 24 h. Colony-forming units per ml (CFU/ml) of S. aureus were counted by plating dilutions onto MSA plates. This experiment was repeated two independent times and the results were averaged per replicate population.

Host RNA Extraction and Analysis
We examined host gene expression upon sole colonization with E. faecalis populations that either coevolved with S. aureus compared with E. faecalis populations that evolved on their own in the host ( fig. 2B). We subsequently measured how these protective microbes affected host gene expression in response to infection by S. aureus by performing cocolonization experiments ( fig. 2B).
Sterile and age-synchronized nematode eggs were collected using the bleach-sodium hydroxide solution. These eggs were kept in M9 buffer without food, shaking overnight at 88 rpm and 20 C to further synchronize the age of each worm. These worms were then transferred to NGM plates with E. coli as food and kept at 20 C. Approximately 5,000 worms were raised on each plate for 2 days. Enterococcus faecalis and S. aureus were then grown overnight in 6 ml THB in a shaking incubator (200 rpm) at 30 C. Exposure plates were made in the same way as for the evolution experiment (see above). At this point, worms were washed three times in 50 ml M9 buffer using gravity. Approximately 2,000 young adult worms were then exposed to the bacterial lawns and were incubated at 25 C for 12 h.
After 12 h of exposure to the bacterial treatments, we collected the worms in M9 buffer and washed them five times by diluting them in 10 ml M9 buffer, using gravity to settle them between washes. Populations were processed randomly across treatments (using a random number generator) and within 10 min of collection. For each replicate, $1,000 worms were collected from each sample using the technique described above (see In Vivo Experimental Coevolution) and placed into an Eppendorf tube containing 1 ml M9 buffer. When the worms settled at the bottom of this tube, we used a pipette set to 50 ml to collect the pellet of $1,000 worms in 50 ml M9 buffer. We then added this 50 ml M9 solution of worms to 1 ml of Trizol in an Eppendorf tube. This worm collection protocol ensured a consistent concentration and number of worms over all samples. Samples were vortexed for 20 s, freeze-thawed three times to break the worm cuticle using dry ice and a heat block (40 C), and stored at À80 C. RNA was extracted using Zymo spin columns with on-column DNA digestion using DNase I. RNA was quantified by Qubit (Invitrogen) and all samples diluted to the same final concentration. Library preparation and sequencing were performed (Oxford Genomics Centre). The mRNA fraction was selected from the RNA using the polyA signal and converted to cDNA. Second-strand cDNA synthesis incorporated dUTP. The cDNA was then end-repaired, A-tailed, and adapter-ligated. Prior to amplification, samples underwent uridine digestion. The prepared libraries were size selected, multiplexed, and quality controlled before paired-end sequencing over five units of a flow cell. Sequencing was carried out using NovaSeq6000 with 150-bp paired-end reads.
Raw reads were checked for quality using FastQC (0.11.5). Release 96 GTF and cDNA FASTA files were downloaded from the ensemble database for C. elegans (WBcel235) and a transcript index was created using kallisto. Pseudoalignment was performed using kallisto with 100 bootstraps.

Statistical Analysis
Pseudoalignment outputs from kallisto were analyzed using sleuth in R v 3.2.0 (http://www.r-project.org/), testing for differential gene expression by treatment and correcting for multiple comparisons. GO term enrichment analysis on the target IDs of differentially expressed genes used the g: Profiler tool online with the Benjamini and Hochberg false discovery rate (FDR) correction for multiple comparisons (Raudvere et al. 2019). The remaining analyses were performed within R. The Shapiro test was used to detect whether data were normally distributed and F-tests to compare the variances of two samples from normal populations. A binomial GLM was used to compare E. faecalis cost, based on the number of live and dead worms. To account for overdispersion, a quasibinomial GLM was used to compare E. faecalis protective ability, based on the number of live and dead worms. Plots of the GLMs were checked by eye for model quality and Tukey contrasts were used for post hoc comparisons. t-Tests were used to compare E. faecalis suppression of S. aureus via ROS and P values were corrected using the p.adjust() function with the Benjamini and Hochberg FDR method.