Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Analyses and data of:

Padfield et al. (2019) Temperature-dependent changes to host-parasite interactions alter the thermal performance of a bacterial host. ISME

Link to read paper:

DOI of paper:

DOI of preprint:

DOI of analyses and dataset:


This repository contains the final datasets, analyses and figures of the above-mentioned paper. It can recreate the all of the analyses and figures in the main text (Figure 1 to Figure 4) and all but one of the Supplementary Information (Figures S1-S15).


  • Please report any problems or bugs in the code in the Issues tab of the GitHub repository. Alternatively, please email


This code is licensed under GPL-3.

Running the scripts and analyses

  • The project can be cloned or for those not familiar with GitHub, a zip file of this project can be downloaded using the "Clone or download" button at the top right of this page.
  • Open the R project file in the downloaded folder. R projects automatically assigns the root directory to the directory in which the project resides. Consequently all of the analyses should be runnable without altering paths. These are very easy to open using RStudio. All of the scripts for the analyses can be found in scripts/.
  • bacteria_with_without_phage_growth_models.R does the analysis of the logistic growth curve models of the bacteria grown in the presence and absence of phage. Recreates Figures S1:S8, Figure S10, and Figure S15.
  • bacteria_phage_tpcs.R runs the TPC models for phage replication and bacterial growth in the presence and absence of phage. Recreates Figure 1, Figure 2 and Figure S9.
  • cost_of_resistance_logistic_growth_model.R analyses the logistic growth models of the susceptible and resistant bacterial clones. Recreates Figure S11, Figure S12, Figure S13 and Figure S14.
  • cost_of_resistance_rolling_regression.R analyses calculates growth rates using a rolling regression and runs the TPC models for susceptible and resistant clones. Recreates Figure 4.
  • resistance_assays.R runs the code for the phage streak assays. Recreates Figure 3.
  • growth_curve_functions.R contains the functions for modelling growth rates.
  • All of the data needed to run the analyses are stored in data.
  • All figures produced by the analysis are saved in plots/ and are labelled as they are in the main text.

All analyses are done in R version 3.5.3, on macOS High Sierra 10.13.6. I am unsure whether some older version of R will support all of the packages and whether the analyses will run exactly the same.


Data and analysis from manuscript titled: Temperature-dependent changes to host-parasite interactions alter the thermal performance of a bacterial host






No packages published