Data from: Early-life experience and disease exposure affect pathogen avoidance behaviour in macaques
Data files
Sep 30, 2026 version files 66.92 KB
-
data_pathogen_study1.csv
30.21 KB
-
data_pathogen_study2.csv
20.25 KB
-
dryad_pathogen_study1.Rmd
4.91 KB
-
dryad_pathogen_study2.Rmd
6.78 KB
-
README.md
4.77 KB
Abstract
This project contains the datasets (.csv) and R scripts (.Rmd) from both behavioral studies on pathogen avoidance in macaques. Study 1 tested macaques (N = 54) from seven different species and four different rearing backgrounds in a visual food-choice task where food was either placed on a substrate with or without pathogenic cues. Each trial presented a food reward (grape) placed on two substrates: one contaminated with macaque feces and one non-contaminated (either a neutral wooden block or a novel kitchen sponge). The data from Study 1 (data_pathogen_study1.csv) consists of 317 successful trials. It includes the variables subject’s identity, species, background, sex, social rank (high/low), trial condition (wood vs. sponge substrate), and which substrate was chosen (contaminated or clean). Study 2 tested sanctuary-born Japanese macaques (N = 55) from four groups; three groups had recently experienced an infectious disease outbreak. The data from Study 2 (data_pathogen_study2.csv) consists of 197 successful trials. It includes the variables subject’s identity, sex, rank (high/middle/low), group (enclosure) and exposure status, infection status (positive/negative/unknown), trial condition (wood vs. sponge substrate), subjects' first choice (contaminated vs. clean substrate), and whether the contaminated food was chosen by the subject within a trial. Each study also contains the R code that was used for generating the figures and analyses inside the manuscript within a R Markdown file (dryad_pathogen_study1.Rmd, dryad_pathogen_study2.Rmd).
These are the datasets and R analyses associated with the manuscript “Early-life experience and disease exposure affect pathogen avoidance behaviour in macaques” (Royal Society Open Science, MS RSOS-260011).
Contents
- data_pathogen_study1.csv Study 1 trial-level data (N = 54 macaques, consisting of the 317 successful trials)
- data_pathogen_study2.csv Study 2 trial-level data (N = 55 macaques, consisting of the 197 successful trials)
- dryad_pathogen_study1.Rmd Study 1 R Markdown file for reproducing analysis and figures
- dryad_pathogen_study2.Rmd Study 2 R Markdown file for reproducing analysis and figures
Study Summaries
Study 1 Effects of early-life experiences on pathogen avoidance:
Subjects from seven macaque species and four rearing backgrounds (sanctuary-born, zoo-reared, laboratory-reared, former pets) chose between food on a contaminated (faeces) vs. clean (wood or sponge) substrate. Outcome: whether food was taken from the contaminated or clean substrate.
Study 2 Effects of disease exposure on pathogen avoidance:
Sanctuary-born Japanese macaques from four groups (three exposed to a disease outbreak, one unexposed) were tested in a similar two-choice paradigm. However, unlike in Study 1, subjects could choose food from both substrates. Outcomes: (1) first choice, (2) whether contaminated food was eventually consumed.
Key Variables
data_pathogen_study1.csv
- Subject: Name of Subject
- Enclosure: Housing enclosure of Subject
- Species: Macaque species (bonnet, pigtail, rhesus, stumptail, longtail, japanese, hybrid)
- Background: Subject rearing background (sanctuary, pet, research, zoo). 'research' is referred to as 'laboratory' in the manuscript.
- Sex: Subject sex (male, female)
- Rank: Dominance rank (high, low)
- Randomization: Which pseudo-randomization was used to determine feces location (1-6)
- Condition: Type of uncontaminated substrate (wood, sponge)
- Trial: The trial number for each subject by substrate (1-4)
- Feces.Location: Which side the faeces were placed (left, right)
- Success: Whether the trial was successful (yes)
- Chosen.Side: The side the subject chose food from (left, right)
- Choice: Substrate chosen (feces, wood, sponge)
- Choice.bi: Binary coding of choice (1 = chose feces (contaminated), 0 = chose alternative (clean substrate))
data_pathogen_study2.csv
- Subject: Name of Subject
- Trial.subject: The trial number for the subject, cumulative across the whole study period
- Enclosure: Social group and enclosure the subject belongs to (Kyoto, Koshima, Northwest, Mirai)
- Sex: Subject sex (male, female)
- Rank: Dominance rank (high, middle, low)
- Srv.exposure: Exposure to the disease outbreak at the group level (yes, no); group-level variable (did this group experience the outbreak?)
- Date: Day, Month, and Year of the trial
- Condition: Type of uncontaminated substrate (wood, sponge)
- First.choice: Substrate chosen first (feces, wood, sponge)
- Second.choice: Substrate chosen second (feces, wood, sponge, na)
- Chose.feces: Whether contaminated food was consumed (yes, no)
- First.choice.bi: Binary coding of first choice (feces = chose contaminated, alternative = chose clean (wood or sponge))
Infection.status was assigned from the sanctuary's veterinary SRV records as follows:
- Kyoto: negative. The outbreak did not spread to this enclosure.
- Mirai: negative. This group was formed from the individuals from the Main enclosure that tested negative.
- Koshima: positive. This group was formed from the individuals from the Main enclosure that tested positive. The one exception is Reggie, a long-tailed macaque housed with the group, who is negative on both PCR and serology.
- Northwest: only part of the group was tested, so individual results are used. Animals that were never tested are coded 'unknown' rather than presumed, and are excluded from the infection analysis rather than assigned a status.
Reproducibility
To reproduce the analyses:
- Open the .Rmd files in RStudio.
- Place CSV and Rmd files in the same directory.
- Install required R packages: tidyverse, lme4, broom.mixed, toffee, scales, stringr.
- Run or knit the Rmds to regenerate models and figures.
The .Rmd files reproduce every model and figure reported in the manuscript. The Study 2 file additionally contains the comparison of group-level outbreak exposure against individual infection status that is reported in the Study 2 Results and in supplementary Table S3.
Note that the 'toffee' package's toffee_tbl() function prints p-values below .01 as "< 0.01". Exact p-values can be read off the model objects directly, for example with summary(model1).
For questions, refer to the manuscript or contact the authors.
