This repository contains all relevant data and code needed to reproduce key data harmonization and analyses related to the study "Prevalence of the novel amphibian pathogen Batrachochytrium salamandrivorans in Europe and its relationship to host richness and density". The datasets do not include exact geospatial information (latitude and longitude) for animals sampled due to conservation concerns for certain species. However, geospatial information may be requested and released with the permission of the authors of this study. Due to this, issues may arise when trying to run the R script within the 01_dataCleaning folder. Scripts that require precise geospatial information and their associated files remain in this repository for posterity's sake.
This project primarily uses R within the RStudio IDE. Version control within the R project is maintained using the renv package. The versions of R, RStudio, and renv are listed below, with links to their respective sources. These versions are absolutely necessary to effectively run the scripts within the 02_dataAnalysis folder.
All other info regarding R package versions can be found in the renv.lock file.
Python was used to obtain weather data from the GLDAS dataset available through NASA EarthData, and QGIS was used to process the .nc4 files. The weather data has already been integrated into our dataset, but if you wish to run any of the .py scripts in the weatherSampling folder, you will need the following versions of Python and QGIS*:

-
Please fork this repo if you intend to use or modify any of the code to avoid future merge conflicts. Forking will allow you to make changes to your own copy of the repository without affecting any of the files in this repository. This github.io page has an excellent section explaining both the 'why' and 'how' of forking repositories.
-
After you have forked this repository, you may then clone the forked repository to your local system. Cloning forked repositories may be done from Git Bash or from Command Prompt. In either case, the syntax is the same for cloning repositories:
git clone https://github.com/GitHub_username/forked-repo-name -
In R, navigate to the folder containing the cloned repository and open the Bsal-Dilution-Effect.Rproj file.
- This project file will organize the R environment so that all relevant scripts, files, and sub-folders are structured how they need to be to efficiently run the R scripts. Click here to learn more about R projects.
-
Within the opened project, open the dataAnalysis_DEH R script.
-
Before running any part of the script, make sure the renv package is installed and loaded:
install.packages('renv', version = '1.0.5') require(renv) -
You will then need to call
renv::restore()to reinstall the specific package versions used in this project. -
Once the required package versions have been installed, you are ready to run the R scripts. Happy coding! 🎊
*Note: For batch downloading .nc4 files, NASA EarthData provides a .txt file with links to the relevant data. However, these links do expire. If you wish to use this script for your own purposes, you will need to generate a new list of links using your own netrc login information and modify the link on line 99 of the datasetFetcher.py file. Due to the aforementioned geospatial information restrictions, this script will not work with the weather.csv file within the weatherSampling folder.
The purpose of this repository is to ensure code reproducibility for this project. While feedback is appreciated, I have restricted pull requests to collaborators only.
Collaborators on this project include Philipp Böning, Jaime Bosch, Stefan Lötters, An Martel, Frank Pasmans, Michael Veith, and Jason R. Rohr. This project exists thanks to their contributions.