Parallel ecological and evolutionary responses to selection in a natural bacterial community

Significance Bacterial communities possess remarkable taxonomic and metabolic diversity and play a key role in nearly every biogeochemical process on Earth. Rapid evolution (occurring over ecological time scales) can in principle shape these processes, yet we have little understanding of its importance in natural communities. Here, we quantified how the production of metal-detoxifying siderophores is driven by species compositional changes and evolution in a compost community in response to copper stress. We found that siderophore production converged at intermediate levels, with evolutionary and ecological changes occurring at similar rates. Understanding how ecological and evolutionary processes contribute to shaping community trait distributions will improve our ability to predict ecosystem responses to global change and aid in the engineering of microbial consortia.

Changes in community trait distributions are typically driven by interspecific competition changing the abundance of species carrying certain traits (i.e., ecological species sorting) ( 1 ).In the case of microbial communities, which have massive population sizes and short generation times, evolution can occur over timescales commensurate with ecological species sorting ( 2 -4 ), suggesting a potentially important role of rapid evolution in shaping community trait distributions ( 5 -7 ) and responses to environmental change ( 8 ).Understanding the mechanisms underpinning community trait distributions is not only of fundamental interest but also has applied relevance ( 9 -11 ), such as in the engineering of microbial consortia to perform valuable biological tasks ( 12 ), including bioremediation ( 13 ), and the development of microbiome technologies aimed at improving human health and crop yield ( 14 ).
Most work demonstrating a role of rapid evolution in community dynamics has been carried out in in vitro environments ( 2 , 15 ) and/or has relied on the use of greatly simplified communities ( 3 , 16 , 17 ).This may overestimate the role of rapid evolution in community dynamics because, in addition to the typically very strong selection pressures associated with novel in vitro environments ( 4 , 18 ), ecological complexity itself can constrain evolution ( 19 -22 ) (but see ref. 23 ).The response to selection-resulting from ecological species sorting or within-species evolutionary change-typically increases with trait variation ( 24 ).Increasing species diversity can both increase between-species trait variation and reduce within-species variation-the latter because of reduced population sizes ( 25 , 26 ).The relative importance of ecological species sorting versus evolution on shaping trait distributions is therefore likely to increase with species diversity ( 1 , 19 ).While some recent work has demonstrated rapid evolution occurring over ecological timescales in more complex communities and/or seminatural environmental contexts ( 2 -4 ), the role of ecological species sorting versus evolutionary selection in shaping natural community trait distributions is unclear.
A useful model system to track simultaneous ecological and evolutionary changes in functional traits is the ubiquitous production of metal-chelating siderophores in bacterial communities ( 27 ).Although perhaps best known for their function as iron carriers ( 28 , 29 ), siderophores can also protect bacteria from toxic metal stress by preventing the diffusion of toxic metals into bacterial cells ( 30 , 31 ).Because detoxification takes place in a shared pnas.orgenvironment, these costly extracellular compounds not only protect the producer but potentially also neighboring conspecifics ( 32 ) and other community members ( 33 , 34 ).By acting as community-wide public goods, siderophores play a key role in driving species interactions ( 35 ) and adaptive responses to environmental change ( 34 ).We previously determined the effect of toxic metals on siderophore production in natural bacterial communities inhabiting mine-degraded soils ( 33 , 36 ) as well as in experimental compost communities exposed to copper stress ( 33 ).In both cases, the presence of toxic metals selectively favored bacterial taxa with greater investment in siderophores, thereby increasing community-wide siderophore levels.However, we have also found that bacterial taxa can benefit from siderophores produced by conspecifics ( 32 ) or individuals from phylogenetically diverse taxa ( 34 ), suggesting that selection for (higher or lower) siderophore production may also be affected by social interactions.
Here, we investigate ecological changes in siderophore production in response to copper stress in a compost bacterial community simultaneously with evolutionary change in siderophore production by a focal bacterium-the common soil-dwelling bacterium Pseudomonas fluorescens (strain SBW25) ( 37 ).We hypothesized that ecological changes in siderophore production resulting from exposure to copper stress would be greater than evolutionary changes that occurred within SBW25.We also expected the community to alter the evolutionary trajectory of SBW25's siderophore production as a consequence of both community-imposed evolutionary constraints and greater selection for lower-level siderophore production resulting from the protective effects afforded by other community members.

Results
Copper Favors Siderophore-Producing Taxa within the Compost Community.We set up a fully factorial experiment involving the presence/absence of the natural compost community, focal strain P. fluorescens SBW25, and copper pollution in initially sterile compost (SI Appendix, Fig. S1).These communities were allowed to evolve for 6 wk, after which we quantified changes in siderophore production by isolating 24 clones of SBW25 and 24 isolates per replicate community where possible (i.e., n = 48 isolates for the SBW25 + community treatments).Isolates were then grown individually in King's B (KB) broth for 48 h after which we measured the ability of culture supernatants to chelate iron using colorific chrome azurol S (CAS) assays, corrected for variation in optical density (our measure of siderophore production is based on arbitrary unity; see Methods).We found that copper selected for greater siderophore levels within the compost community compared to unpolluted control communities (Fig. 1A), irrespective of the presence of SBW25 [2-way generalized linear model (GLM) on mean community siderophore production: F 1, 20 = 0.01, P = 0.91 for copper × SBW25, F 1, 21 = 0.04, P = 0.85 for SBW25 and F 1, 22 = 8.88, P < 0.01 for copper treatment.GLM estimates of mean siderophore production ±95% CI in copperpolluted versus unpolluted communities pooled across SBW25 levels (i.e., presence/absence): 0.55 [0.53, 0.57] and 0.50 [0.48, 0.52], respectively].
To determine whether the observed shifts in siderophore production were linked to any compositional changes in the community, we determined the genus-level identity of all final-time-point compost isolates assayed for siderophore production (n = 548 isolates in total).We found that copper-mediated changes in siderophore production were accompanied by a shift in community composition (2-way PERMANOVA on Bray-Curtis dissimilarities: copper × social context: F 1, 20 = 2.47, P = 0.03), with between-community diversity differing significantly across all treatment combinations (pairwise PERMANOVAs: R 2 > 0.26, all P adj < 0.05; Fig. 1B ).In particular, the presence of SBW25 changed the relative abundance of taxa within the compost community by suppressing Pseudomonas, Bacillus, and Arthrobacter compared to the community-only treatment (all P adj < 0.05; SI Appendix, Fig. S2 ).We also found that copper tended to select against taxa that displayed relatively low mean levels of siderophore production (i.e., blue taxa in Fig. 1C .See SI Appendix, Table S1 for mean across-treatment siderophore production per taxon): In particular, while intermediate siderophore producers, such as Cupriavidus , were significantly more abundant in copper-polluted communities, Achromobacter and Lysinibacillus were negatively affected by copper stress.As a result of such ecological species sorting, the most abundant community members in copper-polluted compost were those displaying more intermediate siderophore levels ( Fig. 1D ).Note that evolution may also have contributed to changes in siderophore production, but this is impossible to quantify from these taxonomic results.We therefore focus on evolution within a focal strain.
Copper Selects against High Siderophore Levels within SBW25.
We tracked siderophore changes within replicate populations of SBW25 that had either evolved in the presence or absence of the compost community.We found the exact opposite response compared to that observed at the community level-toxic copper selectively favored SBW25 individuals that, on average, produced lower amounts of siderophore compared to control populations [linear mixed effects (LMM): copper effect: χ 2 1 = 10.97,P < 0.001.Mean siderophore production ±95% CI in copperpolluted versus control populations: 0.68 [0.67, 0.70] and 0.72 [0.71, 0.73], respectively].Again, the impact of copper stress on siderophore production did not differ significantly as a function of community presence/absence (LMM: interaction between copper × community: χ 2 1 = 0.22, P = 0.64; community effect: χ 2 1 = 1.97,P = 0.16; Fig. 2).
Copper Selects against Siderophore Extremes.How can we resolve these apparently opposing responses to copper-imposed selection operating at the species versus community level?To answer this question, we first compared the shape of the distribution of siderophore production of the compost community to that of SBW25.We found that copper selected against siderophore extremes, resulting in trait convergence (Fig. 3), regardless of whether SBW25 and the community were grown in isolation or together in coculture.
To quantify this convergence, we focused on the effect that copper has on siderophore production when the community and SBW25 were grown together, using a hierarchical Bayesian linear model to account for heteroscedasticity between isolate types (community versus SBW25; all point estimates are maximum a posteriori estimates ±95% credible intervals).The copper-mediated change in siderophore production in SBW25 was −0.042 [−0.072, −0.014].In contrast, copper stress increased siderophore production among compost community isolates by 0.044 [0.009, 0.081].Thus, the effect was of approximately equal magnitude, but in the opposite direction.Indeed, combining the posterior estimates for the effect of copper on siderophore production in SBW25 and in the rest of the community (positive values indicate that the positive effect on community isolates is larger than the negative effect in SBW25 and vice versa), the estimated combined effect was 0.001 [−0.044, 0.045].In the absence of copper, the difference in siderophore production between SBW25 and the compost community was 0.216 [0.185, 0.251].Copper pollution significantly reduced this figure by 0.086 [0.041, 0.133] to 0.130 [0.098, 0.161].Thus, opposing and approximately equal effects of selection lead to a significant reduction in the difference between (relatively high producing) SBW25 and (relatively low producing) community isolates under copper stress.
The model described above included separate SD parameters for each sample type (community/SBW25 × copper/no copper) to estimate their respective within-microcosm variation in siderophore production.The SD of siderophore production among SBW25 isolates was 0.0294 [0.0267, 0.0340] in the absence of copper.The copper treatment led to an increase of 0.006 [−0.00031, 0.0131] to 0.0354 [0.0315, 0.0427].Conversely, variation in siderophore production was reduced among compost community isolates in the presence of copper.Here, the SD fell from 0.0994 [0.0899, 0.115] to 0.0693 [0.0633, 0.0808] in response to the copper treatment, a significant difference of 0.0301 [0.0157, 0.0474].That the overall variation in siderophore production was much higher in the compost community than SBW25 is expected since measurements were taken from a range of unrelated strains.The decrease in variance due to copper stress suggests ecological species sorting (and some evolutionary change), whereas the increase in variance within SBW25 isolates is compatible with evolutionary change.
To further investigate the generality of this result, we focused on isolates of representative genera (n = 8 genera) that occurred in both copper environments and had been assayed for siderophore production.We found that trait changes were qualitatively similar: copper selected against siderophore extremes.That is, taxa with high "baseline" siderophore levels (i.e., mean siderophore levels > 0.55 in control conditions) produced fewer siderophores in Copper favors siderophore-producing taxa within the compost community.Panel (A) shows that copper-polluted (copper [+], orange) communities (n = 6) produced on average larger amounts of siderophore compared to copper-free (copper [−], blue) communities following 6 wk of evolution in isolation (light shading) or in coculture with SBW25 (dark shading) (n = 6 communities per treatment).The brown line and shaded area depict mean ± SE siderophore production of the ancestral communities (n = 12) prior to copper amendment.Boxes depict upper and lower quartiles of treatment-specific raw data, with the center line showing the median and whiskers providing a measure of 1.5× interquartile range.Points represent the mean value per community based on 24 isolates, with within-community variance indicated by different point sizes.Note that for some replicate communities, we isolated <24 isolates, yielding a total sample size of n = 548.Panel (B) depicts a Principal Coordinate Analysis (PCoA) plot based on Bray-Curtis dissimilarities between compost communities (excluding SWB25).The percentage of variation explained is shown on each axis, calculated from the relevant eigenvalues.Communities belonging to the same treatment are joined with straight colored lines (control no SBW25 = light blue, control SBW25 = dark blue, copper no SBW25 = orange, copper SBW25 = red), with large points representing treatmentspecific centroids and small points individual microcosms.Dissimilarities were calculated using data on the total abundance of different isolates (identified at the genus level) within each community that were assayed for siderophore production (n = 24 per community).Panel (C) depicts the effect of coper on the abundance of bacterial taxa in the compost community.The log2-fold change in total abundance of the 10 most common genera when comparing communities that had evolved in unpolluted versus copper-polluted compost.Of the taxa tested, three significantly differed in terms of total abundance between copper-free versus copper-polluted treatments: While Cupriavidus was positively affected, Achromobacter and Lysinibacillus were both negatively affected by copper stress (see SI Appendix, Table S1 table for Wald test and P-values).Points represent estimated log2-fold change in total abundance of each taxon in response to copper stress (averaged across culturing conditions) ± SE bars.Genera are color-coded based on their mean across-treatment siderophore production (see SI Appendix, Table S1 for mean across-treatment siderophore production per taxon), ranging from relatively low (blue) to intermediate (orange) and high (red) siderophore production.Panel (D) depicts the relative abundance of the 10 most common culturable compost taxa, excluding SWB25, following 6 wk of evolution under different selection regimes.Genera are listed in order of their across-treatment mean siderophore production (SI Appendix, Table S1), increasing from Top to Bottom, such that orange-coral taxa produce intermediate to relatively high levels of siderophores.

Direct Fitness Costs of High Levels of Siderophore Production in Copper.
Selection for siderophore production in the presence of toxic copper can be explained by the direct protective effects afforded by siderophores.However, what is less clear is why there was selection against high levels of siderophore production in toxic copper conditions.There are two general, nonmutually exclusive explanations.First, there may be a direct cost associated with greater investment in siderophores in copper when individuals produce more than enough siderophore to detoxify copper, making the excess an unnecessary metabolic burden.Second, individuals producing high levels of siderophore may protect competing conspecific and heterospecific individuals, increasing the relative cost of siderophore production.
We first explored how evolved changes in siderophore production affect individual performance in toxic copper conditions.Specifically, we determined whether SBW25 clones that had evolved to produce relatively low levels of siderophore displayed lower copper tolerance (n = 277 clones in total, all isolated from the "no community" treatment; SI Appendix, Fig. S1 ).To this end, evolved clones were individually grown in King's B broth supplemented with a toxic dose of copper sulfate (final concentration of 6.17 mM CuSO 4 ).We recorded changes in optical density (OD 600 ) over a 48-h period and estimated clone-specific Malthusian growth parameters (m ).Our results show that clones that had evolved in copper-free and copper-polluted compost grew equally well in toxic copper broth (LMM: effect of evolutionary background on m : χ 2 1 = 0.76, P = 0.39; SI Appendix, Fig. S4 ), suggesting that siderophores are effective in detoxifying copper.Furthermore, reduced investment in siderophores did not confer lower tolerance, irrespective of a clones' evolutionary history (LMM on m : siderophore production × copper background: χ 2 1 = 0.02, P = 0.88; copper background: χ 2 1 = 0.16, P = 0.69; siderophore production: χ 2 1 = 2.95, P = 0.09; SI Appendix, Fig. S4 ).The observed shift toward reduced siderophore levels in SWB25 therefore did not alter copper tolerance.
We next investigated why high investment in siderophores is costly in the presence of copper but not in the absence.We speculated that the constrained growth of SBW25 in the presence of copper (SI Appendix, Fig. S5 ) may have reduced levels of siderophore required for the canonical function of siderophores: iron uptake ( 38 ).To test this hypothesis, we manipulated population growth rates (and hence indirectly the need for iron to sustain growth) by inoculating monocultures of the wild-type pyoverdine-producing SBW25 strain and an isogenic pyoverdine-deficient mutant (PBR840) ( 39 ) in sterile compost at very low density (allowing for faster growth) and high density (allowing for slower growth), both in the presence and absence of copper pollution.This mutant does not produce the main siderophore pyoverdine (which reduces total siderophore production to 21% of the wild type) and displays levels of siderophore production similar to an average compost community member.

Public Goods Exploitation Favors Reduced Investment in
Siderophores.While direct costs and benefits could qualitatively explain our results, we next explored whether public goods exploitation could have played an additional role in driving selection against SBW25 individuals producing relatively large amounts of siderophores.Previous work investigating within-species exploitation of siderophores has demonstrated that siderophore production is costly to the individual (40,41), creating incentives for nonproducing "cheats" to invade and steal these public goods away from the producer (42).We have also found that bacterial compost isolates that invest relatively little in siderophores benefit from other species' detoxifying siderophores under similar levels of copper stress (34).However, siderophore-mediated facilitation could not fully rescue the growth of copper-sensitive isolates, nor did it result in exploitation (i.e., no detectable indirect costs by helping competitors) within the community over ecological timescales (34).Combined with our current finding of parallel changes in siderophore distribution at the within-taxon and community level (Fig. 3), we focus on social dynamics within species only.
To determine whether individuals with lower siderophore investment can exploit relatively high producers, we carried out competition assays.In particular, we manipulated the relative frequencies of the wild-type and pyoverdine-deficient mutant of SBW25 (1% or 99% starting frequency of strains) and assayed their relative performance following 7 d of growth in copper-polluted and unpolluted compost.Negative frequency-dependent fitness often characterizes social interactions in structured environments, where rare nonproducing cheats are more likely to readily encounter cooperators rather than other cheats and grow relatively well, while rare cooperators will mostly encounter cheats, but so will other cheats; with the latter suffering a greater relative growth cost.We found that the pyoverdine-deficient mutant experienced a relative selective benefit when rare, in particular in toxic copper conditions (GLM on selection coefficient (s ) of pyoverdine-deficient mutant: frequency × copper:  S7 ).This shows that in addition to direct fitness effects, social exploitation by conspecifics could also have contributed to the evolution of reduced siderophore production by SBW25 in response to copper stress.

Discussion
Using siderophores as a focal trait, we show that evolutionary and ecological processes operate in parallel and over similar timescales in a natural bacterial community, resulting in trait convergence toward intermediate siderophore levels in response to copper stress.In particular, copper-imposed selection changed the relative abundance of bacterial taxa by selecting against individuals that displayed extremes in siderophore investment.This pattern was consistent at the community-and within-taxon level.Crucially, changes in siderophore production not only resulted from ecological species sorting but also from evolutionary changes within Fig. 3. Copper leads to trait convergence by selecting against siderophore extremes.Panel (A) shows the frequency distributions of siderophore production in ancestral SBW25 populations (blue) and compost communities (brown) prior to copper amendment.Siderophore data were pooled across copper treatments and replicates (n = 24 isolates for each of the 12 replicate SBW25 populations/compost communities).Panel (B) demonstrates that the distribution of siderophore production in SBW25 (blue) and the community (brown) converges in response to copper stress, independent of whether these evolved in isolation (Top) or in coculture (Bottom).Siderophore data were pooled across replicates (n = 24 isolates for replicate population/community).Note that for some replicates, we isolated <24 clones/isolates of SBW25 or the community, yielding a total sample size of n = 1,049.Brown and blue vertical lines depict mean siderophore production of the ancestral compost communities and SBW25 populations, respectively.species: SBW25 adapted to copper stress by lowering its investment in siderophores to levels more comparable to that of an average compost community member.
In our system, copper pollution resulted in selection against siderophore extremes.We propose such stabilizing selection in part resulted from directly incurred costs borne by taxa with relatively low and high siderophore production.In particular, we have previously shown that bacterial compost taxa that invest relatively little in siderophores display reduced copper tolerance and suffer an absolute growth cost ( 34 ).Our current findings indicate that beyond a certain threshold, increased investment in detoxifying siderophores resulted in diminishing returns, thereby selecting against individuals producing relatively large amounts of siderophore.
This raises the question as to why siderophore production was maintained at higher levels in unpolluted compared to copperpolluted environments.It has been well established that siderophores play an important role in scavenging insoluble iron from the environment ( 35 ).Ironbound siderophores are typically imported by specific receptors that constrain their use by other competing strains, thereby limiting siderophore cross-feeding between strains (but see refs.43 and 44 ).As such, siderophores are thought to play a key role in determining the outcome of interspecific competition for iron ( 45 , 46 ).Hence, siderophores were likely positively selected for in copper-free conditions to pillage iron from competing strains.By contrast, competition for iron was likely reduced under copper stress because iron no longer limited bacterial growth rates (copper did); the main role of siderophores in copper-polluted conditions was to detoxify metals.
Social conflict and cooperation are often thought to play a key role in driving the eco-evolutionary dynamics of microbial communities ( 47 -52 ).In microbes, social behaviors are often mediated by secretion of "public goods"-metabolically costly compounds that benefit the producer, but that are open to exploitation by nonproducers that do not contribute their fair share but utilize the benefits afforded by their production ( 53 ).Most of our understanding of public good dynamics comes from work on within-species interactions ( 54 ), yet many public goods can simultaneously benefit other species ( 55 -59 ), particularly in microbial communities.Key examples include antibiotic-degrading enzymes ( 60 , 61 ), resource-scavenging molecules ( 54 , 62 ), immune-manipulating effectors ( 63 -66 ), and potentially siderophore-mediated detoxification.However, we found little evidence to suggest that interspecific facilitation and exploitation shaped siderophore production in this experiment: Siderophore production of neither the community nor SBW25 was qualitatively affected by the other, despite-and in line with previous work-SBW25 greatly altering community composition over the course of our experiment ( 67 ).We did find some evidence for within-species exploitation: The pyoverdine-deficient cheat accrued a relative fitness benefit when competing with wild-type pyoverdine-producing SBW25, in particular when rare, both in the presence and absence of copper.Such frequency-dependent dynamics are indicative of intraspecific exploitation of public goods in spatially structured environments ( 54 , 68 -70 ), and is predicted to increase variation within species while decreasing divergence between species, which is borne out by our results.
In our experiment, we quantified the potential of bacterial isolates to produce siderophores rather than their in situ production in compost.The transcription of genes encoding the proteins that participate in siderophore biosynthesis is tightly regulated by the presence of iron and/or toxic metals ( 30 ).However, the use of a common garden environment to quantify siderophores was necessary because: 1) for the majority of environmental isolates, we do not exactly know what kind of metal-chelating agents they produce, meaning a metagenomics approach is currently not viable; 2) it is notoriously difficult to extract siderophores from soil and link their production to specific taxa and 3) the presence of soil organic material and other factors in compost interferes with CAS assays.Notwithstanding, we demonstrate a direct link between relative changes in siderophore potential and fitness.
Our focus on public goods traits, such as siderophore production, may have overestimated the role of evolution.Previous work has shown that public goods cheats readily emerge via loss-of-function mutations, including cheats defective for quorum sensing ( 71 ) or the production of extracellular proteases ( 72 ), polysaccharides ( 73 ), and siderophores ( 69 ).For example, pyoverdine-deficient cheats typically evolve within days in the lab ( 74 ), often via single nucleotide polymorphisms (SNPs) in regulatory genes.However, overestimation of the role of evolution may be mitigated to some extent because, compared to many studies on the evolution of public goods, we evolved compost communities over an extended period which also allowed for major shifts in community composition.More broadly, adaptive evolution of a wide range of nonsocial traits can result from loss-of-function mutations through rewiring of regulatory and metabolic networks ( 75 ).Finally, gain of functions, including potential public goods traits, can also potentially evolve very rapidly via horizontal gene transfer [HGT; ( 76 -79 )].HGT can occur across large phylogenetic distances ( 80 ), which could actually increase the relative importance of evolution versus species sorting in shaping community trait distributions.
To conclude, we show that the importance of rapid evolution in shaping community trait distributions is not limited to simplified in vitro communities but can also play a role as important as species sorting within highly complex natural microbial communities.Furthermore, our results suggest that trait evolution may not always be qualitatively affected by interactions with other community members.
Bacterial Strains.We used P. fluorescens strain SBW25 as our focal species (37).This common soil-dwelling bacterium produces a variety of siderophores, including pyoverdine (44) and an ornicorrugatin-like siderophore (81), that are able to chelate iron.The strain's primary siderophore-pyoverdine-has been shown to bind copper (30), which renders the environment less toxic by preventing diffusion into the bacterial cell (31).To facilitate isolation of SBW25 from the community, the strain was modified by inserting a LacZ genetic marker and a gentamicin-resistance cassette, which resulted in blue resistant colonies when plated out on Lysogeny Broth (LB) agar supplemented with 90 μg/mL 5-Bromo-4 -chloro-3-indolylβ-D-galactopyranoside (X-gal) and 25 μg/mL gentamicin (32).
To isolate the compost community, 40 g of fresh compost (Verve John Innes No. 1) was added to 200 mL of M9 minimal salt solution and incubated shaken at 150 rpm at 28 °C for 24 h.The supernatant was plated out on LB agar to verify the presence of a bacterial community, and also on LB supplemented with 30 μg/ mL gentamicin to verify the susceptibility of the community to this antibiotic (32).A 20% glycerol stock solution was prepared from the aqueous sample suspension and frozen at −80 °C for future use.
Selection Experiment.Compost microcosms were established with 30 g of twice-autoclaved sterile compost in round 90 mm petri dishes.To track ecological and evolutionary changes in siderophore production, we seeded 12 replicate compost microcosms with 1) a soil wash of the isolated compost community, 2) an overnight culture of SBW25 or 3) both together at a 1:1 ratio (n = 36 compost microcosms in total, SI Appendix, Fig. S1), keeping total inoculation density constant (~5 × 10 7 cells).Note that results of the community-only treatment were published previously (33).Compost microcosms were incubated at 26 °C and 75% relative humidity for 24 h, after which half of the microcosms of the above treatments (n = 6) was supplemented with a toxic dose of copper (2 mL of filter-sterilized 0.25 M CuSO 4 ) and the remainder with an equal volume of sterile ddH 2 0 (33).Microcosms were incubated for a total of 6 wk.After 3 wk, a second dose of copper or ddH 2 O was added to the relevant microcosms.Samples were taken just before ("ancestral") and 6 wk after copper amendment ("evolved") by transferring 1 g of compost per microcosm to 6 mL of M9 solution in 30 mL glass vials.Vials were shaken for 2 h at 26 °C at 180 rpm, after which supernatants were frozen in glycerol (25% final concentration) at −80 °C for future assays.

Phenotypic Assays on Ancestral and Evolved Isolates.
Siderophore production.To quantify siderophore production, serial-diluted freezer stocks (taken just before and 6 wk after giving the first dose of copper) were plated out on duplicate LB agar plates supplemented with i) X-gal to isolate members of the compost community or ii) X-gal and gentamicin to isolate SBW25 colonies.Following 48 h of incubation at 26 °C, individual colonies could be identified, counted, and picked.For each unique treatmenttime combination, we picked 24 colonies of the compost community and/or SBW25 per replicate, with a total of 48 colonies picked from compost microcosms seeded with both SBW25 and the community.Individual colonies were grown in King's B (KB) broth for 48 h at 26 °C, after which the supernatant was assayed for the extent of iron chelation.Siderophore production was quantified using the liquid CAS assay described by Schwyn and Neilands (82).Siderophore production per isolate was estimated using [1 − (A i /A ref )]/(OD i ), where OD i = optical density at 600 nanometer (nm) and A i = absorbance at 630 nm of the assay mixture and A ref = absorbance at 630 nm of reference mixture (KB+CAS; A ref ).For some samples, absorbance reads were negative following reference correction, so we standardized siderophore production by setting the minimum observed value to zero.Note that CAS assays performed in iron-limited KB broth provided qualitatively similar results (34).
Copper tolerance.We determined the direct fitness consequences of copperimposed reductions in siderophore production in SBW25.Final-time-point clones (n = 277) isolated from populations that had evolved in the absence of the community were grown individually at 26 °C for 24 h, after which ~10 4 cells were inoculated into 96-well plate wells containing 200 μL of King's B broth supplemented with a toxic dose of copper sulfate (final concentration of 6.17 mM CuSO 4 ).Individual clones were incubated statically at 26 °C for 52 h, and their optical densities (OD 600 ) were measured every 8 to 12 h (Varioskan Flash plate reader, Thermo Scientific, Waltham, MA, USA).We determined the Malthusian growth parameter (m) for each clone as ln(final density/start density)/time (hours) (83).
Sanger Sequencing of Compost Isolates.The 16S rRNA gene of all final-timepoint compost isolates assayed for siderophore production was sequenced to confirm genus-level identity (i.e., n = 24 per replicate).PCRs were performed in 25 µL reactions containing 1× DreamTaq Green PCR Master Mix (2×) (Thermo Scientific), 200 nM of the 27F and 1492R primers, and 3 µL of 1:100 diluted culture that had undergone three freeze-thaw cycles.The thermal cycling parameters were set to 94 °C for 4 min, followed by 35 cycles of 1 min at 94 °C, 30 s at 48 °C, and 2 min at 72 °C, and a final extension of 8 min at 72 °C.Following apurinic/apyrimidinic exonuclease (Exo-AP) clean-up, high-quality samples were Sanger sequenced using the 27F primer (Core Genomic Facility, University of Sheffield).Sequence quality was assessed using the R "dada2" package (84), and sequences were trimmed in Genious (85) to achieve an overall quality score >35.Using Mothur (86), sequences longer than 300 bp were then aligned to the Silva.Bacteria.Fasta database, and taxonomy was classified using the RDP trainset 14 032015 as a reference database.
The Role of Siderophores as Iron-Scavengers as a Function of Density.To determine whether high siderophore production was selected against as a result of iron being less limited under toxic copper conditions, we conducted competition assays between the pyoverdine-producing LacZ-marked SBW25 strain (37) and an isogenic pyoverdine-deficient mutant (PBR840) (39) in 30 mL glass universals containing 5 g of twice-autoclaved sterile compost.Using a full-factorial design, strains were grown in isolation or together at a 1:1 ratio at either low (10 2 colony forming units (CFUs)) or high inoculation density (10 6 CFU), keeping total inoculation density constant across these social contexts.Compost microcosms were incubated for 24 h at 26 °C and 75% relative humidity, after which we added a toxic dose of CuSO 4 (1 mL of 0.25 M CuSO 4 ) to half of the microcosms and an equal volume of sterile ddH 2 O to the remainder (n = 6 replicates per treatment).Compost microcosms were incubated for a total of 7 d, after which soil washes were taken, serial dilutions of which were plated out on KB agar.For cocultures, strains could be distinguished based on their colony pigmentation: Wild-type colonies were blue on X-gal supplemented KB agar, whereas mutant colonies were white.We determined the Malthusian growth parameter (m) for each strain as described above.
Public Goods Exploitation in SBW25.To determine whether social exploitation could have played an additional role in driving copper-mediated reductions in siderophore production in SBW25, we conducted competition assays between the pyoverdine-producing wild-type and pyoverdine-deficient mutant strain of SBW25 in petri dishes containing 30 g of twice-autoclaved sterile compost.Using a full-factorial design, strains were inoculated together at a low (1%, 10 4 CFU, n = 24) or high (99% 10 6 CFU, n = 24) frequency.Compost microcosms were incubated for 24 h at 26 °C and 75% relative humidity, after which we added a toxic dose of CuSO 4 (2 mL of 0.25 M CuSO 4 ) to half of the microcosms and an equal volume of sterile ddH 2 O to the remainder.Following 7 d of incubation, soil washes were taken and plated out on KB agar supplemented with X-gal to distinguish between strains.We determined the Malthusian growth parameter (m) for each strain as above.
Data Analyses.For all analyses, we used R Version 4.0.3(R Development Core Team; http://www.r-project.org).In general, models were compared by sequentially deleting terms and comparing model fits using F-tests or χ 2 -tests (where appropriate), after which pairwise contrasts were computed using the "emmeans" packages (87), with α < 0.05.In case of multiple pairwise testing, P-values were adjusted using the false discovery rate ("fdr") method unless stated otherwise.We checked residual behavior using the "DHARMa" package (88).All plots were produced using the "ggplot2" package (89).
The effect of copper on community structure and mean levels of siderophore production.To test for the effect of copper on siderophore production in compost communities that had either evolved with or without SBW25, we initially used a LMM model ("lmer" function in "lme4" package) (90) with copper × SBW25 presence as fixed explanatory variables, as well as their interaction.To account for nonindependency of observations we fitted random intercepts for individual microcosms.However, we observed strong heteroscedasticity of residuals, which could not be remedied by including a treatment-specific variance structure.For each replicate community, we therefore averaged siderophore production across the 24 compost isolates assayed and used a 2-way GLM with a Gaussian error distribution to test for the interactive effect of copper × SBW25 presence on mean community-wide siderophore production.This simplified model gave qualitatively very similar results to the LMM without violating any underlying model assumptions.
We determined the genus-level identity of all end-point compost isolates assayed for siderophore production (n = 24 per community) and used Principal Coordinate Analysis ordination plots to depict pairwise Bray-Curtis dissimilarities in community composition between microcosms (excluding observations on SBW25).To test for the interactive effect of copper × SBW25 presence on community structure we ran a permutational 2-way ANOVA test on Bray-Curtis dissimilarities using the "adonis2" function in the "vegan" package (91) with 9,999 permutations.Following this, we ran pairwise permutational ANOVAs to disentangle which treatments differed significantly from one another using the "calc_pairwise_permanovas" function in the "mctoolsr" package (https://github.com/leffj/mctoolsr/),with P-values corrected for multiple testing using the fdr method.We confirmed homogeneity of variance using the "betadisper" function in the vegan package to estimate group differences in dispersion and treated all copper × SBW25 combinations as levels of a single factor in a 1-way AVOVA on dispersion.
To determine which of the compost isolates differed in abundance across treatments, we fitted a negative binomial GLM to the data using the "DESeq" function in the R package "DESeq2" (92).We focused on a subset of 10 common compost isolates that occurred in both unpolluted and copper-polluted communities.Based on the outcome of pairwise permutational ANOVAs (see above), we initially included the interaction term between copper × SBW25 presence in the design of our GLM.However, following model reduction (likelihood ratio tests), the minimal adequate model was best described by only including the additive effect of copper and community context.Using this additive model, we calculated significant differences in the abundance of taxa using Wald tests, and we corrected P values for multiple testing for each of two contrasts used (presence/absence of either SBW25 or copper).
The effect of copper on mean siderophore production in a focal strain.To test for the interactive effect of copper and community context on siderophore production in SBW25, we used a LMM model with copper × community presence as fixed explanatory variables, as well as their interaction.To account for nonindependency of observations, we fitted random intercepts for individual microcosms.Based on the obtained simulation-based residual plots, we included a dispersion parameter for each of the copper × community levels, using the "glmmTMB" function in the glmmTMB package (93).The effect of copper on the distribution of siderophore production.To demonstrate that copper selectively favored intermediate siderophore levels, we determined the effect size of copper for bacterial taxa that commonly occurred in both copper treatments and related this to their mean siderophore production under nonpolluted conditions, using a Spearman rank correlation.Effect size was calculated using the "cohen.d"function in the "effsize" package (94).Cohen's d takes the difference between two means and expresses it in SD units, with negative values indicating a reduction in siderophore levels in response to copper, and vice versa for positive values.Effect size in compost communities evolved with SBW25.To determine the impact of copper on the siderophore production of both SBW25 and community isolates that had evolved together, we used a hierarchical Bayesian linear model which accounts for the differing variances associated with explanatory variables (i.e., siderophore measurements from community isolates were taken from diverse bacterial strains even within a single replicate community, as opposed to the originally isogenic SBW25 stocks): where X1 is a vector of indices indicating SBW25 versus community samples; X2 is a vector indicator indicating the presence/absence of copper; and replicate and group are vectors of indices denoting the replicate microcosm (from a given group) and the combination of isolate type (SBW25 versus community) and presence/absence of copper for each data point.The model above, with separate SD terms (σ) for each group, was chosen over models with one or two (determined by isolate type or copper presence) SD terms after model selection by Pareto smoothed importance sampling leave one out cross-validation (95).Inference was performed by Markov chain Monte Carlo using Turing.jl(96) in the Julia programming language (97): four chains of 1,000 samples each using the No U-Turn Sampler algorithm (98), with all R-hat scores <1.01.95% credible intervals were calculated as the 95% highest posterior density interval using StatisticalRethinking.jl(https://github.com/StatisticalRethinkingJulia/StatisticalRethinking.jl).Subsequently, point estimates were obtained by computing the maximum a posteriori parameter estimates of the same model, using Optim.jl(99) in conjunction with Turing.jl.To compare the positive effect of copper on siderophore production among compost community isolates with the negative effect on SBW25, we computed the posterior distribution of the combined effect as β 1 + β 2 by element-wise addition of Markov chain samples.The same approach was used to infer the posterior distribution of the difference between community and SBW25 siderophore production with copper (α 2α 1 ) and without [α 2 + β 2 -(α 1 + β 1 )].

The role of direct and indirect selection in favoring intermediate siderophore levels.
To test for whether copper-adapted clones of SBW25 evolved greater resistance to copper than those evolved under unpolluted conditions, we used a LMM model on m with evolutionary background as fixed explanatory variable.
To account for nonindependency of observations, we fitted random intercepts for individual microcosms.However, the variation explained by the random intercepts approached zero, causing singularity issues when fitting the LMM using the lme4 package.We therefore used the default setting of the nonlinear optimizer in the glmmTMB function for parameter estimation.We next tested whether increased investment in siderophores conferred greater copper tolerance by including siderophore production in the evolutionary LMM described above.We determined whether siderophores were selectively favored when iron was needed for growth by propagating a pyoverdine-producing and pyoverdine-deficient mutant strain of SBW25 in isolation and together at different inoculation densities under copper-polluted and unpolluted conditions.We first determined whether pyoverdines provide an absolute growth benefit to the wild-type producer under toxic copper conditions by comparing the Malthusian parameter (m) of individually grown strains using a GLM with density × strain × copper as explanatory variables, as well as all possible 2-and 3-way interactions.We next determined whether density differentially affected the performance of the pyoverdine producing and nonproducing strains during direct competition, using a LMM with m as response variable and strain × frequency as explanatory variables and random intercepts fitted for each microcosm (n = 24) to account for nonindependency of paired observations within microcosms.Finally, we were interested in how density affected the relative fitness of the pyoverdine-producing strain ( r producer = m producer ∕m non−producer ) (83) during direct competition with the mutant as a function of copper stress.We expected the pyoverdine-producing strain to be at a selective disadvantage under low growth conditions (i.e., when iron is not limiting growth).We tested this using a GLM with r producer as response variable and copper × density as explanatory variables, as well as their 2-way interaction.
Finally, we determined whether social exploitation could have played an additional role in selecting against high siderophore levels response to copper stress.To this end, we competed the pyoverdine-producing wild-type strain SBW25 and a pyoverdine-deficient mutant at a low (1%) or high (99%) frequency in copper-polluted and unpolluted compost.We determined whether copper differentially affected the relative fitness of the pyoverdine-deficient mutant (s mutant = m mutant − m wild−type ) (83) as a function of its initial frequency.Note that we used the selection rate (s) as a measure of relative fitness as some of the Malthusian growth parameters were negative (SI Appendix, Fig. S7).We expected the pyoverdine-deficient mutant to reap greater fitness benefits when rare and tested this hypothesis using a GLM with s mutant as response variable and initial frequency (low or high) × copper as fixed explanatory variables, as well as their interaction.
Data, Materials, and Software Availability.Quantitative data on siderophore production and fitness data have been deposited in Zenodo (https://zenodo.org/records/11639136).Previously published data were used for this work (33).

Fig. 1 .
Fig. 1.Copper favors siderophore-producing taxa within the compost community.Panel (A) shows that copper-polluted (copper [+], orange) communities (n = 6) produced on average larger amounts of siderophore compared to copper-free (copper [−], blue) communities following 6 wk of evolution in isolation (light shading) or in coculture with SBW25 (dark shading) (n = 6 communities per treatment).The brown line and shaded area depict mean ± SE siderophore production of the ancestral communities (n = 12) prior to copper amendment.Boxes depict upper and lower quartiles of treatment-specific raw data, with the center line showing the median and whiskers providing a measure of 1.5× interquartile range.Points represent the mean value per community based on 24 isolates, with within-community variance indicated by different point sizes.Note that for some replicate communities, we isolated <24 isolates, yielding a total sample size of n = 548.Panel (B) depicts a Principal Coordinate Analysis (PCoA) plot based on Bray-Curtis dissimilarities between compost communities (excluding SWB25).The percentage of variation explained is shown on each axis, calculated from the relevant eigenvalues.Communities belonging to the same treatment are joined with straight colored lines (control no SBW25 = light blue, control SBW25 = dark blue, copper no SBW25 = orange, copper SBW25 = red), with large points representing treatmentspecific centroids and small points individual microcosms.Dissimilarities were calculated using data on the total abundance of different isolates (identified at the genus level) within each community that were assayed for siderophore production (n = 24 per community).Panel (C) depicts the effect of coper on the abundance of bacterial taxa in the compost community.The log2-fold change in total abundance of the 10 most common genera when comparing communities that had evolved in unpolluted versus copper-polluted compost.Of the taxa tested, three significantly differed in terms of total abundance between copper-free versus copper-polluted treatments: While Cupriavidus was positively affected, Achromobacter and Lysinibacillus were both negatively affected by copper stress (see SI Appendix, TableS1table for Wald test and P-values).Points represent estimated log2-fold change in total abundance of each taxon in response to copper stress (averaged across culturing conditions) ± SE bars.Genera are color-coded based on their mean across-treatment siderophore production (see SI Appendix, TableS1for mean across-treatment siderophore production per taxon), ranging from relatively low (blue) to intermediate (orange) and high (red) siderophore production.Panel (D) depicts the relative abundance of the 10 most common culturable compost taxa, excluding SWB25, following 6 wk of evolution under different selection regimes.Genera are listed in order of their across-treatment mean siderophore production (SI Appendix, TableS1), increasing from Top to Bottom, such that orange-coral taxa produce intermediate to relatively high levels of siderophores.

Fig. 2 .
Fig. 2. Toxic copper favors the evolution of reduced siderophore production within SBW25.Boxplot showing that copper (copper [+], brown) selected for lower mean siderophore levels in SBW25 populations compared to copperfree conditions (copper [−], pink) irrespective of whether populations evolved in isolation (light-shading) or in coculture with the compost community (darkshading) (n = 6 populations per treatment).The orange line and shaded area depict mean ± SE siderophore production of ancestral SBW25 populations (n = 12) prior to copper amendment.Boxes depict the upper and lower quartiles of treatment-specific raw data, with the center line showing the median and whiskers providing a measure of 1.5× interquartile range.Points represent the mean value per population (n = 6 per copper treatment) based on 24 clones where possible, with within-population variance given by different point sizes.Note that for some replicate communities, we isolated <24 clones, yielding a total sample size of n = 501.

Fig. 4 .
Fig. 4. Benefit of different siderophore strategies is context dependent.Boxplot showing (A) the Malthusian growth parameter (m) of the pyoverdine-deficient mutant (blue) and pyoverdine-producing wild-type SBW25 strain (gold) as a function of inoculation density when individually grown in copper-polluted (copper [+]) and unpolluted (copper [−]) compost (B) the pyoverdine-deficient "cheat" receiving a relative selective benefit ( S mutants > 0) when rare, in particular when competing with the wild-type producer in copper-polluted compost.Strains were coinoculated together at different frequencies (1% or 99%) in copper-polluted (copper [+]) and unpolluted (copper [−]) compost.The blue horizontal line depicts equal fitness ( S mutants = 0) of competing strains.Boxes depict the upper and lower quartiles of treatment-specific raw data, with the center line showing the median and whiskers providing a measure of 1.5× interquartile range, and points show the raw data for each replicate population.