DOI: 10.5061/dryad.f1vhhmh60
title: Systematic shifts in the variation among host individuals must be considered in climate-disease theory

description: To make more informed predictions of host-pathogen interactions under
 climate change, studies have incorporated the thermal performance of host,
 vector, and pathogen traits into disease models to quantify effects on
 average transmission rates. However, this body of work has omitted the
 fact that variation in susceptibility among individual hosts affects
 disease spread and long-term patterns of host population dynamics.
 Furthermore, and especially for ectothermic host species, variation in
 susceptibility is likely to be plastic, influenced by variables such as
 environmental temperature.For example, as host individuals respond
 idiosyncratically to temperature, this could affect the population-level
 variation in susceptibility, such that there may be predictable functional
 relationships between variation in susceptibility and
 temperature.Quantifying the relationship between temperature and
 among-host trait variation will therefore be critical for predicting how
 climate change and disease will interact to influence host-pathogen
 population dynamics. Here, we use a model to demonstrate how short-term
 effects of temperature on the distribution of host susceptibility can
 drive epidemic characteristics, fluctuations in host population sizes, and
 probabilities of host extinction. Our results emphasize that more research
 is needed in disease ecology and climate biology to understand the
 mechanisms that shape individual trait variation, not just trait averages.
description: R scripts and data used to generate figures and supplementary
 materials for manuscript. 
description: # Systematic shifts in the variation among host individuals must be
 considered in climate-disease theory
 [https://doi.org/10.5061/dryad.f1vhhmh60](https://doi.org/10.5061/dryad.f1vhhmh60) ## Description of the data and file structure The archived files include two .ZIP `CODE_ARCHIVE_FINAL`.zip: R scripts and data for generating Figures 1, 2, 3, 5, and 6 of the main text, along with archived original Figure images. The archive is organized into sub-directories. There is a separate sub-directory for each figure. Each sub-directory has a .R script for generating the applicable figures. * `./fig1` * `cv_temp.R` simulates synthetic data to construct Figure 1 of the manuscript * `./fig2` * `cv_temp_data.R` digests the data (as described in the next bullet points) to generate Figure 2 * `./Altman` contains `Altman_tadpoles_data.csv` which are raw data from Altman et al. 2016 JAE, which are used to generate the lower panel of Figure 2. Note that these data were not collected by us as authors but are publicly available data that we used to create panels in our figure. The required fields from this data file are `AdjPropEncysted` and `PerfTemp`. However, all variables are described below. Also note that blank values (i.e., NA values) are sometimes present if the animal of question did not live to the time of that data measurement. * `TadID` Individual tadpole identification * `Block` Temporal block * `Clutch Tadpole` clutch of origin identification * `AccGraph1` Category of tadpole acclimation temperature used for Fig. 3B of Altman et al. * `AccGraph2` Category of tadpole acclimation temperature used for Fig. 4 (both A & B) of Altman et al. * `AccTemp` Tadpole acclimation temperature in degrees Celcius * `AccInc` Identification of the incubator in which the tadpole was kept during the 3-week acclimation period * `PerfTemp` Performance temperature in degrees Celcius * `PerfInc` Identification of the incubator in which the tadpole was kept during the performance period (following the temperature switch) * `InitialGosner` Tadpole Gosner stage at the beginning of the acclimation period * `ExposureGosner` Tadpole Gosner stage at time of exposure to R. ondatrae * `FinalGosner` Tadpole Gosner stage at the end of of the experiment (2 weeks post-exposure to R. ondatrae) * `InitialMass` Tadpole mass (mg) at the beginning of the acclimation period * `ExposureMass` Tadpole mass (mg) at time of exposure to R. ondatrae * `FinalMass` Tadpole mass (mg) at the end of the experiment (2 weeks post-exposure to R. ondatrae) * `Cysts1` Number of metacercariae present in tadpole 12 hours post-exposure to R. ondatrae * `Cysts7` Number of metacercariae present in tadpole 7 days post-exposure to R. ondatrae * `Cysts14` Number of metacercariae present in tadpole 14 days post-exposure to R. ondatrae * `PropCleared1` Proportion of metacercariae cleared by the tadpole between 12 hours and 7 days post-exposure to R. ondatrae (Fig. 4A of Altman et al.) * `PropCleared2` Proportion of metacercariae cleared by the tadpole between 7 and 14 days post-exposure to R. ondatrae (Fig. 4B of Altman et al.) * `PropEncysted` Raw proportion of parasites to encyst in each tadpole (“Cysts1”/20) * `LeftoverCerc` Number of cercariae that failed to encyst in the tadpole (found in the exposure water after the 12 hour exposure period) * `AdjPropEncysted` Same as “PropEncysted”, except max value is 1 (1.05 values were changed to 1) to allow for arcsine square root transformation (Fig. 3B) * `./Six-Viruses-Temp` contains raw data from Shocket et al. 2020 Elife, which are used to generate the top and middle panel of Figure 2. Shocket et al. 2020 gathered data from several studies. Note that these data were not collected by us as authors but are publicly available data that we used to create panels in our figure. We used two data files `TraitData_bc.csv` and `TraitData_lf.csv`. Note that we only considered Cx. pipiens (Cpip) and West Nile virus (WNV). The file attributes are defined as follows: * `seriesID` series ID with the name of the person who digitized the data from the published paper * `trait.name` trait abbreviation, which is often the model parameter * 1/mu, lifespan (days; the inverse of mortality rate, mu (lf 1/mu)) * bc, vector competence (propotion; bc full vector competence # transmitting / # exposed; c infection efficiency # infected / # exposed; b transmission efficiency # transmitting / # infected) * `T` temperature (C) * `trait` trait value * `ErrorPosSI` & `ErrorNegSI` standard errors for the trait value, if "NA" then not enough data was available to calculate the value. * `Trait2.name` second variable in the experiment, if needed; for vector competence this is usually time * `host.code` four letter code for mosquito vector species * Cpip Cx. pipiens, Cqui Cx. quinquefasciatus, Ctar Cx. tarsalis, Cuni Cx. univittatus, Cthe Cx. theileri, Atri Ae. triseriatus, Atae Ae. taeniorhynchus, Avex Ae. vexans, Cmel Cs. melanura, Cmol Cx. pipiens molestus, Cpal Cx. pipiens pallens, Cres Cx. restuans, Ador Ae. dorsalis, Anig Ae. nigromaculis, Asol Ae. sollicitans, Asal Ae. salinarius * `paras.code` four letter code for parasite (virus) * `Citation` first author, year of publication, and journal name for publication the data came from * `Figure` the figure or table that the data came from in the original publication * `Notes` any notes * `joint.code` eight letter code for combination of mosqutio vector species and virus (host.code + paras.code, for infection traits only) * `./fig3` * `fig3-R02.R` simulates synthetic data to construct Figure 3 of the manuscript * `./figs5_6` * `emp_var_SEIP.R` simulates synthetic data to construct both Figures 5 and 6 of the manuscript ## Code/software `ESM_FINAL`.zip: R and QMD scripts for generating the Electronic Supplementary Materials files * There are three file types: .R, .QMD, and .PDF * The user can run the .QMD file, which sources the two .R scripts but should run as long as the user has specified the correct working directory. * The .QMD can be rendered into .HTML or .PDF * The two .R scripts contain helper functions * The .PDF contains the archived version of the rendered .QMD