DOI: 10.5061/dryad.3xsj3txn8
title: Soft trade-offs and the stochastic emergence of diversification in E. coli evolution experiments

description: Laboratory experiments of bacterial colonies (e.g., Escherichia coli)
 under well-controlled conditions often lead to evolutionary
 diversification in which (at least) two ecotypes, each one specialized in
 the consumption of a different set of metabolic resources, branch out from
 an initially monomorphic population. Empirical evidence suggests that,
 even under fixed and stable conditions, such an "evolutionary
 branching'' occurs in a stochastic way, meaning that: (i) it is
 observed in a significant fraction, but not all, of the experimental
 repetitions, (ii) it may emerge at broadly diverse times, and (iii) the
 relative abundances of the resulting subpopulations are variable across
 experiments.  Theoretical approaches shedding light on the
 possible emergence of evolutionary branching in this type of condition
 have been previously developed within the theory of "adaptive
 dynamics''. Such approaches are typically deterministic –or
 incorporate at most demographic or finite-size fluctuations which become
 negligible for the extremely large populations of these experiments– and,
 thus, do not permit to reproduce the empirically observed large degree of
 variability. Here, we make further progress and shed new light on the
 stochastic nature of evolutionary outcomes by introducing the idea of
 "soft'' trade-offs (as opposed to"hard''
 ones). This introduces a natural new source of stochasticity which allows
 one to account for the empirically observed variability as well as to make
 predictions for the possibility of evolutionary branching to be observed,
 thus helping to bridge the gap between theory and experiments.
description: Data has been created with our own codes. Data has been processed
 using our own-designed python programs.
description: Python 3.9 or higher. Data consists of two main
 folders: &gt; The 'python' one has the
 programs to get the data and the plots. In particular:
 paperplots.py: has the functions to produce the plots
 as well as the functions to preprocess the raw data.
 MutationProcess.py: has the functions to produce the simulation
 data. In particular, it can produce the evolution of the populations we
 study in phenotypic space for both hard and soft trade-offs.
 mutation_function.py: have auxiliary functions
 needed. Plot_Branching_Contour.py: auxiliary module
 to help visualize the <em>contour feasibility
 plots</em>. evolution_animation.py and
 evolution_animation_community.py: both help visualize in an animated way
 the evolution of populations in phenotypic space.
 mathscript.wls: contains a Mathematica script. This is no longer
 needed but was used to solve the differential equations with Mathematica
 to double-check the solution. utils.py: contains
 useful functions for plotting. &gt;
 The 'results' one where only the needed data for the plots are
 included: aux_data_paperplots: have
 preprocessed data that is used for all the plots of the paper. In
 particular: (i) result2:   
 branching_times: json file with keys indicating the different
 sigmas ("sigma0", "sigma1", ... with the actual value
 inside the paperplots.py). The values are a couple of the iteration in
 which the data branched and the file where branching actually happened
 (e.g. ["iter_1", "29.csv"]).
 fraction_fixed_times.json: file indicating the fraction of
 acetate scavengers present at the moment of branching. Here the keys are
 the sigmas as before and then the time moment at which the fraction is
 measured (e.g. "sigma0": "70"). 
 (ii) result3:  
 branched_realizations.json: json file with an identifier as key
 (e.g. "V2_0.004_1e-4"": the "V2_0.004" gives the
 V2 or V_a value in phenotypic space, and "1e-4" indicates the
 noise amplitude. The values for each key are a list with the realization
 number in which branching did actually occurred.
 unbranched_realizations.json: same as before but with
 realizations in which branching did not occur. 
 (iii) result4: 
 branched_realizations_end.json: file with an identifier as key
 (e.g. "d_1_40_1.5e-4": the "d_1" part means the first
 "d" (dilution rate) value, the "40" indicates where
 the point is located in phenotypic space and "1.5e-4" is the
 noise amplitude. The values for each key are a list with the realization
 number in which branching did actually occurred at the maximum
 evolutionary time. branched_realizations_half.json:
 same as before but for half of the evolutionary time.
 unbranched_realizations_end.json: same as the
 branching_realizations_end but with realizations in which branching did
 not occur at the end.
 unbranched_realizations_half.json:same as before but for half of
 the evolutionary time. (i)
 result5:  branched_realizations.json: json file with
 the noise amplitude value as keys (e.g. "3e-04").  The values
 for each key are a list with the realization number in which branching did
 actually occurred. unbranched_realizations.json: same
 as before but with realizations in which branching did not
 occur. aux_params.json: contains data defining the
 soft trade-off parameters as well as the experimental parameters for the
 realization and some more metadata. 
 feasibility: contains data needed to
 produce the contour plots of Fig4 of the article. In particular:<br>
 b1: has .pkl files inside with changing beta value. A
 file like 2.2222e-11 means beta=1, and the other values of beta
 follow. d: has .pkl files inside changing the
 dilution rate value. The names indicate the value of d.
 R1_0: same as before but with changing the G_0 glucose
 concentration inside the media supplying the chemostat.
 R2_0: same as before but adding an A_0 concentration of acetate
 to the media supplying the chemostat.  
 Raw data are not included due to the immense amount
 of files that they entail. They can be generated with the codes given and
 could be shared upon request. We have also used
 Inkscape to join some subplots in a bigger figure (as for Fig2 of the main
 article).