Data and Analysis for "When Sensing is Gambling"
Table of Contents
- 1. Introduction
- 2. Requirements
- 3. Files in this submission
- 3.1. 2017-Maxwell-Magwene-when-sensing-is-gambling-fig3.csv
- 3.2. 2017-Maxwell-Magwene-when-sensing-is-gambling-fig4.csv
- 3.3. 2017-Maxwell-Magwene-when-sensing-is-gambling-fig5-and-figS2.csv
- 3.4. 2017-Maxwell-Magwene-when-sensing-is-gambling-fig6.csv
- 3.5. 2017-Maxwell-Magwene-when-sensing-is-gambling-figS1a.csv
- 3.6. 2017-Maxwell-Magwene-when-sensing-is-gambling-figS1b.csv
- 3.7. jpeg-scans
- 4. Scripts used to generate the data files
- 5. Miscellaneous code
- 6. Scripts used to create shared data sets
- 7. Scripts used to generate figures
- 8. Statistics for Results
- 9. Session Info
1 Introduction
This document describes the data submitted to the Dryad repository for the paper "When Sensing is Gambling: An Experimental System Reveals how Plasticity can Generate Tunable Bet-Hedging Strategies" and provides links to the code (or the code itself) used to generate figures and the statistical analysis in the paper. This document is written in org-mode format, and is best viewed using emacs–an open-source text editor. If this document is viewed on github, links don't necessarily point to the correct sections, and the results of source blocks (see below) are not displayed. If you want to look at this document in a web-browser, we recommend cloning the repo and examining this HTML document that was exported from org-mode instead.
The scripts used to produce the figures are stand-alone files linked to in the section Scripts used to generate figures.
Statistics referenced in the text are listed in the sections Statistics for Results. The code used to generate the statistics is shown in org-babel format, and can be run in situ in emacs. The results of each code block is shown below it, giving the statistic of interest.
2 Requirements
The analysis is written in the R programming language. See the section Session Info for the version of R and the packages used to run these analyses. The scripts assume that all data data and scripts are in the same folder.
3 Files in this submission
This section contains a list of the data files included in this submission and gives:
- A brief description of how the data were generated
- The name of the script (if any) that produced the data
- A description of the column names in the data, or the metadata for the files
3.1 2017-Maxwell-Magwene-when-sensing-is-gambling-fig3.csv
This is a file that gives the data used to generate Figure 3. The goal of this set of experiments was to determine the ability of different genotypes to grow in SC+5FOA and SC-ura media in different concentrations of estradiol. Each culture was measured at the beginning and end of a 24hr growth period. This file was generated by process-tradeoffs-fig3.R, which collates raw data in a folder not submitted to Dryad.
- rep
- Replicate number
- media
- Type of media
- estradiol
- Concentration of estradiol in the media (nM)
- strain
- The CMY number of the yeast strain
- ura3
- Genotype of the strain at the URA3 locus
- post
- Concentration of cells at the end of the period of growth (cells/nl)
- pre
- Concentration of cells at the beginning of the period of growth (cells/nl)
3.2 2017-Maxwell-Magwene-when-sensing-is-gambling-fig4.csv
This is a file that gives the data used to generate Figure 4. The goal of this set of experiments was to determine if strain that was plastic to the concentration of estradiol was pursuing a bet-hedging strategy in an environment with estradiol gradients and that alternated between SC-ura and SC+5FOA selection. This file was generated by process-competitions-fig4.R, which collates raw data in a folder not submitted to Dryad.
- replicate
- Eeplicate number
- epoch
- Epoch in the competition
- pool
- Which competition treatment does the
- treatment
- Did the competition start with selection on SC+5FOA or SC-ura?
- name
- The gate that the observation records information about. For example, the mCherry cells, or the unstained cells.
percent_cells
- The percent of the cells measured that were of that type (e.g. unstained, mCherry, etc.)
- Count.mL
- Concentration of cells in the observation (cells/ml)
- Count
- Number of cells collected in the observation
3.3 2017-Maxwell-Magwene-when-sensing-is-gambling-fig5-and-figS2.csv
This is a file that gives the data used to generate Figure 5 and Supplementary Figure 2. The goal of this experiment was to determine if the plastic strain had a lower fitness than specialist strains. This file was generated by process-liquid-competitions-fig5.R, which collates raw data in a folder not submitted to Dryad.
- replicate
- replicate number
- gate
- The gate that the observation records information about. Either "mCherry" for the (red) cells or "GFP" for the (green) cells.
- media
- Media that the cells were grown in. SC-ura is E1 and SC+5FOA is E2.
- estradiol
- Concentration of estradiol in the media.
group_name
- The competition experiment. An mCherry tagged version of the plastic strain was competed against a GFP tagged version of the plastic strain ("mCherry-vs-GFP"). An mCherry tagged version of the plastic strain was competed against either a ura3 (P2) strain ("vs-ura3") or a URA3 (P1) strain ("vs-URA3").
- postselection
- Number of cells counted for that observation after selection (diluted 1:50)
- preselection
- Number of cells counted for that observation before selection (no dilution)
3.4 2017-Maxwell-Magwene-when-sensing-is-gambling-fig6.csv
This is a file that gives the data used to generate Figure 6. The goal of this experiment was to determine if mutation altered the diversification strategies of the plastic strain. This file was generated by process-images-fig6.R, which collates the cropped image data into a csv file.
- file
- Image used to generate the data
pixels_from_center
- number of pixels from the center of the plate
- intensity
- Maximum intensity of that "column" of pixels.
- strain
- CMY number of the strain being measured
- media
- The media used to prepare the plate
- replicate
- replicate number
3.5 2017-Maxwell-Magwene-when-sensing-is-gambling-figS1a.csv
These data are optical density readings for cultures of yeast grown in different concentrations of SC+5FOA media and different concentrations of estradiol. The goal was to determine which degron tag on URA3 would allow for conditional growth on both SC-ura and SC+5FOA. This file was generated by process-degron-tag-figS1.R.
- row
- row on 96-well plate
- col
- column on 96-well plate
- strain
- strain number of yeast
- ura3
- genotype of strain at the URA3 locus
- estradiol
- concentration of estradiol in the media
- X5FOA
- concentration of 5FOA in the media
- value
- optical density of the well
3.6 2017-Maxwell-Magwene-when-sensing-is-gambling-figS1b.csv
These data are optical density readings for cultures of yeast grown in SC-ura media and different concentrations of estradiol. The goal was to determine which degron tag on URA3 would allow for conditional growth on both SC-ura and SC+5FOA. This file was generated by process-degron-tag-figS1.R.
- row
- row on 96-well plate
- col
- column on 96-well plate
- strain
- strain number of yeast
- ura3
- genotype of strain at the URA3 locus
- estradiol
- concentration of estradiol in the media
- value
- optical density of the well
3.7 jpeg-scans
These are JPEG files of the original tif files used to produce Figs. 2 and 6. Note that Figure 2 was produced from replicate 1 and Figure 6B was produced with files from replicate 2.
file | strain | media | replicate |
---|---|---|---|
pdr5snq2_24hr002_cell18_cell28.jpeg |
121 | SC+5FOA | 1 |
pdr5snq2_24hr002_cell20_cell32.jpeg |
136 | SC+5FOA | 1 |
pdr5snq2_24hr002_cell21_cell33.jpeg |
111 | SC+5FOA | 1 |
pdr5snq2_24hr002_cell22_cell34.jpeg |
121 | SC-ura | 1 |
pdr5snq2_24hr002_cell23_cell35.jpeg |
136 | SC-ura | 1 |
pdr5snq2_24hr002_cell24_cell36.jpeg |
111 | SC-ura | 1 |
pdr5snq2_24hr002_cell25_cell37.jpeg |
115 | SC+5FOA | 1 |
pdr5snq2_24hr002_cell26_cell38.jpeg |
115 | SC-ura | 1 |
24hr005_cell1_cell2.jpeg |
121 | SC+5FOA | 2 |
24hr005_cell2_cell3.jpeg |
121 | SC-ura | 2 |
24hr005_cell3_cell4.jpeg |
115 | SC+5FOA | 2 |
24hr005_cell4_cell1.jpeg |
115 | SC-ura | 2 |
24hr001_cell1_cell9.jpeg |
136 | SC+5FOA | 3 |
24hr001_cell2_cell10.jpeg |
121 | SC+5FOA | 3 |
24hr001_cell3_cell12.jpeg |
115 | SC+5FOA | 3 |
24hr001_cell4_cell13.jpeg |
111 | SC+5FOA | 3 |
24hr001_cell5_cell17.jpeg |
136 | SC-ura | 3 |
24hr001_cell6_cell14.jpeg |
121 | SC-ura | 3 |
24hr001_cell7_cell15.jpeg |
115 | SC-ura | 3 |
24hr001_cell8_cell16.jpeg |
111 | SC-ura | 3 |
4 Scripts used to generate the data files
All scripts that begin with the name 'process' were run to generate data for the Dryad submission using files that will not be submitted to Dryad. The scripts filter data to contain only the data needed in the paper and annotate it with the appropriate metadata. Since these scripts rely on unsubmitted data, they cannot be run but are submitted to allow the data processing steps to be examined. See above for which scripts generated which files.
5 Miscellaneous code
- functions.R - Misc. functions used in the analysis
- load-libraries.R - Loads all the libraries used in the analysis
6 Scripts used to create shared data sets
All scripts that begin with the name 'analyze' are used to process data in a way that gets reused across multiple figures or code blocks. These scripts need to be run in order to generate data files used in the statistics section below.
- analyze-liquid-competitions.R - Calculate the fitness measurements used in the text
- analyze-plate-patterns.R - Calculate smoothed profiles of growth on agar plates
7 Scripts used to generate figures
Each figure panel that contains data was generated using the code contained in the scripts below.
- generate-figures.R - convenience script to generate the figures and generate the shared data sets from the raw data
- figure3.R
- figure4.R
- figure5.R
- figure6.R
8 Statistics for Results
The following code blocks justify the statistics cited in the main text. Note that the two scripts in the "Scripts used to create shared data sets" section.
8.1 No detectable cost of plasticity in E1 media
"In contrast, in E1 media the selection coefficient for the plastic strain relative to P1 was -0.019 and was not significantly different than 0 (one sample one-sided t-test; n = 3, p = 0.14)."
cop2_plastic <- read.csv("2017-Maxwell-Magwene-when-sensing-is-gambling-fitness-calculations.csv") t.test(subset(cop2_plastic, (group_name == "vs-URA3") & (media2 == "SC-ura, with estradiol"))$sT, mu = 0, alternative="less")
One Sample t-test data: subset(cop2_plastic, (group_name == "vs-URA3") & (media2 == "SC-ura, with estradiol"))$sT t = -1.4445, df = 2, p-value = 0.1427 alternative hypothesis: true mean is less than 0 95 percent confidence interval: -Inf 0.01979217 sample estimates: mean of x -0.0193775
8.2 Strong cost of plasticity in E2 media
"In E2 liquid media, the selection coefficient for the plastic strain relative to the P2 strain was -0.14 and was significantly different than 0 (one sample one-sided t-test; n = 3, p = 0.044), indicating a cost of plasticity."
cop2_plastic <- read.csv("2017-Maxwell-Magwene-when-sensing-is-gambling-fitness-calculations.csv") t.test(subset(cop2_plastic, (group_name == "vs-ura3") & (media2 == "SC+5FOA, without estradiol"))$sT, mu = 0, alternative="less")
One Sample t-test data: subset(cop2_plastic, (group_name == "vs-ura3") & (media2 == "SC+5FOA, without estradiol"))$sT t = -3.1117, df = 2, p-value = 0.04481 alternative hypothesis: true mean is less than 0 95 percent confidence interval: -Inf -0.008839538 sample estimates: mean of x -0.1434755
8.3 No significant effect of the fluorescent tag on the cost of plasticity
"However, the fluorescent marker did not significantly affect the number of offspring produced by either of the strains in either E1 or E2 liquid (Fig. S3)(paired two-sided t-test, n = 3, p > 0.26)"
source("load-libraries.R") theData <- read.csv("2017-Maxwell-Magwene-when-sensing-is-gambling-fig5-and-figS2.csv") %>% subset(group_name == "mCherry-vs-GFP") %>% subset((media == "SC-ura") & (estradiol == "100nM") | (media == "SC+5FOA") & (estradiol == "0nM")) %>% transform(generations = log2((50*postselection)/preselection)) %>% dcast( replicate + media ~ gate, value.var="generations") cat("Test for difference in SC-ura:\n------------\n") with(subset(theData, media == "SC-ura"), t.test(mCherry, GFP, paired=T)) cat("Test for difference in SC+5FOA:\n------------\n") with(subset(theData, media == "SC+5FOA"), t.test(mCherry, GFP, paired=T))
Test for difference in SC-ura: ------------ Paired t-test data: mCherry and GFP t = -1.5559, df = 2, p-value = 0.26 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -0.7414909 0.3476474 sample estimates: mean of the differences -0.1969217 Test for difference in SC+5FOA: ------------ Paired t-test data: mCherry and GFP t = 0.38866, df = 2, p-value = 0.735 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -1.020411 1.223062 sample estimates: mean of the differences 0.1013257
8.4 Mutation alters the diversification strategy of the plastic strain
"We used this half-maximum point to estimate the relative proportion (area) of the environment that each strain was able to occupy. The genotype plastic(green) occupies 24% ± 1.6% of the E1 agar plates and 69% ± 5.7% of the E2 agar plates. In contrast, a plastic ∆/∆ genotype occupies 46% ± 8% of the E1 environment and 49% ± 4% of E2 (All results expressed as means ± 95% CI based on three biological replicates)."
source("load-libraries.R") im.m.sm <- read.csv("2017-Maxwell-Magwene-when-sensing-is-gambling-smoothed-plate-patterns.csv") im.m.sm %>% subset( x > 50) %>% subset( x < 494) %>% ddply(.(strain, media, replicate), plyr::summarize, halfMax = max(sm)/2, pos = 2.54*(x[which(sm <= halfMax)[1]])/360, # Convert to cm pos2 =2.54*(x[which(sm >= halfMax)[1]])/360 ) %>% subset(strain %in% c("CMY115", "CMY121")) %>% transform( pos = apply( data.frame(pos, pos2), 1, max), pos2=NULL) %>% transform( area = pi * ( pos )^2 ) %>% transform( percentage = area/(pi*(8.3/2)^2)) %>% ddply(.(strain, media), function(x) mean_cl_normal(x$percentage)) %>% transform(area.of.center=y, plus.minus = y-ymin, y = NULL, ymin=NULL, ymax=NULL) %>% transform(strain = factor(strain, levels=c("CMY121", "CMY115"), labels = c("platic.green", "plastic D/D"))) %>% transform( area.occupied = round(abs( area.of.center - ifelse(media == "foa", 1, 0)),2), plus.minus = round(plus.minus, 3), area.of.center = NULL)
strain media plus.minus area.occupied 1 plastic D/D foa 0.037 0.47 2 plastic D/D ura 0.081 0.46 3 platic.green foa 0.057 0.69 4 platic.green ura 0.017 0.24
9 Session Info
source("load-libraries.R") sessionInfo()
R version 3.2.3 (2015-12-10) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.10.5 (Yosemite) locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] colortools_0.1.5 wesanderson_0.3.2 magrittr_1.5 reshape2_1.4.1 [5] plyr_1.8.3 ggplot2_2.1.0 loaded via a namespace (and not attached): [1] colorspace_1.2-6 scales_0.4.0 tools_3.2.3 gtable_0.2.0 [5] Rcpp_0.12.4 stringi_1.0-1 grid_3.2.3 stringr_1.0.0 [9] munsell_0.4.3