Skip to content

Evaluating the impacts of the outbreak of a Bovine Spongiform Encephalopathy epidemic on the demographic and population dynamics of one of the world's largest colonies of the Eurasian Griffon vulture (Gyps fulvus).

License

Notifications You must be signed in to change notification settings

palmaraz/SaniVult

Repository files navigation


License: MIT DOI


The SaniVult project


Table of Contents
  1. About
  2. Reproducible workflow
  3. Roadmap
  4. License
  5. Contact
  6. R packages used in this project

About

This is the GitHub hosting of the project SaniVult. The paper associated to the project is published in the journal Ecological Applications. See the CITATION file for a BibTex entry to the article. This folder contains the files needed to reproduce all the results of the project, and compile the manuscript of the associated paper.

CRediT authorship

This project was conducted by:

· Pablo Almaraz (see contact below), which participated in study conception, designed and conducted the analyses, and led manuscript writing.

· Guillermo Blanco, which led and conceived the study, conducted the field surveys and participated in manuscript writing.

· Félix Martínez, which conducted the field surveys.

· Zebensui Morales-Reyes, which contributed ideas and participated in manuscript writing.

· José A. Sánchez Zapata, which contributed ideas and participated in manuscript writing.

The major goal of the project is to evaluate the impacts of the outbreak of a Bovine Spongiform Encephalopathy epidemic in Europe on the demographic and population dynamics of one of the world's largest colonies of the Eurasian Griffon vulture (Gyps fulvus). The Eurasian Griffon vulture is a keystone scavenger providing fundamental ecosystem services worldwide. For further details, see the abstract below and the file ms/main_text.pdf. Read the published version of the paper.

(back to top)


Abstract

Scavenging is a key ecological process controlling energy flow in ecosystems and providing valuable ecosystem services worldwide. As long-lived species, the demographic dynamics of vultures can be disrupted by spatio-temporal fluctuations in food availability, with dramatic impacts on their population viability and the ecosystem services provided. In Europe, the outbreak of Bovine Spongiform Encephalopathy (BSE) in 2001 prompted a restrictive sanitary legislation banning the presence of livestock carcasses in the wild at a continental scale. In long-lived vertebrate species the buffering hypothesis predicts that the demographic traits with the largest contribution to population growth rate should be less temporally variable. The BSE outbreak provides a unique opportunity to test for the impact of demographic buffering in a keystone scavenger suffering abrupt but transient food shortages. We study the 42-year dynamics (1978-2020) of one of the world's largest breeding colonies of Eurasian griffon vultures (Gyps fulvus). We fitted an inverse Bayesian state-space model with density-dependent demographic rates to the time-series of stage-structured abundances to investigate shifts in vital rates and population dynamics before, during and after the implementation of a restrictive sanitary regulation. Prior to the BSE outbreak the dynamics was mainly driven by adult survival: 83% of temporal variance in abundance was explained by variability in this rate. Moreover, during this period the regulation of population size operated through density-dependent fecundity and sub-adult survival. However, after the onset of the European ban, a one-month delay in average laying date, a drop in fecundity and a reduction in the number of fledglings induced a transient increase in the impact of fledgling and sub-adult recruitment on dynamics. Although adult survival rate remained constantly high, as predicted by the buffering hypothesis, its relative impact on the temporal variance in abundance dropped to 71% during the sanitary legislation and to 54% after the ban was lifted. A significant increase in the relative impact of environmental stochasticity on dynamics was modeled after the BSE outbreak. These results provide empirical evidence on how abrupt environmental deterioration may induce dramatic demographic and dynamic changes in the populations of keystone scavengers, with far-reaching impacts on ecosystem functioning worldwide.

(back to top)

Built With

This is a workflowr project bootstraped by a suite of open-source tools.

A suite of R packages were used in this project. I am grateful to all the people involved in the development of these open-source packages. Run the following R command from within the project for producing a reference list of the packages used:

grateful::cite_packages(out.format = "rmd", out.dir = file.path(getwd(), "analysis"))

A list of these packages is placed at the end of this document.

(back to top)

Reproducible workflow

This section shows how to reproduce the results of the accompanying paper. The folder ./code has the following structure:

.
├── ./code
│   ├── ./code/S4D3M_JAGS_Fitting.R
│   ├── ./code/S4D3M_JAGS_model.jags
│   └── ./code/utilities.R

In this folder, the file ./code/utilities.R contains all the functions and utilities necessary to conduct the analyses. The file ./code/S4D3M_JAGS_model.jags contains the state-space stage-structured demographic density-dependent model (S4D3M) developed in the accompanying paper written in the JAGS language.

The data folder has the following structure:

├── ./data
│   ├── ./data/Breeding_output.csv
│   ├── ./data/BSE_cases.csv
│   └── ./data/data.csv

The manuscript folder has the following structure:

├── ms
│   ├── appendix.pdf
│   ├── appendix.tex
│   ├── arxiv.sty
│   ├── biblio.bib
│   ├── DataS1.zip
│   ├── figs
│   │   ├── Fig1.pdf
│   │   ├── Fig2.pdf
│   │   ├── Fig3.pdf
│   │   ├── Fig4.pdf
│   │   ├── FigS1.pdf
│   │   ├── FigS3.pdf
│   │   └── FigS4.pdf
│   ├── main_text.pdf
│   ├── main_text.tex
│   ├── MetadataS1.docx
│   └── MetadataS1.pdf

(back to top)

Prerequisites

Prior to reproducing the results, make sure to have installed all the necessary software. In particular, you need JAGS and R. The R libraries needed to reproduce the results (see below) will be automatically installed by the package pacman.

Workflow

Note that the S4D3M is fitted through Bayesian MCMC methods using Gibbs sampling, and runs in JAGS: even though JAGS is written in the C++ language, the code can take several hours to run depending on the architecture used. Note that there are relatively easy ways of parallelizing this code.

You can reproduce the results of the accompanying paper with three methods:

  1. The first, easiest way to reproduce all the analyses in the project is to use the Makefile. With simple GNU Make syntax, you can reproduce all the project, from statistical analyses to manuscript production. For example, in GNU/Linux based systems, you can point with the command shell to the project folder and run the following command:

    make all

    This command will first conduct all the statistical analyses in the project, and produce all the figures. It then will assemble and compile the manuscript and associated supplementary materials with the necessary figures. Finally, it will open the files. Alternatively, note that you can run this command within RStudio from the Terminal tab.

  2. From within R, simply source the file ./code/S4D3M_JAGS_Fitting.R. This will perform all the analyses of the paper in the required order.

  3. The final method is to open the R Markdown file ./analysis/index.Rmd to interactively execute the workflow.

    (back to top)

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Pablo Almaraz - @palmaraz_Eco - palmaraz@gmail.com

Personal webpage: https://palmaraz.github.io/

Project Link: https://github.com/palmaraz/SaniVult

(back to top)

R packages used in this project

  • base (R Core Team 2021)
  • workflowr (Blischak, Carbonetto, and Stephens 2019)
  • rmarkdown (Xie, Dervieux, and Riederer 2020)
  • checkpoint (Ooi, de Vries, and Microsoft 2021)
  • coda (Plummer et al. 2006)
  • data.table (Dowle and Srinivasan 2021)
  • ggmcmc (Fernández-i-Marín 2016)
  • ggsci (Xiao 2018)
  • grateful (Rodríguez-Sánchez and Hutchins 2020)
  • mvtnorm (Genz and Bretz 2009)
  • pacman (Rinker and Kurkiewicz 2018)
  • patchwork (Pedersen 2020)
  • runjags (Denwood 2016)
  • tidyverse (Wickham et al. 2019)
  • truncnorm (Mersmann et al. 2018)
  • viridis (Garnier et al. 2021)
  • xtable (Dahl et al. 2019)
  • dplyr (Wickham et al. 2021)
  • ggpubr (Kassambara 2020)
  • plyr (Wickham 2011)
  • readr (Wickham and Hester 2021)
  • reshape2 (Wickham 2007)
  • tibble (Müller and Wickham 2021)

References

Blischak, John D, Peter Carbonetto, and Matthew Stephens. 2019. Creating and Sharing Reproducible Research Code the Workflowr Way F1000Research 8 (1749). https://doi.org/10.12688/f1000research.20843.1.

Dahl, David B., David Scott, Charles Roosen, Arni Magnusson, and Jonathan Swinton. 2019. Xtable: Export Tables to LaTeX or HTML. https://CRAN.R-project.org/package=xtable.

Denwood, Matthew J. 2016. "runjags: An R Package Providing Interface Utilities, Model Templates, Parallel Computing Methods and Additional Distributions for MCMC Models in JAGS." Journal of Statistical Software 71 (9): 1–25. https://doi.org/10.18637/jss.v071.i09.

Dowle, Matt, and Arun Srinivasan. 2021. Data.table: Extension of 'Data.frame'. https://CRAN.R-project.org/package=data.table.

Fernández-i-Marín, Xavier. 2016. "ggmcmc: Analysis of MCMC Samples and Bayesian Inference." Journal of Statistical Software 70 (9): 1–20. https://doi.org/10.18637/jss.v070.i09.

Garnier, Simon, Ross, Noam, Rudis, Robert, Camargo, et al. 2021. viridis - Colorblind-Friendly Color Maps for r. https://doi.org/10.5281/zenodo.4679424.

Genz, Alan, and Frank Bretz. 2009. Computation of Multivariate Normal and t Probabilities. Lecture Notes in Statistics. Heidelberg: Springer-Verlag.

Kassambara, Alboukadel. 2020. Ggpubr: 'Ggplot2' Based Publication Ready Plots. https://CRAN.R-project.org/package=ggpubr.

Mersmann, Olaf, Heike Trautmann, Detlef Steuer, and Björn Bornkamp. Truncnorm: Truncated Normal Distribution. https://CRAN.R-project.org/package=truncnorm.

Müller, Kirill, and Hadley Wickham. 2021. Tibble: Simple Data Frames. https://CRAN.R-project.org/package=tibble.

Ooi, Hong, Andrie de Vries, and Microsoft. 2021. Checkpoint: Install Packages from Snapshots on the Checkpoint Server for Reproducibility. https://CRAN.R-project.org/package=checkpoint.

Pedersen, Thomas Lin. 2020. Patchwork: The Composer of Plots. https://CRAN.R-project.org/package=patchwork.

Plummer, Martyn, Nicky Best, Kate Cowles, and Karen Vines. 2006. "CODA: Convergence Diagnosis and Output Analysis for MCMC." R News 6 (1): 7–11. https://journal.r-project.org/archive/.

R Core Team. 2021. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.

Rinker, Tyler W., and Dason Kurkiewicz. 2018. pacman: Package Management for R. Buffalo, New York. http://github.com/trinker/pacman.

Rodríguez-Sánchez, Francisco, and Shaurita D. Hutchins. 2020. Grateful: Facilitate Citation of r Packages. https://github.com/Pakillo/grateful.

Wickham, Hadley. 2007. "Reshaping Data with the reshape Package." Journal of Statistical Software 21 (12): 1–20. http://www.jstatsoft.org/v21/i12/.

———. 2011. "The Split-Apply-Combine Strategy for Data Analysis." Journal of Statistical Software 40 (1): 1–29. http://www.jstatsoft.org/v40/i01/.

Wickham, Hadley, Mara Averick, Jennifer Bryan, Winston Chang, Lucy D'Agostino McGowan, Romain François, Garrett Grolemund, et al. 2019. "Welcome to the tidyverse." Journal of Open Source Software 4 (43): 1686. https://doi.org/10.21105/joss.01686.

Wickham, Hadley, Romain François, Lionel Henry, and Kirill Müller. 2021. Dplyr: A Grammar of Data Manipulation. https://CRAN.R-project.org/package=dplyr.

Wickham, Hadley, and Jim Hester. 2021. Readr: Read Rectangular Text Data. https://CRAN.R-project.org/package=readr.

Xiao, Nan. 2018. Ggsci: Scientific Journal and Sci-Fi Themed Color Palettes for 'Ggplot2'. https://CRAN.R-project.org/package=ggsci.

Xie, Yihui, Christophe Dervieux, and Emily Riederer. 2020. R Markdown Cookbook. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown-cookbook.

(back to top)

About

Evaluating the impacts of the outbreak of a Bovine Spongiform Encephalopathy epidemic on the demographic and population dynamics of one of the world's largest colonies of the Eurasian Griffon vulture (Gyps fulvus).

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors