Companion Data Page|
Variability in thermal and phototactic
preferences in Drosophila may reflect
an adaptive bet-hedging strategy
Jamey Kain1, Sarah Zhang1, Jamilla Akhund-Zade2,3, Aravinthan Samuel2,4, Mason Klein2,4,5, Benjamin de Bivort1,2,3
1The Rowland Institute at Harvard, Cambridge, Massachusetts, USA.
2Center for Brain Science, Harvard University, Cambridge, Massachusetts, USA.
3Department of Organismic and Evolutionary Biology, Harvard University, Cambridge, Massachusetts, USA.
4Department of Physics, Harvard University, Cambridge, Massachusetts, USA.
5Department of Physics, University of Miami, Coral Gables, Florida, USA
Instrument control .VI (LabVIEW 8.6)
|SlowPhotoBox-10m-trials.vi||Phototactic preference box data acquisition VI. Controls the agitation microcontroller that shakes the box, agitating the flies every 10 minutes. Shortly prior to the next round of agitation, this VI captures three images of the phototactic tubes, and merges these to make a high dynamic range image of the behavioral space. Flies are tracked by background subtraction, thresholding and centroid calculation.|
Data and analysis .mats (MATLAB 2011a)Download .zip archive of all .mat files (other than stationDataBatch.mat)
|hedgeCamA.WT.data.mat||Slow phototactic choice data from wild type CamA flies. 24x219 matrix, where rows are choice numbers, and columns are individual flies.|
|hedgeCamA.ThermoData.mat||Slow thermotactic choice data from CamA. Contains two variables: 1) camAiso_thermo, 41 x 20 (flies x trials) thermotactic positional choice data, where 1 indicates a positional choice at the 30C end of the chamber, and 0 the 18C end and 2) camAiso_thermo_SexIndex, a 41x1 vector identifying the sex of the flies in the rows of camAiso_thermo, 0 = male, 1 = female.|
|hedgeIsoCamA.Ps.data.mat||Slow phototactic choice data from inbred-CamA (parental generation). Two 24xN matrices, separated by sex. Data from both sexes were aggregated in the paper.|
|hedgeIsoCamA.F1s.data.mat||Slow phototactic choice data from inbred-CamA (F1 generation). Twelve pairs of 24xN matrices, separated by sex. Each pair corresponds to one of the crosses represented in Figure 4D and 4E. Data from both sexes were aggregated in the paper.|
|hedgeThermoPhotoDayToDay.mat||Day to day thermal and phototactic preference data. Rows of each matrix correspond to individuals, columns correspond respectively to the first and second day observations. Used to make Figure S1.||simulation data|
|hedgeStochasticSimRuns.mat||Results of the 5000 stochastic runs represented in Figure 3C-E. Simulated under mean daily temperature weather data. Structure "runs_h0" corresponds to a bet-hedging strategy, and "runs_h1" adaptive tracking. These are outputs of hedgeSim4.m.|
|hedgeNoSeasonControlRuns.mat||Results of the 4000 stochastic runs represented in Figure 2D (lower pair of bars). Simulated under season-long uniform temperatures. Structure "noSeason_h0" corresponds to a bet-hedging strategy, and "noSeason_h1" adaptive tracking. The scalars "noSeasons_b" and "noSeasons_d" indicate calibrated model variables under this no-seasonality assumption. The structures are outputs of hedgeSim4.m.|
|hedgeWeatherPack.mat||NOAA weather data from Logan Airport, Boston, MA USA spanning 2006.09.01 - 2011.08.29. The "weatherPack" structure contains a number of objects. The most important ones for other functions are .normal, which includes the daily normal temperatures for each of the spanned days, and .flySeasonInterval, which is indices corresponding to a single breeding season.|
|hedgeAnalyticMeanSeasonRuns.mat||Results of the analytic version of the model, running against the mean daily temperatures (structures with _meanSeason), and against historical data from 2007 - 2010 (with corresponding labels). Structures bearing "_h0" correspond to a bet-hedging strategy and "_h1" correspond to adaptive tracking. All structures are outputs of hedgeAnalytic.m.|
|hedge3000RandomSummers.mat||Performance metrics for bet-hedging and adaptive tracking, and seasonal weather metric for 3000 simulated summers. Output of an early version of hedgeSummerSample.m. Current version provides the weather statistics needed to make all the plots in Figure S1.|
|hedge100SequentialSummers.mat||Results of the 100 sequential season run represented in Figure 6A. Simulated under summers of random temperature deviations and cloud cover. Structure "exampleOf100Summers_h0" corresponds to a bet-hedging strategy, and "exampleOf100Summers_h1" adaptive tracking. Scalars "exampleOf100Summers_b" and "exampleOf100Summers_d" are model parameters roughly calibrated. The structures are outputs of hedgeAnalytic.m.|
|hedgeStationData.mat||NOAA daily temperature normals from 7500 weather stations. Matrices starting "stationTemperature" are raw data. Structures starting "stationLatLong" are re-packaged for use by hedgeGeography.m and hedgeMakeStationMap.m.|
|stationDataBatch.mat||Calibration data for all weather stations included in Figure 6C. Includes runs of the BH and AT
models and basic weather statistics for each location. Output of iterated runs of
Big file (495MB).
|hedgeColorMaps.mat||MATLAB colormaps used to make the figures. "kpcy" is used in Figure 2A,B. "blackbody" is used in Figures 4A and 5A. "posneg" is used in Figure 6B. "posneg2" is used in Figure 6C. The temperature bars used throughout are the built-in "jet" colormap.|
|hedgeStateBoundaries.mat||A 251 x 651 boolean matrix encoding an equirectangular projection of the US 48 contiguous state boundaries. Used by hedgeMakeStationMap.m to make rough drafts of Figure 6C.|
Analysis .m functions (MATLAB 2011a)
Usage details are enumerated in the header of each function.Download .zip archive of all .m files
|experimental data processing|
|sloPhoBoPhotoPref.m||Breaks down the output of the slow photo box LabView .vi program and returns a MATLAB struct with useful metrics function name = SLOw PHOto BOx PHOTOtactic PREFerence. The most useful output is the object .prefs which is the light choice probabilities of each fly.|
|hedgeDistResample.m||Takes an nx24 matrix of phototaxis choices (one of the object outputs of sloPhoBoPhotoPref.m), calculates the mean and samples random binomial re-populations of the original data matrix with said mean. Used to calculate the mean expected distribution and confidence intervals in Figure 1C of Kain et al. Also saves the resampled MADs of the distributions for use in p-value calculation.||modeling|
|hedgeSim4.m||Workhorse stochastic simulation function |
Implements the stochastic model of a population of 100 flies reproducing and dying over a breeding season, under alternate modes of behavioral heritability, and alternate simulated weather conditions.
|hedgeAnalytic.m||Workhorse analytic simulation function |
Implements the analytical model of a effectively infinite population reproducing over a breeding season, under alternate modes of behavioral heritability, and alternate simulated weather conditions.
|hedgeMakeCloud2.m||Generates random cloud sequences with the same statistical distributions as real historical cloud sequences. Takes historical cloud data and generates a random sequence drawn from the same PDF. This is then shuffled until its autocorrelation is sufficiently similar to the autocorrelation of the original sequence. Used to make Figures 5D,E and 6A.|
|hedgeSummerSample.m||Generates lots of random summers with daily temperature
deviations and cloud covers, measures the performance of the bet-hedging
model and the adaptive tracking model under these conditions, and
collects a number of metrics about the summer. Function is fairly
inflexibly coded to the parameters needed to make Figure 5D,E. Toggle the parameter
varySummerLengthBool to 1 to randomly vary season length, a la Figure 5F.
|hedgeGeography.m||Reads in geographic weather data, picks a location at random, attempts to fit b and d parameters for the seasonal weather at that location. If the parameters are fit, runs a bet-hedging scenario at this location and collects summary data of this location and the model performance here. Uses its own output to identify already calibrated stations that are similar to the stations being calibrated at the moment, rendering this process more efficient as stations are added. Used to make Figure 6C.|
|hedgeBDCalibrate.m||Performs a hill-climbing algorithm to determine the
values of b and d in the model that satisfy the two assumptions (constant
population size at the beginning and end of the season, and constant
mean phototactic preference at the start and end of the season). This can
be used to automatically calibrate the model for arbitrary weather and
seasonal conditions. All calibration is done under an adaptive-tracking
strategy, and only accommodates daily mean temperature data (i.e. not
daily deviations or cloud cover, thus the calibration is deterministic). Used to make Figure 6C.
Called by hedgeGeography.m.
|hedgeLineagePlot2.m||Makes a pretty plot of fly lineages and fates based on the fly data matrix produced by hedgeSim4.m. Used to make Figure 2 of the paper. Only works with seasons of length 214, the paper standard.|
|hedgeMakeStationMap.m||Reads in model data calibrated to regional weather stations and makes a map of the contiguous 48 states using that data. Used to make Figure 6C.|