Last updated: 2021-06-24

Checks: 1 1

Knit directory: genes-to-foodweb-stability/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 1955523. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    code/.Rhistory
    Ignored:    output/.Rapp.history

Untracked files:
    Untracked:  .genes-to-foodweb-stability.Rproj.swp
    Untracked:  analysis/foodweb-persistence.Rmd
    Untracked:  analysis/foodweb-transitions.Rmd
    Untracked:  analysis/plant-growth-no-insects-lme.Rmd
    Untracked:  analysis/prep-timeseries.Rmd
    Untracked:  analysis/structural-stability.Rmd
    Untracked:  code/summarize_stability_metrics.R
    Untracked:  data/InsectAbundanceSurvival.csv
    Untracked:  data/insect_abundance_data_2018-09-26_underneathleaf.csv
    Untracked:  figures/MAR1-parameter-plot.pdf
    Untracked:  figures/aop2-genos-coxadjcurve.pdf
    Untracked:  figures/aop2-genotypes-multistate.pdf
    Untracked:  figures/cage-dynamics-20C.pdf
    Untracked:  figures/cage-dynamics-23C.pdf
    Untracked:  figures/keystone-coxadjcurve.pdf
    Untracked:  figures/keystone-effect-model-comparison-ratio.pdf
    Untracked:  output/all.mar1.brm.adj.rds
    Untracked:  output/all.mar1.brm.unadj.ar2.lag.rds
    Untracked:  output/all.mar1.brm.unadj.noBRBRonLYER.rds
    Untracked:  output/all.mar1.brm.unadj.rds
    Untracked:  output/all.mar1.brm.unadj.xAOP2.rds
    Untracked:  output/initial.mar1.brm.adj.rds
    Untracked:  output/initial.mar1.brm.unadj.rds
    Untracked:  output/time-series-data.RData

Unstaged changes:
    Modified:   README.md
    Modified:   analysis/about.Rmd
    Deleted:    analysis/community-persistence-keystone.Rmd
    Deleted:    analysis/critical-transitions-keystone.Rmd
    Modified:   analysis/index.Rmd
    Deleted:    analysis/plant-growth-no-insects.Rmd
    Deleted:    analysis/structural-stability-keystone.Rmd
    Deleted:    code/AOP2-LYER-Ptoid-persistence.R
    Modified:   code/README.md
    Deleted:    code/glm-ftest.R
    Modified:   code/plot-feasibility-domain.R
    Deleted:    code/prep-time-series.R
    Modified:   code/simulate-community-dynamics.R
    Deleted:    code/temperature-structural-stability-fig.R
    Modified:   data/README.md
    Deleted:    data/arabidopsis_clean_df.csv
    Modified:   figures/AOP2-growth-no-insects.pdf
    Modified:   figures/MAR1-nonequilibrium-foodchain-AOP2.pdf
    Deleted:    figures/MAR1-nonequilibrium-initial-temp.pdf
    Modified:   figures/MAR1-posterior-foodchain-AOP2.pdf
    Deleted:    figures/MAR1-posterior-initial-temp.pdf
    Deleted:    figures/initial-foodweb-structural-stability.png
    Modified:   figures/keystone-gene.pdf
    Modified:   figures/keystone-structural-stability-forkeynote.pdf
    Modified:   output/README.md
    Deleted:    output/full.mv.norm.brm.keystone.rds
    Deleted:    output/plant-growth-no-insects.RData
    Deleted:    output/reduced.1.brm.keystone.rds
    Deleted:    output/reduced.2.brm.keystone.rds
    Deleted:    output/reduced.3.brm.keystone.rds
    Deleted:    output/reduced.4.brm.keystone.rds
    Deleted:    output/reduced.5.brm.keystone.rds
    Deleted:    output/reduced.6.brm.keystone.rds
    Deleted:    output/timeseries_df.csv

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/about.Rmd) and HTML (docs/about.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
html 1955523 mabarbour 2020-10-11 Build site.
Rmd 761af40 mabarbour 2020-10-11 Refocus analysis on keystone gene result.
html 51fc18b mabarbour 2020-06-23 Build site.
Rmd 86116c8 mabarbour 2020-06-23 bioRxiv version of code and data.
html 86116c8 mabarbour 2020-06-23 bioRxiv version of code and data.
html 28c2a9f mabarbour 2020-02-05 Build site.
Rmd 27ad8e2 mabarbour 2020-02-05 Start workflowr project.

Abstract: Genes encode information that determine an organism’s fitness. Yet, we do not know the extent to which genes of one species determine the persistence of interacting species in an ecological community. Here we test the effect of three plant defense genes on the persistence of an insect food web. We found that a single allele at a single gene promoted coexistence by increasing plant growth, which in turn increased the intrinsic growth rates of species across multiple trophic levels. Our discovery of a keystone gene illustrates the need to bridge between biological scales, from genes to ecosystems, to understand community persistence. In particular, our results indicate that ongoing losses of genetic diversity may induce critical transitions in the persistence and functioning of ecosystems.

One-sentence summary: A single gene controls the diversity of species in an experimental food web.

Please see the main text and supplementary materials of the manuscript for details.