Skip to content

joopie-28/ECL_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Are wildlife responses to anthropogenic disturbance governed by thresholds?

This is the accompanying repository for the QBIO7008 Master of Quantitative biology final thesis submission (10/06/2024).

This repository contains all necessary code to i) produce species detection histories from camera trap data, ii) run Bayesian occupancy GAMs and classify the fitted relationships and iii) produce plots to communicate results.

As some figures presented in the final report were constructed entirely in Powerpoint and QGIS, they are not included in this repository.

As the data used for this assignment are i) extremely large and ii) not open-access (data were collected by 10+ collaborators and remains their property), the raw data is not included in this repository. However, all intermediate products are included.

Due to the nature of this analysis, extensive use of a HPC environment was required. The filing structure therefore deserves some attention:

Folder “Analyses” contains all the scripts used. It also includes deprecated scripts in a sub-folder. “JMS_OGAM_Threshold_Analysis.R” is the file needed to create species detection histories from raw camera trap data and to pair them with covariates. The main output is the file “umflistocc.rds” which is an object containing detection histories and covariates for all species.

The file “umflistocc.rds” is located in the Analyses/HPC_Analyses_Files/ JMS_ECL_Thresholds/data subfolder – it is an input for the HPC scripts. All HPC scripts and inputs were kept together to ensure easy file transfer. The JMS_ECL_Thresholds/code subfolder contains all scripts needed to run the models in an HPC environment, including an R script (Threshold_Analysis_HPC.R), a bash script (SLURM_OCCUGAM_array_SHORT.txt), and another R/JAGS script that specifies the Bayesian model (Occugam.v2.R). All results are stored in the JMS_ECL_Thresholds/results subfolder, including error and log files from the HPC. The folder “OCCUGAM_RDS” contains RDS object with relevant model parameters, and the folder “PLOTTING_RDS” contains processed data that can be readily used to create plots of posterior distributions and derivatives. We did not store full models as these were often > 2GB.

Finally, the file Analyses/Threshold_Post_Fitting_Analyses.R contains some final code for analysing the HPC outputs, including categorisation of relationships, inspecting model performance with Bayesian p-values, and creating plots featured in the main text.

There are some other files in various folders, which may be relevant for a future extension of this work, but not used here. There are also some old figures from earlier model prototypes in the figures folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published