Skip to content

Latest commit

 

History

History
59 lines (46 loc) · 5.55 KB

README.md

File metadata and controls

59 lines (46 loc) · 5.55 KB

Data and scripts of the paper "Clark-Shen N, Tariel-Adam J, Gajanur A, Brown C. Life beyond a jar: Effects of tank size and furnishings on the behaviour and welfare of Siamese fighting fish (Betta splendens). Animal Welfare. 2024;33:e62. doi:10.1017/awf.2024.67"

Folders

  • 📂 Data contains the data file called "Master" in CSV and Excel formats. More explanation below.
  • 📂 Script contains all the scripts used to process and analyse the data and generate the figures. More explanation below.
  • 📂 renv contains all the files generated by the renv R package. The renv package allows storing R package versions used during the analysis.

Data folder

The data are stored two identical files in different formats, Master.csv and Master-excel.xlsx. They contain the following variables:

  • Fish: Name of the fish (Dragon, Elf, Fairy, Ghost, Goblin, Kinara, Kraken, Merlion, Naga, Orange Pendek, Pegasus, Phoenix or Wizard)
  • Tank: Tank in which the fish was during the trial (Jar, Small, Medium, Large or Barren)
  • Order: Order of rotation of the fish between tanks (1, 2, 3, 4 or 5)
  • Time: Time of day of the trial (7:00 AM, 10:00 AM, 2:00 PM or 6:00 PM)
  • Filter: Whether a filter was present in the tank
  • Up/Down: Whether the behaviour(s) were performed on the upper or lower half of the tank
  • Resting: Time the fish spent resting in seconds
  • Resting place: Place where the fish rested (Filter, Floor, Inside barrel, On or against barrel, Plant leaves, Surface, Surface against plant, Under or against plant or N/A)
  • Hovering: Time the fish spent hovering in seconds
  • Hovering place: Place where the fish hovered (Above ground, Inside barrel, Just under surface, Just under surface (under bubble nest) or Mid water column)
  • Sinking/Floating: Time the fish spent sinking or floating
  • Transition type: complimentary information about the transition between behaviours
  • Swimming: Time the fish spent swimming in seconds
  • Stereotypic swimming: Time the fish spent stereotypic swimming in seconds
  • Stereotypic swimming group/batch: This column is used to identify stereotypic swimming times that belong to the same stereotypic swimming event. Since time spent stereotypic swimming was recorded separately depending on whether it occurred in the upper or lower half of the tank, a single event could be split across multiple rows. This column helps link those times to the same event batch.
  • Stereotypic swimming type: Type of stereotypic swimming (Circles, Pace then hover, Pacing, Pacing front wall, Pacing with a hover or Zig zag)
  • Stereotypic swimming place: Place where the fish did stereotypic swimming (Back wall, Behind barrel, Corner, Front wall, Middle tank, Side tank, Side wall or Unsure)
  • Stereotypic swimming number of repetitions: Number of individual stereotypic swimming bouts (e.g. how many circles the fish did)
  • Interaction with surface: Time the fish spent interacting with the ground or side walls in seconds
  • Interaction with surface type: Type of interaction (Aggressive bite wall, Aggressive fold into ground/scraped side, Aggressive ground, Aggressive head into surface, Aggressive plant, Aggressive swim up and down side (see reflection?), Aggressive thrash in surface, Aggressive wall, Bite ground, Bite surface, Fold into ground/scraped side, Head into surface, Head into surface (see reflection?), Head into surface and down, Head into surface and slide up, Head shake/swim into corner, Head shake/swim into corner then up, Head shake/swim into wall, Head shake/swim into wall (see reflection?), Head shake/swim into wall and pebbles, Nipping wall, Swim up and down side (see reflection?) or Swimming along side wall with contact)
  • Out of view: Time the fish was out of view of the human observer
  • Nest building: Time the fish spent building a nest
  • Foraging: Time the fish spent foraging

The complexity of the data file arises because a single trial can span multiple rows. Times spent doing each behaviour were recorded on the same row as long as they were different behaviours (e.g., time spent swimming and time spent hovering). However, a new row was created if the fish repeated a similar behaviour that had already been recorded (e.g., if the fish started swimming again after previously swimming and then hovering).

Script folder

  • 📄 Load-data.R is:
    • uploading packages
    • transforming the raw data in the final data used for analysis. It concatenates times spent doing the same behaviour so that each row corresponds to an unique trial with the total time spent doing each behaviour. It also removes unused columns.
    • concatenating hovering places and resting places into fewer categories.
  • 📄 Analysis.qmd main file containing all analysis included in the paper.
  • 📄 Analysis_PCA.qmd contains attempts to perform the principal component analysis.
  • 📄 Analysis_Hovering.qmd contains attempts to analyse the time spent hovering.
  • 📄 Figures for the paper.qmd generates the figures for the paper.

Scripts in QMD format are also available in HTML format, providing both the code and the corresponding plots and analysis outputs.

Sub-folder: Functions

  • 📄 Linear-model.R contains functions providing diagnostic and contrasts of the linear models.
  • 📄 Plots.R contains functions for generating the plots.

Sub-folder: Repeatability rptR output

The rptR package calculates repeatability and its confidence interval. Since this calculation takes time to run, the calculation output is stored in this folder to avoid rerunning it multiple times.