Impacts of an anxiolytic drug on fish behaviour and habitat use in a natural landscape
Data files
Aug 07, 2025 version files 4.14 GB
-
Datasets.zip
4.14 GB
-
R_scripts.zip
32.80 KB
-
README.md
11.89 KB
Abstract
Pharmaceutical contaminants reaching natural aquatic ecosystems can affect fish behaviour, modifying activity patterns, foraging behaviour, and antipredator responses. While laboratory-based studies can offer key insights, assessing the ecological relevance of these findings requires field-based approaches. Therefore, we examined the effects of oxazepam, a widely prescribed anxiolytic drug, on the behaviour of a cyprinid fish (the common roach, Rutilus rutilus) in the wild, combining slow-release exposure implants with continuous tracking via acoustic telemetry. To add ecological realism, we created a landscape of fear with an uneven distribution of resources (macrophytes) and exposure to predators (pike, Esox lucius), additionally testing the effects of the drug on roach habitat selection and predator-prey interactions. Fish exposed to the drug showed an increased swimming activity and speed, but exhibited a more constrained spatial distribution in the pond, favoring areas with higher refuge availability. Both exposed and unexposed fish modified their habitat use in the presence of predators. Exposed fish appeared to get closer to the predators when these were caged, but not when predators were free-roaming. Our findings highlight the importance of considering ecological context to understand how pharmaceuticals affect fish behaviour, which is crucial for assessing risks at population and ecosystem levels.
Our study had two experimental treatments: oxazepam exposure (control fish and oxazepam-exposed fish) and the landscape of fear predation treatment I. No predators, II. Caged predators, and III. Free-roaming predators, these stages are called conditions throughout. We separated the data into three data sets, one per week, representing the different stages of the predation treatment. Here we provide the data and code used for the analysis of fish positions to extract movement parameters and statistical analysis. There are six folders with the datasets and respective R scripts: data filtering, swimming activity, behavioral states, Habitat selection, Home range, and predator-prey interactions.
Dataset DOI: 10.5061/dryad.c2fqz61mh
Description of the data and file structure
The IPonds-Landscape of fear project is a repository for the data and code used in the manuscript titled: "Impacts of an anxiolytic drug on fish behaviour and habitat use in a natural landscape".
The project has two components: "Data" and "Scripts". Data contains the main datasets needed to run the code scripts provided in the folder called Scripts.
Both components are organized by analyses according to the sections provided in the manuscript: Filtering, Activity, Home range, Behavioral states, habitat selection, and predator-prey interactions.
The code provided is fully annotated.
Files and variables
File: R_scripts.zip
Description: The compresed file contains a folder with six quarto files fully annotated. Each file (.QMD) contains the code used to conduct the analyses described in each of the respective sections in the manuscript: Filtering, Activity, Home range, Habitat selection, Behavioral states, and Predator-prey interactions. The data sets required to run the scripts are provided in the folder "Datasets". Please read the respective material and methods sections for more details on the analytical approaches used.
File: Datasets.zip
Description: The compresed file contains a folder with six sub folders containing the data sets used in the R scripts. One folder per analysis.
Filtering
Data set used for initial data tidying and filtering. Three files are provided:
iponds2_2018_Tagging_: a CSV file with information about the fish and dates of the experiments. 9 columns.
TagID: Tag ID for each fish
Treatment: Exposed fish: Oxazepam; Control fish: Control
TL_cm: Fish total length in cm
Weight_g: Fish weight in g
Comments: important notes when the exposure happened.
Tagging Date: Date when fish were tagged and implanted
Release Date: Date when the roach was released
PikeInBoxesDate: Date when pikes were in boxes
PikeLooseDate: date when pike were loose
MosterPike: Date when big pike was added
pos_DB.rds: Large dataset with the positions of all fish for the whole duration of the study. 16 variables
tag: fish tag number
ts: time stamp, date, time, and hour for each position
x: position latitude
y: position longitud
z: position Depth
x_sd: standard deviation of estimated position YAPS
y_sd: standard deviation of estimated position YAPS
nobs: number of receivers that heard it
k: chunk (what is this, 1 hr bins or less)
nobs10: running mean of ten
day: day without time
tod: time of day, 0-24 hr, decimal representation of time
hour: hour
dist: distance to the next observation
speed: to the next observation
Data_all.rds: Merge the data set of pos_DB.rds and iponds2_2018_Tagging_ containing both positions of the fish and information on treatment and fish size.
Activity
A Folder including datasets used to conduct the analyses of swimming activity and speed. Including four datasets.
Cummulative_dn_all: dataset used for swiming activity analyses consisting of the following variables:
Tag: Tag number
Treatment: oxazepam, Control
Period: Day and Night
Sum.t: cumulative time
Condition: predator treatment corresponding to the consecutive weeks: No predator, caged predator, free predator
Prop.activ_all_filt: dataset used for activity index analyses consisting of the following variables:
Tag: Fish tag
Treatment: Control , oxazepam
period: Day/Night
prop.mov: proportion of time in which speed is higher than 0.02 m/s
condition: predator treatment corresponding to the consecutive weeks: No predator, caged predator, free predator
Speeds_dn_ctmm_all: dataset consisting of the following variables:
Week: respective week
Period Day and Night
Id: file id output from CTMM
Tag: fish tag ID
Low: confidence interval
Est: estimate
High: high confidence interval
Treatment: predator, control
Condition: No predator, caged predator, free predator
speed_hr; speed in hours
distance_km: distance traveled km
speed_ms: speed m/ s
speed: speed m/ s
distance_mh: m/hr
prop.activ_all_filt: This file records individual animal movement (as proportion moved) under different treatments, times of day, and predator exposure conditions.
fits_allweeks_daytime.rds : Model output CTMM.fit function, ctmm package. Large list of 3.1 MB with 146 elements, one per fish per day. The function ctmm returns a prototype ctmm movement-model object. By default, ctmm.loglike returns the log-likelihood of the model CTMM. ctmm.fit returns the estimated CTMM movement-model object with all of the components of CTMM plus the components listed below.
AICc: The approximate corrected Akaike information criterion for multivariate distributions with variable numbers of unknown mean and (structured) covariance parameters (Burnham & Anderson, Eq. 7.91). This formula is only exact for IID data.
Loglike: The log-likelihood.
Sigma: The maximum likelihood variance/covariance estimate (possibly debiased). For the endlessly diffusing BM and IOU processes, this is instead the diffusion rate estimate.
Mu: The maximum likelihood stationary mean vector estimate.
COV.mu: The covariance matrix of the mu estimate, assuming that the covariance estimate is correct.
DOF.mu: The effective number of degrees of freedom in the estimate of mu, assuming that the autocorrelation model is correct. This can be much smaller than the length(data$t) if the data are autocorrelated.
COV: Covariance of the autocovariance parameter estimate vector c(sigma, tau, circle), as derived (asymptotically) from the hessian of the log-likelihood function, and where sigma is parameterized in terms of its largest variance major, the ratio of the smallest to largest variance minor, and angle of orientation. Typically, sigma's major parameter is extremely correlated to tau[1], and sequential components of tau are slightly correlated.
Home range
Folder UDs: Folder with three subfolders, one per each week, containing the utilization distribution models, the autocorrelated kernel density estimate. Autocorrelated kernel density home-range estimates from telemetry data and a corresponding continuous-time movement model.
UD object: a list with the sampled grid line locations r$x and r$y, the extent of each grid cell dr, the probability density and cumulative distribution functions evaluated on the sampled grid locations PDF & CDF, the optimal bandwidth matrix H, and the effective sample size of the data in DOF.H. The list also contains the effective sample sizes of various parameter estimates (DOF) and a parameter estimate table CI, with low, point, and high estimates for home range area. The home-range area with the fraction of inclusion level. UD. E.g., the 50% core home range is estimated at the level.UD=0.50, and 95% confidence intervals are placed on that area estimate with level=0.95.
Telemetries.rds and Telemetries_fp.rds: A list of fish positions in “telemetry” format is required as input to run the autocorrelated kernel density function from ctmm R package.
Behavioral states
Behave_all_hr: output csv file including fish ID, Treatment, Condition, and the time spent in each of the different behaviors.
Theta.estim.long.w1_ and Tracks.out_w1.rds, both are output files from different steps in the Segmentation step of the model, which can be obtained following the respective R script “Behavioral states”
Habitat selection
Integrated resource selection functions with autocorrelation-adjusted weights on the RSF likelihood function, in one file per week. rsf_all_w2, rsf_w1_all_, rsf_w3_all_. Each one contains the following variables:
id: Fish id
low_plant: lower limit of the 95% confidence intervals around parameter estimates of weighted RSFs for macrophyte presence.
low_pred: lower limit of the 95% confidence intervals around parameter estimates of weighted RSFs for predator presence.
low_area: lower limit of the 95% confidence intervals around parameter estimates of weighted RSFs for home range area in Km2
low_Tp: lower limit of the 95% confidence intervals around parameter estimates of weighted RSFs for home range crossing time scale in days.
low_T: lower limit of the 95% confidence intervals around parameter estimates of weighted RSFs for velocity persistence time scale in minutes.
low_speed: lower limit of the 95% confidence intervals around parameter estimates of weighted RSFs for speed in Km/ day ,
low_diff: lower limit of the 95% confidence intervals around parameter estimates of weighted RSFs for diffusion in Km2/day
est_plant: parameter estimates of weighted RSFs for macrophyte presence.
est_pred: parameter estimates of weighted RSFs for predator presence.
est_area parameter estimates of weighted RSFs for home range area Km2
est_T parameter estimates of weighted RSFs for crossing time scale in days.
est_T: parameter estimates of weighted RSFs for velocity persistence time scale in minutes.
est_speed: parameter estimates of weighted RSFs for speed.
est_diff: parameter estimates of weighted RSFs for diffusion in Km2/day.
high_plant: Higher limit of the 95% confidence intervals around parameter estimates of weighted RSFs for macrophyte presence.
high_pred: lower limit of the 95% confidence intervals around parameter estimates of weighted RSFs for predator presence.
high_area: lower limit of the 95% confidence intervals around parameter estimates of weighted RSFs for home range area in Km2.
high_Tp: lower limit of the 95% confidence intervals around parameter estimates of weighted RSFs for velocity persistence time scale in minutes.
high_T: lower limit of the 95% confidence intervals around parameter estimates of weighted RSFs for velocity persistence time scale in minutes.
high_speed: lower limit of the 95% confidence intervals around parameter estimates of weighted RSFs for speed in Km/ day.
high_diff: lower limit of the 95% confidence intervals around parameter estimates of weighted RSFs for diffusion in Km2/day.
Treatment: Oxazepam and control.
Predator-prey interactions
A Folder with four files used to evaluate predator-prey interactions.
distance_all_pikes: Matrix with the Euclidean distance from each fish to each of the four pikes
encounter_rate_w3_all: dataset including the output of encounter probabilities from the R package ctmm. Contains the following variables:
id: Fish id
ec: encounter probability, output from cttm using the function encounter of the R package, which produces an array of standardized encounter probabilities with CIs
predator: Pike ID
Treatment: control and oxazepam
Inclusion_matrix_UDS: Matrix with fish ID and 0-1 to be included or not in the estimation of the conditional location distribution of where encounters take place (UD object)
interaction pred_w3: dataset including the number of interactions per fish with each of the four predators based on a threshold of distance and duration.
week3_interpolated.rds: Positions of fish for the week3 interpolated using the R package adehabitatLT to have the same number of rows, which is a requirement for the dynamic interaction analyses in the R package WildDI.
Script folder: This folder, which corresponds to the R_scripts zip file, contains six QMD files with the R code fully annotated.
Code/software
All the analyses were run in RStudio 2023.03.0. The packages used are indicated at the beginning of each R script.
