1. ABOUT THE DATASET -------------------- Title: Dataset for 'Eco-evolutionary dynamics of cooperative antimicrobial resistance in a population of fluctuating size and volume' Creator(s): Hernández-Navarro, Lluís; Asker, Matthew; and Mobilia, Mauro Organisation(s): Department of Applied Mathematics, School of Mathematics, University of Leeds, Leeds LS2 9JT, U.K. Rights-holder(s): Copyright 2023 University of Leeds Publication Year: 2023 Description: Dataset for 'Eco-evolutionary dynamics of cooperative antimicrobial resistance in a population of fluctuating size and volume'. A full description of the data, methods, and interpretation may be found in the related publication. Computational data: raw results from stochastic simulations of our full model and of the effective Moran model at fixed total population. Scripts: codes to run the simulations (in Python), as well as codes to generate each of the 5 main figures (in Matlab) from the computational data. Cite as: Hernández-Navarro, Lluís; Asker, Matthew; and Mobilia, Mauro (2023) Dataset for 'Eco-evolutionary dynamics of cooperative antimicrobial resistance in a population of fluctuating size and volume'. University of Leeds. [Dataset] https://doi.org/??? Related publication: Hernández-Navarro, Lluís; Asker, Matthew; and Mobilia, Mauro (2024) Eco-evolutionary dynamics of cooperative antimicrobial resistance in a population of fluctuating size and volume. To be submitted. Contact: L.Hernandez-Navarro@leeds.ac.uk, M.Mobilia@leeds.ac.uk 2. TERMS OF USE --------------- Copyright 2023 University of Leeds. This dataset is licensed under a Creative Commons Attribution 4.0 International Licence: https://creativecommons.org/licenses/by/4.0/ 3. PROJECT AND FUNDING INFORMATION ---------------------------------- Title: DMS-EPSRC Eco-Evolutionary Dynamics of Fluctuating Populations Dates: 2022-2025 Funding organisation: EPSRC Grant no.: EP/V014439/1 L.H.N. and M.M. gratefully acknowledge funding from the EPSRC via the grant No. EP/V014439/1 for the project ’DMS-EPSRC Eco-Evolutionary Dynamics of Fluctuating Populations’. The support of the EPSRC Ph.D. scholarship EP/T517860/1 to M.A. is also thankfully acknowledged. 4. CONTENTS ----------- File listing Each of the scripts titled "FinalFigure*.m" (where *=1,2,3,4, or 5) provides the Matlab R2019a code used to generate the corresponding figure in the original manuscript. To run the codes: -In a folder of your choice, copy the codes "FinalFigure*.m", the data files "trajectory [x_th, nu, delta]=[0.36666666666666664, 0.1, 0.5] 0.csv", "Fig2TheoryData_200to25.mat", "Fig4and5TheoryData_K_100_1000.mat", and the data subfolder "SimulationData". -Change the variable "figfolder" within each "FinalFigure*.m" script to the path of the folder where you copied the corresponding files and subfolders (see previous point). -In the "FinalFigure*.m" scripts (only for the cases *=3,4, and 5), change the variable "loadfigdatafolder" to the path of the "SimulationData" subfolder in your computer. -Run each "FinalFigure*.m" script to get the matlab plots of each figure, saved as FinalFig* in ".png", ".pdf", and Matlab's ".fig" format in your computer folder (see previous first point). The simulation data of "trajectory [x_th, nu, delta]=[0.36666666666666664, 0.1, 0.5] 0.csv" provides the data for figure 1c-d; "fixation probability and time N=[25, 50, 100, 200].csv" and "Fig2TheoryData_200to25.mat" provide the simulation and Moran theoretical data for figure 2, respectively; and "Fig4and5TheoryData_K_100_1000.mat" provides the theoretical predictions data for figures 4e-h and 5. The data provided in the subfolder "SimulationData" is subdivided in the sub-subfolders: -"FixAndCoexProbData", simulation data for figures 4a-d and 5. -"Trajectories", simulation data for figure 3. All data files are provided in ".csv", MATLAB's ".mat", or Python's NumPy ".npy" formats. The Python codes to run the stochastic simulations of our full model are: -"next_reaction_method.py", the function that is called by the other Python scripts to run the Next Reaction Method of [Anderson; J. of Chem. Phys., 2007] (see reference in the supplementary information). Conditions to end the simulation (e.g., maximum simulation time, or until fixation of any species) are directly set in the next_reaction_method file (see comments within). -"heatmap.py", the script to run simulations of the full model and get the numerical data for figures 4a-d and 5. -"fixation_properties.py", the script to run simulations at constant K and get the numerical data for figure 2. -"trajectories.py", the script to run simulations of the full model and get the numerical data for figure 3. 5. METHODS ---------- Full details of methods will be provided in Hernández-Navarro et al. (2024) Eco-evolutionary dynamics of cooperative antimicrobial resistance in a population of fluctuating size and volume (to be submitted).