The neural basis of species-specific defensive behaviour in Peromyscus mice
Data files
Abstract
Evading imminent predator threat is critical for survival. Effective defensive strategies can vary, even between closely related species. However, the neural basis of such species-specific behaviours is still poorly understood. Here we find that two sister species of deer mice (genus Peromyscus) show different responses to the same looming stimulus: P. maniculatus, which occupies densely vegetated habitats, predominantly escapes, while the open field specialist, P. polionotus, briefly freezes. This difference arises from species-specific escape thresholds, is largely context-independent, and can be triggered by both visual and auditory threat stimuli. Using immunohistochemistry and electrophysiological recordings, we find that although visual threat activates the superior colliculus in both species, the role of the dorsal periaqueductal gray (dPAG) in driving behaviour differs. While dPAG activity scales with running speed in P. maniculatus, neural activity in the dPAG of P. polionotus correlates poorly with movement, including during visually triggered escape. Moreover, optogenetic activation of dPAG neurons elicits acceleration in P. maniculatus but not P. polionotus, while their chemogenetic inhibition during a looming stimulus delays escape onset in P. maniculatus to match that of P. polionotus. Together, we trace species-specific escape thresholds to a central circuit node, downstream of peripheral sensory neurons, localizing an ecologically relevant behavioural difference to a specific region of the mammalian brain.
Dataset DOI: 10.5061/dryad.q2bvq83xc
This repository contains the source data for the paper Baier, Reinhard et al. (2025) Nature, in which we found that two sister species of Peromyscus (deer mice) show different reactions to overhead approaching danger. We correlated these differences in behaviour with differential evolution of the dorsal periaqueductal gray (dPAG), which mediates escape in one species, but not in the other. This was confirmed with cFOS analysis, electrophysiological recordings, opto- and chemogenetic manipulations. Here we provide the data that replicates the main figure panels of the paper, specifically: (1) The speed traces to replicate the species differences of Figure 1E, (2) the speed traces to replicate the different modalities of Figure 2, (3) the mean speed and number of cells to replicate the cFos correlation with behaviour of Figure 3B, D-G and I, (4) the speed traces to replicate the single cell data, the visual and behaviour correlation, the quantification of putative escape cells and the spontaneous escape behaviour of Figure 4, (5) the speed traces to replicate the effect of optogenetic activation and chemogenetic inhibition of Figure 5.
Description of the data and file structure
The folder Data contains all data files, labelled according to the main Figure of the manuscript that is based on that dataset.
The folder Code contains the necessary Matlab, Python, Julia, or R code to load and inspect the data and to recreate key figure panels. The loaded variables are explained in the corresponding code files.
Files and variables
File: Code.zip
Description: Contains code to load data and plot the main graphs of Figures 1-5.
File: Data.zip
Description: Contains the source data for the main graphs of Figures 1-5.
File: helper.zip
Description: Contains third-party helper code files.
The code file names include the figure number to which they refer, and each code file loads all necessary data files. It should be sufficient to change the path to the downloaded data and code directories to replicate the corresponding data figures without any further manipulation or understanding of the code necessary.
The code for Figure 1-3 is provided in R (https://cran.r-project.org/bin/windows/base/), parts of Figure 4-5 are produced in Matlab (https://www.mathworks.com/help/install/ug/install-products-with-internet-connection.html), and for the GLM model of Figure 4 python code is provided (https://www.python.org/downloads/).
The data is saved as .csv files (Figure 1-3) or as .mat files (Figure 4-5). The .csv files contain headers identifying the stored data, where time is given in seconds relative to stimulus onset. Each variable in the .mat files is explained in the corresponding code that loads those variables. In general, each row corresponds to a measurement or animal, while columns are time points.
In detail, this is how the data of each file was obtained and structured:
Figure 1
All data in this folder were obtained during exposure of three species of freely moving deer mice (Peromyscus leucopus, Peromyscus maniculatus, and Peromyscus polionotus) to overhead visual stimuli as described in the manuscript (Baier, Reinhard et al. 2025) or on bioRxiv. Briefly, mice were placed into a rectangular arena (45 cm x 30 cm) with a hut in one corner, and after 10min of habituation, visual stimuli were presented on a monitor above the mice. The stimuli consisted of a small black sweeping disk (4° visual angle and moving at 10°/s) which, once it reached the center (after 4.17s), turned into a black looming disk (expansion from 4° to 40° within 1s) which remained at full size for 2s. The reactions of the mice were filmed at 30 fps from below through a red Plexiglas floor. Customized MATLAB code was used to extract the centroid coordinates of the mice throughout the experiment. Speed was calculated from the coordinates and smoothed with a mean filter of 5 frames. These speed traces for all tested animals can be found in Baier_Reinhard_Fig1E.csv. The structure of this CSV file is as follows:
- header: species, "mouse_ID", "time", "speed". The header indicates the type of variables that are saved in each subsequent row, which are: the tested species (P_leucopus, P_maniculatus, P_polionotus); the ID of the tested mouse; the time point in seconds relative to the onset of the visual stimulus; and the speed at that time point in cm/s
- all subsequent rows contain one column with the 4 types of information indicated in the header, separated by a comma.
Figure 2
All data in this folder were obtained during exposure of two species of freely moving deer mice (Peromyscus maniculatus and Peromyscus polionotus) to overhead visual stimuli as described in the manuscript (Baier, Reinhard et al. 2025) or on bioRxiv. Briefly, mice were placed into a rectangular arena (45 cm x 30 cm) with a hut in one corner, and after 10min of habituation, visual stimuli were presented on a monitor above the mice. Four different types of stimuli were presented: (a+b) Five consecutive black looming stimuli (expansion from 4° to 40° within 1s), which remained at full size for 0.5s were presented at different Weber contrasts. Each animal was tested for two different contrast level but in different sessions spaced by at least one week. (d) A single black looming disk was presented to a new cohort of animals. It stayed at full size for 2s. (e) A single black looming disk was presented, but in an arena that did not contain the hut. It stayed at full size for 2s. (f) An auditory loom (upsweep from 17-20 kHZ over 1.3 s, repeated five times; 80 dB at arena floor) instead of a visual loom was presented. The reactions of the mice were filmed at 30 fps from below through a red Plexiglas floor. Customized MATLAB code was used to extract the centroid coordinates of the mice throughout the experiment. Speed was calculated from the coordinates and smoothed with a mean filter of 5 frames. Behavior was then classified as follows: “escape” events were defined as a speed ≥ 55.74 cm/s, and “freezing” events as a continuous period of ≤ 3.28 cm/s for at least 0.4 s while the animal was outside the hut. The resulting data is saved in the following CSV tables:
Baier_Reinhard_Fig2A.csv: contrast looming data.
- header: species, "contrast_level", "cumulative_escapes", "cumulative_freezes", "sample_size", "freeze_proportion", "escape_proportion". The header indicates the type of variables that are saved in each subsequent row which is: the tested species (P_maniculatus, P_polionotus); the contrast level tested in % Weber contrast; the number of animals that escaped at this contrast level; the number of animals that froze at this contrast level; the total number of animals tested for this contrast level; the proportion of tested animals that showed freezing at this contrast level; the proportion of tested animals that showed escape at this contrast level.
- all subsequent rows contain one column with the 6 types of information indicated in the header, separated by a comma.
Baier_Reinhard_Fig2B.csv: cumulative escape probability across the 5 repetitions of the full contrast (100%) looming stimulus.
- header: species, "time", "sample_size", "cumulative_escape_count", "cumulative_escape_proportion". The header indicates the type of variables that are saved in each subsequent row which is: the tested species (P_maniculatus, P_polionotus); time in seconds from onset of the first loom; the total number of animals tested for this contrast level; the number of animals that escaped up to this time point; the proportion of animals that escaped up to this time point.
- all subsequent rows contain one column with the 5 types of information indicated in the header, separated by a comma.
Baier_Reinhard_Fig2C.csv: cumulative escape probability across the 5 repetitions of the full contrast (100%) looming stimulus, separating trials where animals escaped directly vs trials where they paused before escaping.
- header: species, "time", "nr_escaping_ind", "cumul_init_escape_count", "cumul_init_escape_prop", "cumul_transit_escape_count", "cumul_transit_escape_prop". The header indicates the type of variables that are saved in each subsequent row which is: the tested species (P_maniculatus, P_polionotus); time in seconds from onset of the first loom; number of animals tested; the number of animals that escaped without pausing up to this time point; the proportion of animals that escaped without pausing up to this time point; the number of animals that first paused and then escaped up to this time point; the proportion of animals that first paused and then escaped up to this time point.
- all subsequent rows contain one column with the 7 types of information indicated in the header, separated by a comma.
Baier_Reinhard_Fig2D.csv: cumulative escape probability in response to a single looming stimulus.
- header: species, "time", "sample_size", "cumulative_escape_count", "cumulative_escape_proportion", "cumulative_freeze_count", "cumulative_freeze_proportion". The header indicates the type of variables that are saved in each subsequent row which is: the tested species (P_maniculatus, P_polionotus); time in seconds from onset of the first loom; the total number of animals tested for this contrast level; the number of animals that escaped up to this time point; the proportion of animals that escaped up to this time point; the number of animals that froze up to this time point; the proportion of animals that froze up to this time point.
- all subsequent rows contain one column with the 7 types of information indicated in the header, separated by a comma.
Baier_Reinhard_Fig2E.csv: cumulative escape probability in response to a single looming stimulus without a hut present.
- header: species, "time", "sample_size", "cumulative_escape_count", "cumulative_escape_proportion", "cumulative_freeze_count", "cumulative_freeze_proportion". The header indicates the type of variables that are saved in each subsequent row which is: the tested species (P_maniculatus, P_polionotus); time in seconds from onset of the first loom; the total number of animals tested for this contrast level; the number of animals that escaped up to this time point; the proportion of animals that escaped up to this time point; the number of animals that froze up to this time point; the proportion of animals that froze up to this time point.
- all subsequent rows contain one column with the 7 types of information indicated in the header, separated by a comma.
Baier_Reinhard_Fig2F.csv: cumulative escape probability in response to five auditory sweeps.
- header: species, "time", "sample_size", "cumulative_escape_count", "cumulative_escape_proportion", "cumulative_freeze_count", "cumulative_freeze_proportion". The header indicates the type of variables that are saved in each subsequent row which is: the tested species (P_maniculatus, P_polionotus); time in seconds from onset of the first loom; the total number of animals tested for this contrast level; the number of animals that escaped up to this time point; the proportion of animals that escaped up to this time point; the number of animals that froze up to this time point; the proportion of animals that froze up to this time point.
- all subsequent rows contain one column with the 7 types of information indicated in the header, separated by a comma.
Figure 3
All data in this folder were obtained during exposure of two species of freely moving deer mice (Peromyscus maniculatus and Peromyscus polionotus) to many repetitions of an overhead looming stimulus, followed by analysis of cfos expression as described in the manuscript (Baier, Reinhard et al. 2025) or on bioRxiv. Briefly, after 4h of dark adaptation, mice were placed into a rectangular arena (45 cm x 30 cm) and 125 repetitions of the black looming stimulus (expansion from 4° to 40° within 1s) were presented to the mouse (15min in total). Control animals were kept in the equally lit arena for 15min without any stimulation. The reactions of the mice were filmed at 30 fps from below through a red Plexiglas floor. Customized MATLAB code was used to extract the centroid coordinates of the mice throughout the experiment. Speed was calculated from the coordinates and smoothed with a mean filter of 5 frames. Behavior was then classified as follows: “escape” events were defined as a speed ≥ 55.74 cm/s, and “freezing” events as a continuous period of ≤ 3.28 cm/s for at least 0.4 s. After the exposure to the visual looming stimulus, mice were kept for 1.5h in their dark homecage and were subsequently transcardially perfused with ice-cold 1x phosphate-buffered saline and then with 4% paraformaldehyde. Brains were dissected out, postfixed for 24 hrs at 4°C, cryopreserved in 30% sucrose, and stored at -70°C until subsequent use. To stain for c-Fos protein, we sectioned brains at 40 μm, blocked tissue for 1 hr, and incubated sections for 2 days with rabbit anti-c-Fos antibody (1:4000, Synaptic Systems, 226003). We used donkey anti-rabbit Alexa 647 antibody (1:1000, Invitrogen, A31573) for secondary detection and mounted tissues with DAPI Fluoromount-G (SouthernBiotech, 0100-20). Slides were imaged on an AxioScan.Z1 slide scanner (Zeiss). The number of cFos positive cells was counted in the deep medial superior colliculus (dmSC) and the dorsal periaqueductal gray (dPAG) and correlated with the escape behavior of the animals. A subset of brain slices was instead used for smFISH immunohistochemistry to detect NeuN, cFos, and Gad1 (inhibitory neurons) or VGlut2 (excitatory neurons). We used the RNAscope Multiplex Fluorescent Reagent Kit v2 with the RNA-Protein Co-Detection Ancillary Kit for co-detection of mRNA and protein. For smFISH, we used custom-made RNAscope probes for Gad1, VGluT2 (Slc17a6), and NeuN (Rbfox3). For staining of cFos, we used the rabbit anti-c-Fos (1:100, Synaptic Systems, 226003) antibodies and HRP-labeled goat anti-rabbit antibody (1:500, PerkinElmer, NEF812001EA) for secondary detection. We visualized RNA probes and antibodies with Opal 520, Opal 570, and Opal 690 dyes (1:1000, Akoya Biosciences, FP1487001KT, FP1488001KT, FP1497001KT) and counterstained with DAPI. Regions of interest (mSC, dPAG) were imaged on a LSM 700 laser scanning confocal microscope with Z-stacks of 21 slices spaced at 0.99 μm. We then used QuPath v0.2.3 to quantify the overlap of FISH and IHC signals in the maximum projection images. The resulting data is available in the following CSV tables:
Baier_Reinhard_Fig3B.csv: mean speed recorded throughout the 125 looms.
- header: species, "condition", "specimen_ID", "fos_experiment", "speed". The header indicates the type of variables that are saved in each subsequent row which is: the tested species (P_maniculatus, P_polionotus); the experiment condition (looming or control); the animal ID; whether the brain of this animal was used for cFos analysis; the mean speed recorded during the 15min in the arena.
- all subsequent rows contain one column with the 5 types of information indicated in the header, separated by a comma
Baier_Reinhard_Fig3D-F.csv: number of cFos positive cells in different brain areas.
- header: species, "condition", "specimen_ID", "counts_dmSC", "counts_dPAG". The header indicates the type of variables that are saved in each subsequent row which is: the tested species (P_maniculatus, P_polionotus); the experiment condition (looming or control); the brain slice ID; the number of cfos positive cells per μm2 of dmSC; the number of cfos positive cells per μm2 of dPAG.
- all subsequent rows contain one column with the 5 types of information indicated in the header, separated by a comma
Baier_Reinhard_Fig3G.csv: correlating the number of cFos positive cells in the dPAG with running speed.
-
header: species, "condition", "specimen_ID", "counts_dPAG", "speed". The header indicates the type of variables that are saved in each subsequent row which is: the tested species (P_maniculatus, P_polionotus); the experiment condition (looming or control); the brain slice ID; the number of cfos positive cells per m2 of dPAG; the mean running speed of the animal during the 125 looms or control time.
NA values indicate that the animal did not escape a single time during the experiment, and hence, no mean darting speed could be calculated.
-
all subsequent rows contain one column with the 5 types of information indicated in the header, separated by a comma
Baier_Reinhard_Fig3I.csv: correlating cFos positive cells with markers for excitatory and inhibitory neruons.
- header: species, "condition", "specimen_ID", "transmitter", "brain_region", "section_ID", "response_type", "response". The header indicates the type of variables that are saved in each subsequent row which is: the tested species (P_maniculatus, P_polionotus); the experiment condition (looming or control); the brain slice ID; the detected neurotransmitter (Gad1 or VGlut2), the analysed brain area (dmSC or dPAG); section ID for each brain slice; whether the number of Gad1 or VGlu2 neurons relative to the total number of NeuN neurons is reported (perc_transmitter_neuron), relative to the number of cFos positive neurons (perc_act_transmitter_neuron) or percent of transmitter-positive neurons that co-express c-Fos, divided by percent of neurons that co-express c-Fos (enrichment_ratio); proportion of positive neurons.
- all subsequent rows contain one column with the 8 types of information indicated in the header, separated by a comma
Figure 4
All data in this folder were obtained during in-vivo Neuropixels recordings of head-fixed mice as described in the manuscript (Baier, Reinhard et al. 2025) or on bioRxiv. Briefly, a head post was surgically fixed on the Peromyscus’ skull, which allowed fixing it on a floating ball (n=6 Peromyscus maniculatus, n=4 Peromyscus polionotus). After recovery, a small craniotomy was created, the animal was fixed on the ball, and a Neuropixels probe 1.0 was inserted slowly into the brain to span the superior colliculus and the dorsal periaqueductal gray. Then, triples of quickly expanding black visual looming stimuli (expanding from 4˚ to 40˚ visual angle in 1 s, the black disk remaining at full size for 0.5 s, followed by 0.5 s background) were shown either on a computer monitor or a “dome” on which a projector projected the stimulus in front of the animal. Neural activity as well as mouse movement were recorded simultaneously. After spike sorting, the activity of individual neurons was saved as a firing rate in 100ms bins. Similarly, the running speed of the mice was calculated from the ball movement and saved with the same temporal resolution. Escape behaviour was identified in the speed traces based on the following definition: we binned the measured running speed in 100ms bins and normalized it such that “no movement” is set to 0 and maximum acceleration speed is set to 1. Then, we identified time points of onset of escape as an acceleration of >0.2 a.u. within 200 ms after a speed of <0.05 a.u. Some triple loom trials induced escape, others did not. All information (single cell activity, speed, and escape onsets) was saved separately for the three brain regions of interest: superficial superior colliculus (sSC), deep superior colliculus (dSC), and dorsal periaqueductal gray (dPAG) in the files Figure4_dPAG.mat, Figure4_dSC.mat, Figure4_sSC.mat. Specifically, each of these files contains the following variables:
- ACTIVITY_LOOMDARTall: firing rate (100ms bins) of all recorded trials (cells x triple loom repetitions); each row is one trial, columns are time bins; the three looms start at bin 25, 45, and 65
- ACTIVITY_LOOMDARTall_Z: z-scored firing rate of all recorded cells (rows)
- ANIMAL: animal ID for every row in ACTIVITY_LOOMDARTall
- CELLID: cell ID for every row in ACTIVITY_LOOMDARTall
- loomdarts: binary vector if an evoked escape during the triple loom is present for each trial (1=yes)
- loomdart_time: onset bin of evoked escapes
- RESID: residual activity for every trial of ACTIVITY_LOOMDARTall. Residual activity was calculated by averaging the three strongest responses of each neuron to the looming stimulus during trials without escape behaviour. This average, purely visual response was then subtracted from each triple loom trial of that neuron to calculate a residual activity likely correlated to locomotion instead of the visual stimulus.
- resp_strength: visual response strength (correlation with stimulus) for every trial of ACTIVITY_LOOMDARTall
- SPECIES: species ID for every row in ACTIVITY_LOOMDARTall; 1 = P. maniculatus, 2 = P. polionotus
- SPEED_LOOMDARTall: running speed for every row in ACTIVITY_LOOMDARTall
In a second set of experiments, we extracted spontaneous escape behaviour, i.e., moments in time that fulfilled the above definition of escape but that were not preceded by a visual or other stimulus. We extracted the neural activity of dPAG neurons and the running speed as described above during 2s before and after escape onset (total of 4s). This data is saved in the file Figure4_spontEscape.mat. This file contains:
- spontescapeSPEED: speed traces 2s before to 2s after spontaneous escape onset in 100ms bins.
- spontescapeNEURALACTIVITY: corresponding firing rates of dPAG neurons in the same 4s time interval
- spontescapeSPECIES: species ID for every row, 1 = P. maniculatus, 2 = P. polionotus
Figure 5
All data in this folder were obtained during optogenetic activation or chemogenetic inhibition of neurons in the dorsal periaqueductal gray (dPAG) as described in the manuscript (Baier, Reinhard et al. 2025) or on bioRxiv. Briefly, an AAV virus coding for ChR-YFP or YFP alone or hM4Di-mCherry or mCherry alone (each under the control of the CamKII promoter) was injected into the dPAG of P. maniculatus and P. polionotus. In the case of optogenetics experiments, an optic fiber was implanted above the dPAG of ChR-YFP or YFP injected animals, and they were placed into a circular arena. A laser was then used to activate ChR with increasing power between 0 and 25 mW for 1s each. While stimulating the dPAG, the animals were filmed and their reaction to the stimulation was assessed semi-manually and categorized into “acceleration” (including acceleration after a brief hesitation), “deceleration” and “other”. In total, for P. maniculatus, n=7 ChR and n=6 sham (YFP only) were tested; for P. polionotus, n=8 ChR and n=5 sham were tested. The obtained videos during the stimulation were further processed in DeepLabCut to extract the animal’s position during 1s before and 1s during the laser stimulation. The speed of the animals was calculated from these position coordinates and saved in the file Figure5_optogenetics.mat together with information about the animals and the laser stimulation. Specifically, this file contains:
- BEHAVIOR: type of behavior as semi-manually annotated; 1 = immediate acceleration, -1 = deceleration, 0.5 = acceleration with preceded by a brief stopping. Each row is one trial from one animal at one laser power.
- ANIMALS: animal ID for every row in BEHAVIOR
- GROUP: group ID for every row in BEHAVIOR; 1 = P. maniculatus ChR, 2 = P. polionotus ChR, 3 = P. maniculatus sham, 4 = P. polionotus sham
- SPEED: running speed in cm/s 1s before and 1s during the laser pulse saved at 30 Hz
- SPEEDnorm: running speed normalized to the speed before laser onset
- LASERPOWER: laser power in mW for each row in BEHAVIOR
Similarly, for the chemogenetics experiments, after expression of hM4D(Gi) -mCherry or mCherry alone, animals were injected i.p. with CNO - the ligand of this inhibitory designer receptor (DREADDs) and then placed into an open arena with a shelter. After a habituation phase, black looming stimuli (as described for Figure 4 above) were shown to the freely moving mice, and their behaviour was recorded with a camera. Chemogenetic inhibition using hM4D(Gi) and CNO was tested in 13 animals per species. As a control, n=9 animals were species were injected with saline instead of CNO in a first session, and with CNO in a second session. A second control group consisted of the animals injected only with mCherry and then CNO (n = 5) per species. Again, DeepLabCut was used to extract position information and to calculate running speed. Subsequently, escape and freezing were extracted in the same way as for the other freely moving experiments (Figure 1-2): escape was defined as a speed ≥ 55.74 cm/s, and freezing as a continuous speed of ≤ 3.28 cm/s for at least 0.4 s while the animal was outside the shelter. The speed traces and information about each trial are saved in the file Figure5_chemogenetics.mat. Specifically, it contains:
- condition_firstsession: saline (0) or CNO (1) during first session per animal
- condition_firstsession: saline (0) or CNO (1) during second session per animal
- species_firstsession: P. maniculatus (1) or P. polinotus (2) during first session per animal
- species_firstsession: P. maniculatus (1) or P. polinotus (2) during second session per animal
- velocity_firstsession: running speed in cm/s during first session per animal (recorded at 60 Hz)
- velocity_secondsession: running speed during second session per animal (recorded at 60 Hz)
- CNOcontrol: 1 if DREADDs + CNO, 0 if empty vector (mCherry only) + CNO
Code/software
Some of the code requires scripts/packages written by others. They are either loaded in the script itself (Python, R) or provided in the folder helper (MATLAB). Specifically, the following freely available scripts were used:
- othercolor.m - Joshua Atkins https://www.mathworks.com/matlabcentral/fileexchange/30564-othercolor MATLAB Central File Exchange.
- violin.m - Holger Hoffmann https://www.mathworks.com/matlabcentral/fileexchange/45134-violin-plot, MATLAB Central File Exchange. Simple violin plot using MATLAB. INRES (University of Bonn), Katzenburgweg 5, 53115 Germany. hhoffmann@uni-bonn.de
- cmocean.m - Kristen Thyng Kristen, et al. https://www.mathworks.com/matlabcentral/fileexchange/57773-cmocean-perceptually-uniform-colormaps “True Colors of Oceanography: Guidelines for Effective and Accurate Colormap Selection.” Oceanography, vol. 29, no. 3, The Oceanography Society, Sept. 2016, pp. 9–13, doi:10.5670/oceanog.2016.66.
- FscatJit2_KR.m (and helper: scatJit_KR.m, bootmoes.m) - Tayfun Tumkaya. Modified version of FscatJit2 from the DABEST for Matlab package DABEST-Matlab (https://github.com/ACCLAB/DABEST-Matlab), GitHub. https://www.mathworks.com/matlabcentral/fileexchange/65260-dabest-matlab
A copy of these code files, together with their license files (where necessary), is provided in the folder "helper".
