DOI: 10.6084/m9.figshare.30833897
title: Bacterial persistence modulates the speed, magnitude and onset of antibiotic resistance evolution

description: Complete Data CollectionThis folder contains a comprehensive Excel file called “complete_data.xlsx”. Each sheet in the Excel file corresponds to data from a specific figure. This file can be used together with the analysis code (link to be added upon publication) to generate all figures.complete_data.xlsxA single Excel file containing 18 sheets with data from all figures:Sheet names and descriptions:Fig_1: Probability of emergence contour dataFig_2_b: MIC evolution simulation dataFig_2_c: Speed of resistance evolution dataFig_2_d: Time to resistance dataFig_2_a_d_time_series_sim7: Simulation time series data (representative simulation, low persistence)Fig_2_a_d_MIC_values_sim7: MIC values from simulation (representative simulation, low persistence)Fig_2_a_p_time_series_sim5: Simulation time series data (representative simulation, high persistence)Fig_2_a_p_MIC_values_sim5: MIC values from simulation (representative simulation, high persistence)Fig_3_a-b: Distribution plot simulation dataFig_3_a-b_empirical: Distribution plot empirical dataFig_4_a: Mutation count simulation dataFig_4_b: Mutation count empirical dataFig_4_c: Mutation functional dataFig_5_a-b: Large-scale simulation results (heatmap data)Fig_5_c_mic: MIC heatmap empirical dataFig_5_c_extinction: Extinction heatmap empirical dataFig_6: Population size analysis simulation dataS1_figure: Supplementary experimental survival dataColumn naming conventionAll sheets use consistent, tidy column names.Data typesExperimental dataFig_3_a-b_empirical: Phenotype measurements after evolutionFig_4_b: Empirical mutation countsFig_4_c: Mutation frequency measurementsS1_figure: Experimental survival fractionsFig_5_c_mic and Fig_5_c_extinction: Heatmap summary statisticsSimulation dataFig_2_b: MIC evolution over timeFig_2_c: Maximum speed of resistance evolution per simulationFig_2_d: Time until high-frequency resistance emergenceFig_3_a-b: Distribution simulations (MIC at day 12)Fig_4_a: Mutation accumulation simulationsFig_5_a-b: Large-scale evolutionary simulations with treatment severityFig_6: Population size effect simulationsAnalytical / calculated dataFig_1: Probability of emergence calculationsUsageThe Excel file can be opened with standard software such as:Microsoft ExcelPython (pandas), for example: pd.read_excel("complete_data.xlsx", sheet_name = "Fig_1")R (readxl), for example: readxl::read_excel("complete_data.xlsx", sheet = "Fig_1")NotesS2_figure uses the same data as in Figure 4(a–b).S3_figure uses the same script as for Fig_1.This repository contains the analysis scripts used to generate all figures and analyses for the manuscript. The full data set for figure generation is deposited elsewhere (link to be added upon publication).Repository structureFig_1/Probability of emergence analysisFig_1.py: contour plot generationFig_2/MIC evolution simulationsFig_2_a/: R-based simulation analysisFig_2_b/: Python visualizationFig_2_c/: speed of resistance evolution analysisFig_2_d/: time to resistance analysisFig_3/Distribution analysisFig_3_a-b.R: density plots and bar charts (empirical and simulated)Fig_4/Mutation analysisFig_4_a-b/: mutation counting analysisFig_4_a/: simulation data (sim)Fig_4_b/: empirical data (emp)Fig_4_c/: gene ontology and functional analysisFig_5/Large-scale evolutionary simulationsFig_5_a-b/: heatmap visualizationsFig_5_c/: MIC and extinction analysis (empirical)Fig_6/Population size effectsFig_6.py: population size analysis simulationsS1_figure/Supplementary experimental dataS2_figure/Supplementary frequency analysisS3_figure/Supplementary probability analysisscripts_simulations_cluster/Large-scale, cluster-optimized simulationscomplete_data/Reference to the full data sheet (full data set deposited elsewhere)Script types and languagesPython scripts (.py)Mathematical modeling: survival functions, probability calculationsStochastic simulations: tau-leaping population dynamicsData processing: mutation analysis, frequency calculationsVisualization: plotting with matplotlib and seabornTypical dependencies: numpy, pandas, matplotlib, seaborn, scipyR scripts (.R)Statistical analysis: distribution fitting, density plotsAdvanced visualization: publication-quality figures (ggplot2)Data manipulation: dplyr / tidyr workflowsTypical dependencies: dplyr, tidyr, ggplot2, readxl, cowplotData requirementsThe scripts are designed to run using the complete_data.xlsx file and, where relevant, the raw simulation outputs and empirical data sets as described above. For Complete Analysis<br>Most figures require experimental or simulation data. The expected data format is an Excel file (<i>`complete_data.xlsx`</i>) with specific sheet names corresponding to each figure.<br><br><br>## System Requirements<br><br>### Python Environment<br>- Python 3.7+<br>- Required packages: <i>`numpy`</i>, <i>`pandas`</i>, <i>`matplotlib`</i>, <i>`seaborn`</i>, <i>`scipy`</i>, <i>`mpi4py`</i><br>- Optional: <i>`goatools`</i> (for gene ontology analysis in Fig_4_c)<br><br>### R Environment <br>- R 4.0+<br>- Required packages: <i>`dplyr`</i>, <i>`tidyr`</i>, <i>`ggplot2`</i>, <i>`readxl`</i>, <i>`cowplot`</i><br><br>## Citation<br><br>If you use these scripts in your research, please cite the original manuscript:<br><br>[Citation information will be added upon publication]<br><br><br>