Fig 1.
Panel A: Eco-evolutionary dynamics in an isolated deme (m = 0) subject to constant antimicrobial input rate and intermediate environmental switching (Model & Methods). Top: Illustrative temporal evolution when the environment switches between mild (K+ = 12) and harsh (K– = 6) environments (env.) at rates , with cooperation threshold Nth = 3 (Model & Methods). Resistant microbes (blue, R) produce a resistance enzyme that locally inactivates the drug (green shade) at a metabolic cost. When
, the drug is inactivated in the entire deme and sensitive cells (red, S) benefit from the protection at no cost (e.g., bottom-left green shade). The fraction of S thus increases (solid red arrow). When
, the drug hampers the spread of S (top-right red crosshairs) while R’s remain protected and thrive (blue arrow). In the mild environment (left, K = K+),
, whereas
(solid red arrow). Similarly, in the harsh environment (right, grey background, K = K–), we still have
while
(blue arrow). K is assumed to switch suddenly between K+ and K– (environmental variability), driving the deme size (
) that fluctuates in time (Model & Methods, see Fig A in S1 Appendix and Sec. 1.2.3). When
(intermediate switching), the deme experiences bottlenecks at every mild (K = K+) to harsh (K = K–) switch. When
[26] (Model & Methods), demographic fluctuations may cause the extinction (ext.) of R cells after each bottleneck (curved dotted red arrow). Bottom: Stochastic realisation of NS (red) and NR (blue) in a deme vs. time, with parameters
(dashed), K+=400,
,
, and
(Model & Methods). White/grey background indicates mild/harsh environment. Population bottlenecks (white-to-grey) enforce transient NR dips (blue arrows) promoting fluctuation-driven R eradication (red arrow) [26] (Model & Methods). Panel B: Eco-evolutionary metapopulation dynamics; legend and parameters are as in panel A. The metapopulation is structured as a (two-dimensional) grid of connected demes, all with carrying capacity
given by Eq. (3). Each R and S cell can migrate onto a neighbouring deme at rate m (curved thin arrows, Model & Methods). Owed to local fluctuations of NR, drug inactivation varies across demes (different shades). Bottlenecks can locally eradicate R, e.g., in deme (*), but migration from a neighbouring deme (†) can rescue resistance (curved thin blue arrow). Resistance is fully eradicated when no R cells survive across the entire grid (curved dashed red arrow).
Fig 2.
The eradication of R cells depends on the bottleneck strength and migration rate.
The shared parameters in all panels are ,
, L = 20, a = 0.25, s = 0.1, Nth = 40, and
(Model & Methods) with migration according to Eq. (2a). Other parameters are as listed in Table 1. Panel A: Heatmap of the probability P(NR(t)= 0) of total extinction of R (resistant) cells as a function of bottleneck strength,
, and migration rate m at time t = 500. Each
value pair represents an ensemble average of
independent simulations, where we show the fraction of realisations resulting in complete extinction of R (resistant) microbes after 500 microbial generations (standard error of the mean in P(NR(t = 500)=0) below 4%; see S1 Appendix Sec. 3.3.2). The colour bar ranges from light to dark red, where darkest red indicates complete R extinction in all 200 simulations at time t = 500, P(NR(t = 500)=0)=1. The green line is the theoretical prediction of Eq. (6) and the white dashed vertical line indicates an axis break separating m = 0 and
(Model & Methods). The black and white annotated letters point to the specific
values used in the outer panels. Panels B-H: Typical example trajectories of the fraction of demes
without R cells, up to t = 500 microbial generations (gen.), defined by Eq. (7) and corresponding to the fixation of S in the metapopulation. (The fraction of demes without S cells,
, is vanishingly small and unnoticeable.) Here,
is shown as a function of time (microbial generations) for the
value pairs indicated in Panel A (see S1 Appendix Sec. 3).
Fig 3.
A closer look to individual demes: Migration and intermediate environmental switches shape local eradication of R cells.
Example eco-evolutionary dynamics of the metapopulation in a single simulation realisation. Parameters are K+=2000, ,
, and m = 0.001, with density-dependent migration according to Eq. (2a); other parameters are as in Table 1. Panels A-F: Snapshots of the
metapopulation at six microbial generation times
. Red pixels indicate R-free demes (containing only S cells) and pink pixels are demes where R and S cells coexist. The two demes,
and
, whose time composition is tracked in Panels G and H are indicated by a black border. Panel A shows the metapopulation a few generations after an environmental bottleneck. From panels A to B no bottleneck occurs, and many S-only demes are recolonised by R cells (many red pixels become pink). Between B and C, the metapopulation experiences a bottleneck causing a burst of local R extinctions (with burst of randomly located red pixels, see also the spike of
in Panel I). Panel D: Pink clusters spread across the grid due to the migration of R cells causing many recolonisation events (
in Panel I decreases for
). Panels E-F: After a sequence of bottlenecks starting at
, the number of S-only demes increases overwhelmingly across the grid (
in Panel I), and resistance persists only in a few demes where R and S coexist. See S3 Movie and S1 Appendix Sec. 4 for a video of the full spatial metapopulation dynamics for this example realisation and its detailed description. Panels G-H: Temporal evolution of the fraction of resistant cells
and
, up to t = 500 microbial generations (gen.), in the example demes
and
indicated as highlighted pixels in Panels A-F. Green bands indicate periods in the harsh environment (where
); harsh periods shorter than 1 microbial generation are not shown (S1 Appendix Sec. 3.3.1). Each transition from white background to a green band indicates an environmental bottleneck. The deme
of panel G first exhibits R/S coexistence, followed by fluctuation-driven R eradication at
due to environmental bottlenecks. In Panel H, similar dynamical development is followed by the restoration of resistance through recolonisation of the deme by R cells, as indicated by the blue spikes at long times (
, Discussion). Panel I: Temporal evolution of the fraction
of demes without R cells (red pixels within Panels A-F, see Eq. (7)). From left to right, the dashed vertical lines indicate the corresponding snapshot times in Panels A-F. Green background areas as in Panels G-H.
Fig 4.
Near-optimal conditions for resistance clearance: Slow migration can speed up and enhance the eradication of R cells.
Temporal evolution of the heatmap showing the probability P(NR(t)= 0) of R extinction as a function of bottleneck strength, , and migration rate m (implemented according to Eq. (2a)) at t = 200 (Panel A), t = 300 (Panel B), t = 400 (Panel C), and t = 500 (Panel D) with environmental switching rate
and bias
; other parameters are as in Table 1. As in Fig 2A, each
value pair is an ensemble average over 200 independent metapopulation simulations and the P(NR(t)= 0) colour bar ranges from light to dark red indicating the fraction of simulations that have eradicated R cells at each snapshot in time (standard error of the mean in P(NR(t)=0) is below 4%; see S1 Appendix Sec. 3.3.2). The green and dashed white lines represent the theoretical prediction of Eq. (6) and an eye-guiding axis break, respectively (as in Fig 2A). The golden lines in Panels D-E show
, with
in the (upper) region between the golden and green lines, according to Eq. (9). The grey horizontal lines in Panels A-E indicate the example bottleneck strength used in Panel E. Panel E: Probability of R extinction P(NR(t)= 0) as a function of migration rate m at bottleneck strength
for t = 100, 200, 300, 400, 500 microbial generations (bottom to top). Solid lines (full symbols at m = 0) show results averaged over 200 realisations; shaded areas (error bars at m = 0) indicate binomial confidence interval computed via the Wald interval (see S1 Appendix Sec. 3.3.2). Panel F: 90th and 95th percentile (
and
respectively) of R eradication times as function of the migration rate with a bottleneck strength
(see S1 Appendix Sec. 3.3.3). Panel F shows a single minimum at
corresponding to
.
Table 1.
Summary of simulation parameters for Figs 2-4 and S1-S5 Movies.
Parameters kept fixed are listed by a single value, other parameters are listed as ranges. The average number of sensitive cells S per deme at t = 0 () equals the metapopulation’s carrying capacity at t = 0 minus the constant threshold value for cooperation,
, which depends on whether the system begins in a harsh or mild environment,
(S1 Appendix Sec. 3.1). See Fig J (and Fig C) in S1 Appendix for the extended range in
and
, and S1 Appendix Sec. 5.5 for the discussion of results obtained on a periodic one-dimensional lattice (cycle) of length L = 100.