DOI: 10.5061/dryad.cnp5hqcfs
title: Data from: Innate visual attraction before, during and after escape from adverse substrates in carpenter ants

description: Many animals exhibit an innate attraction to dark areas or objects,
 driving orientation behaviours such as beacon aiming. In ants, some
 species do not appear to display beacon aiming. Here, we show that in one
 such species, Camponotus japonicus, the behaviour is triggered when
 crossing liquid-covered surfaces, regardless of locomotor pattern and the
 presence of water in the liquid. Once initiated, beacon aiming persisted
 even after the ants transitioned from water to dry substrates, as
 evidenced by their reorientation towards a displaced beacon. Beacon aiming
 could be observed before the ants fully transitioned from a dry substrate
 to a liquid-covered surface: when the ants were isolated on a
 water-surrounded platform, attraction to a beacon emerged while they were
 contacting the water, before finally deciding to swim towards the beacon.
 Adverse substrate conditions in general appear to be a factor triggering
 beacon aiming as we also identified one condition (so far) in which even
 liquid immersion was not required for beacon aiming, namely upside-down
 walking. These results indicate that beacon aiming in C. japonicus is
 performed before, during and after escape from adverse substrates.
 Evidence that substrate conditions can alter seemingly hardwired responses
 suggests that insects may adjust even simple behaviours in response to
 environmental conditions in a more sensitive way than commonly assumed.
description: We investigated beacon-aiming in the ant<em> Camponotus
 japonicus </em>under various substrate conditions. All experiments
 were conducted inside an opaque cylindrical arena. A vertical black
 rectangle (beacon) was placed on the inner wall of the arena. To minimise
 the potential influence of external cues, the beacon was placed in one of
 three possible positions, each separated by 120°, with trials evenly
 distributed across these positions. Each trial began with the ant placed
 at the centre of the floor. The behavioural sequence was recorded at 59.94
 fps, until the ants reached the edge of the circular area used for
 analysis, as defined for each experiment. Experiment
 (i): To investigate whether <em>C. japonicus</em> exhibits
 different orientation responses on land and water surfaces, three
 conditions were prepared: ‘Land-walking’ – walking on a dry substrate; and
 ‘Water-swimming’ – forced swimming in water; ‘Water-wading’ – walking
 (wading) in shallow water. Furthermore, the involvement of water reception
 in beacon-aiming was assessed by replacing water with two kinds of
 liquids: ‘Glycerol-swimming’ – forced swimming in a mixture of 80% (v/v)
 glycerol and 20% (v/v) 2-propanol; ‘Tylose-swimming’ – forced swimming in
 a 1.0% (w/w) tylose aqueous solution. In addition, as an adverse substrate
 condition that does not employ liquids at all, we forced ants to walk
 upside-down on sandpaper. Experiment (ii): Building on
 the results of experiment (i), we examined whether the directional
 decision persisted after a transition from water to a dry substrate. The
 experiment was conducted under three conditions: ‘Beacon Fixed’ – the
 beacon remained stationary on the arena wall; ‘Beacon Displaced’ – the
 beacon was rapidly shifted by 60° upon the transition of the ants from
 water to dry substrate; and ‘Walking-without-transition’ – ants walked on
 a dry arena without a pool to account for differences in floor height and
 texture compared to the standard arena used in experiment (i).
 Experiment (iii): The ants were provided with an island
 surrounded by water, and they were isolated on the island. We investigated
 whether the ants orient towards a beacon prior to starting to swim,
 thereby examining whether the decision-making process occurs independently
 of immersion. Analysis: Trajectories of the ants were
 obtained using DeepLabCut, except for Upside-down-walking, where
 UMATracker was instead used. Statistical analyses were conducted using
 Python and the package ‘circular’ implemented in R.
description: # Data from: Innate visual attraction before, during and after escape from
 adverse substrates in carpenter ants
 [https://doi.org/10.5061/dryad.cnp5hqcfs](https://doi.org/10.5061/dryad.cnp5hqcfs) ## Description of the data and file structure We investigated beacon-aiming in the ant *Camponotus japonicus* under various substrate conditions. This experiment allowed us to probe the decision-making dynamics in ants before, during, and after the transition between substrates. ### Files and variables #### File: dataset.zip ### Description of the data and file structure The tracking data obtained using DeepLabCut or UMATracker is stored in CSV format. The code for statistical analysis is provided in Python (.py) or R format (.R). ``` dataset.zip |- rawdata/ | |- experiment1/ # single substrate conditions | | |- land/ # ‘Land-walking’ conditions | | | |- deeplabcut/ # XY coordinate data and the likelihood for each body part (head, thorax, petiole, gaster) from DeepLabCut | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index) | | | |- r_theta/ # Normalized polar coordinates (r, theta) with the center of the beacon as radian 0 | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | |- water/ # ‘Water-swimming’ conditions | | | |- deeplabcut/ # XY coordinate data and the likelihood for each body part (head, thorax, petiole, gaster) from DeepLabCut | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index) | | | |- r_theta/ # Normalized polar coordinates (r, theta) with the center of the beacon as radian 0 | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | |- shallow_water/ # ‘Water-wading’ conditions | | | |- deeplabcut/ # XY coordinate data and the likelihood for each body part (head, thorax, petiole, gaster) from DeepLabCut | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index) | | | |- r_theta/ # Normalized polar coordinates (r, theta) with the center of the beacon as radian 0 | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | |- glycerol/ # ‘Glycerol-swimming’ conditions | | | |- deeplabcut/ # XY coordinate data and the likelihood for each body part (head, thorax, petiole, gaster) from DeepLabCut | | | | |- *.csv # each trial (species name + individual index + _ + condition index + _ + trial index) | | | |- r_theta/ # Normalized polar coordinates (r, theta) with the center of the beacon as radian 0 | | | | |- *.csv # each trial (species name + individual index + _ + trial index + _path_full) | | |- tylose/ # ‘Tylose-swimming’ conditions | | | |- deeplabcut/ # XY coordinate data and the likelihood for each body part (head, thorax, petiole, gaster) from DeepLabCut | | | | |- *.csv # each trial (species name + individual index + _ + condition index + _ + trial index) | | | |- r_theta/ # Normalized polar coordinates (r, theta) with the center of the beacon as radian 0 | | | | |- *.csv # each trial (species name + individual index + _ + trial index + _path_full) | | |- upsidedown/ # ‘Upside-down-walking’ conditions | | | |- umatracker/ # XY coordinate data from DeepLabCut | | | | |- *.csv # each trial (species name + individual index + _ + trial index) | | | |- r_theta/ # Normalized polar coordinates (r, theta) with the center of the beacon as radian 0 | | | | |- *.csv # each trial (species name + individual index + _ + trial index + _path_full) | | |- readme.txt # Correspondence between the analysis edge radius (cm) and the unit circle radius (r=1) in polar coordinates | |- experiment2/ | | |- walking_without_transition # ‘Walking-without-transition’ conditions | | | |- deeplabcut/ # XY coordinate data and the likelihood for each body part (head, thorax, petiole, gaster) from DeepLabCut | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index) | | | |- r_theta/ # Normalized polar coordinates (r, theta) with the center of the beacon as radian 0 | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | |- beacon_fixed # ‘Beacon Fixed’ conditions | | | |- deeplabcut/ # XY coordinate data and the likelihood for each body part (head, thorax, petiole, gaster) from DeepLabCut | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index) | | | |- r_theta/ # Normalized polar coordinates (r, theta) with the center of the beacon as radian 0 | | | | |- full/ # complete trajectories | | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | | | |- land/ # trajectories after reaching shore | | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | | | |- pool/ # trajectories before reaching shore | | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | |- beacon_displaced # ‘Beacon Displaced’ conditions | | | |- deeplabcut/ # XY coordinate data and the likelihood for each body part (head, thorax, petiole, gaster) from DeepLabCut | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index) | | | |- r_theta/ # Normalized polar coordinates (r, theta) with the center of the beacon as radian 0 | | | | |- full/ # complete trajectories | | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | | | |- land/ # trajectories after reaching shore | | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | | | |- pool/ # trajectories before reaching shore | | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | |- readme.txt # Correspondence between the analysis edge radius (cm) and the unit circle radius (r=1) in polar coordinates | |- experiment3/ | | |- deeplabcut/ # XY coordinate data and the likelihood for each body part (head, thorax, petiole, gaster) from DeepLabCut | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index) | | |- r_theta/ # Normalized polar coordinates (r, theta) with the center of the beacon as radian 0 | | | |- full # complete trajectories | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | | |- before_1st_contact_water # trajectories before first contacting with water | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | | |- before_1st_immersion_after_1st_contact_water # trajectories before first immersion after first contacting with water | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | | |- before_start_swim_after_1st_immersion # trajectories before starting swimming after first immersion | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | | |- after_start_swim # trajectories after starting swimming | | | | |- *.csv # each trial (species name + individual index + _ + condition index + trial index + _path_full) | | |- readme.txt # Correspondence between the analysis edge radius (cm) and the unit circle radius (r=1) in polar coordinates |- statistical_analysis/ # scripts for statistical analysis | |- calculate_straightness.py # Python code for calculation path straightness | |- circular_test.R # R code for circular tests to perform one-sample and two-sample tests | |- mann_whitney_u_test.R # R code for Mann–Whitney U test ``` #### File naming The name of each directory is set according to the experiment number and the name of the condition. First, directories are divided by experiment and experimental condition names, and then by the type of tracking data. * **"deeplabcut"**: XY coordinates and likelihood of each body part obtained using DeepLabCut. * **"umatracker"**: XY coordinates of the tracking data obtained using UMATracker. * **"r_theta"**: Polar coordinate data derived from the tracking data, where the defined edge is treated as the unit circle, and the centre of the beacon is arranged at radian = 0. The radius of the defined edge for each condition is described in the *readme.txt* file. If there are additional directories within "r_theta", the "full" directory contains all trajectory data, while the other directories contain subdivided data for each behavioural phase. ## Code/software ### Set up the Python environment To set up the Python environment, install the required libraries using `pip` or `conda`. Ensure you have Python installed (version 3.x is recommended). For example: `pip install numpy pandas` ### Set up the R environment To set up the R environment, install the required packages using the `install.packages()` function. For example: `install.packages("circular") install.packages("exactRankTests", repos="http://cran.ism.ac.jp/")` Load the libraries: `library(circular) library(exactRankTests)`