Georgina C. Cole1, Edward Lavender2,3,4*, Adam Naylor1,5, Simon J. Girling1, Dmitry Aleynik6, Steffen J. Oppel7, Jane Dodd8, James Thorburn3,9,10
1 Royal Zoological Society of Scotland, UK
2 Centre for Research into Ecological and Environmental
Modelling, University of St Andrews, UK
3 Scottish Oceans Institute, University of St Andrews, UK
4 Department of Systems Analysis, Integrated Assessment and
Modelling, Eawag, Swiss Federal Institute of Aquatic Science and
Technology, Switzerland
5 New Zealand Centre for Conservation Medicine, Auckland Zoo,
New Zealand
6 Scottish Association for Marine Science, UK
7 Swiss Ornithological Institute, Switzerland
8 Nature Scot, UK
9 School of Applied Sciences, Edinburgh Napier University,
UK
10 Centre for Conservation and Restoration Science, Edinburgh
Napier University, UK
* This repository is maintained by Edward Lavender (edward.lavender@eawag.ch).
This repository contains methods, written in R and organised as an RStudio Project for Cole et al. (in prep). Physiological responses to capture, handling and tagging in flapper skate (Dipturus intermedius).
We studied the physiological responses of flapper skate following catch-and-release angling and acoustic tagging in the Loch Sunart to the Sound of Jura Marine Protected Area on the west coast of Scotland (Figure 1). We recorded capture fight times and blood parameters following capture (blood sample one: BS1) and following handling (blood sample two: BS2). Using statistical modelling (as recorded in this repository) we investigated capture fights and relationships between blood parameters (for both BS1 and BS2) and aspects of the capture and handing process (such as fight time), individual characteristics (such as sex) and environmental conditions (such as temperature). This work was conducted as part of the Movement Ecology of Flapper Skate project.
Figure 1. A flapper skate is released following capture and handing in the Loch Sunart to the Sound of Jura Marine Protected Area on the west coast of Scotland. Photograph courtesy of the Movement Ecology of Flapper Skate project.
The project was built in R (version 4.3.1)
in RStudio and implements local dependency
management using
renv
. This
manages the installation of the
dv
package for project
management (from GitHub), as well as other
packages from the Comprehensive R Archive
Network. The first time the project is
opened, renv
can
be used to regenerate the local project library, as described in
renv.lock
(via .Rprofile
and renv/activate.R
).
The project follows a standardised structure encouraged by the
dv
package. The high-level
structure was generated via dv::use_template_proj()
. The contents as
follows:
-
renv/
implements local dependency management. -
data-raw/
contains ‘raw’ data:skate/
contains skate data:Skate acoustic tagging data .xlsx
contains raw data from capture and tagging, including the details of capture events, blood parameters and heart and respiratory rates during handling, with one individual per sheet. This file is used for the fight time, heart and respiratory rate analyses in this project.Skate data analysis shared.xlsx
summarises capture events and blood parameters in one place. (This document was collated by G. C. Cole.) TheData all without formulas
sheet includes capture events, raw blood parameters and temperature-corrected blood parameter values. This sheet is used for the blood parameter analyses in this project.
spatial/
contains spatial data:coast/
contains coastline data for the region, sourced from the Database of Global Administrative Areas;mesh/
contains mesh files for the West Scotland Coastal Ocean Modelling System (WeStCOMS), sourced from Dmitry Aleynik at the Scottish Association for Marine Science (SAMS). These files are also available from the SAMS Thredds Server;
-
data/
contains processed data and results:skate/
contains processed skate data:physio.rds
contains processed blood physiology data fromprocess_bloods.R
;vital.rds
contains processed vital signs data fromprocess_vitals.R
;fights.rds
contains processed capture fights data fromprocess_fights.R
;
spatial/
contains processed spatial data:bathy/
contains one arc-second bathymetry data from Digimap (higher resolution data from the Ireland, Northern Ireland and Scotland Hydrographic surveys are not available for all sampled locations);coast/
contains processed coastline data fromprocess_spatial.R
;mesh/
contains processed WeStCOMS mesh files fromprocess_spatial.R
;
estimates/
contains model outputs fromanalyse_*.R
scripts;inst/
contains RStudio Project-management files generated bydv
:tree.rds
is a record of the project directory tree (as generated bydv::use_template_tree()
indev/01-dev.R
, see below);
-
R/
containsR
scripts for data processing and analysis:define_global_param.R
defines global parameters;define_helpers.R
defines helper functions;process_spatial.R
processes raw spatial data;process_bloods.R
processes raw blood parameter data;process_vitals.R
processes raw vital signs data;process_fights.R
processes raw capture fights data;analyse_fights.R
analyses capture fights;analyse_bloods.R
analyses BS1 and BS2;analyse_bloods_change.R
analyses the change in blood parameters during handling;analyse_bloods_synthesis.R
synthesises results across blood parameters;analyse_vitals.R
analyses heart and respiratory rates during handling;
-
dev/
contains project-management scripts:01-dev.R
and02-clone.R
are standarddv
scripts:01-dev.R
records project set up and development;02-clone.R
is used to clone the project (see ‘Instructions’);
-
fig/
contains figures. -
doc/
contains supporting documents.
Note that the data-raw/
, data/
(except data/inst/
), fig/
and
doc
directories are not currently provided in the online version of
this repository.
Follow the steps described below to clone the project and reproduce the workflow.
-
Clone the project via GitHub. Follow the instructions in
dev/02-clone.R
to install project packages and create directories:- Packages. Open
dev/02-clone.R
to userenv
to regenerate the local project library. Packages can also be manually reinstalled via02-clone.R
. (However, note that package versions may differ in this case.) - Directories. Rebuild the project directory tree, via
dv::use_template_proj()
anddv::use_template_tree()
.
- Packages. Open
-
Obtain raw data from the authors and/or links provided above
-
Define global parameters via
define_global_param.R
anddefine_helpers.R
. -
Process raw data via
process_spatial.R
,process_bloods.R
,process_vitals.R
andprocess_fights.R
. -
Implement data analysis via
analyse_fights.R
,analyse_bloods.R
,analyse_bloods_change.R
,analyse_bloods_synthesis.R
andanalyse_vitals.R
.
Cole et al. (in prep). Physiological responses to capture, handling and tagging in flapper skate (Dipturus intermedius).