DOI: 10.5061/dryad.7wm37pw2w
title: Data for: Coordination and persistence of aggressive visual communication in Siamese fighting fish

description: Animals coordinate their behavior with each other during both cooperative
 and agonistic social interactions. Such coordination often adopts the form
 of “turn-taking”, in which the interactive partners alternate the
 performance of a behavior. Apart from acoustic communication, how
 turn-taking between animals is coordinated is not well understood.
 Furthermore, the neural substrates that regulate persistence in engaging
 in social interactions are poorly studied. Here, we use Siamese fighting
 fish (Betta splendens) to study visually driven turn-taking aggressive
 behavior. Using encounters with conspecifics and with animations, we
 characterize the dynamic visual features of an opponent and the behavioral
 sequences that drive turn-taking. Through a brain-wide screen of neuronal
 activity during coordinated and persistent aggressive behavior, followed
 by targeted brain lesions, we find that the caudal portion of the
 dorsomedial telencephalon, an amygdala-like region, promotes persistent
 participation in aggressive interactions, yet is not necessary for
 coordination. Our work highlights how dynamic visual cues shape the rhythm
 of social interactions at multiple timescales, and points to the pallial
 amygdala as a region controlling engagement in such interactions. These
 results suggest an evolutionarily conserved role of the vertebrate pallial
 amygdala in regulating the persistence of emotional states.
description: Videos were taken at 2 angles (top, side) with Raspberry Pi
 cameras in .h264 format at 40 fps and converted to .mp4 and cropped to 500
 x 500 pixel dimensions. Videos were then fed either into an automated
 scoring pipeline (DeepLabCut/OpenCV/feature extraction/tcn) or manually
 scored. Keypoints or binary arrays (1=flare, 0 = noflare) were then used
 to extract features of shape and motion and to measure flaring synchrony
 or overall proportion of time flaring. Data and scripts for analysis and
 visualization are categorized by their corresponding figure(s) in Everett
 et al.
description: # Data for: Coordination and persistence of aggressive visual
 communication in Siamese fighting fish Dryad dataset DOI:
 https://doi.org/10.5061/dryad.7wm37pw2w Primary article DOI:
 10.1016/j.celrep.2024.115208 ## Description of the data and file structure
 The data and code used to generate the main Figures 1-6 of the Everett et
 al. are included in the Dryad repository. Behavioral data (Figures 1-6)
 were collected using Raspberry Pi cameras, and both manual scoring and
 semi-supervised behavior segmentation were employed to quantify aggression
 and identify the visual cues driving aggressive behavior. pS6 experiments
 were conducted to identify areas of differential neural activity following
 aggressive encounters, with the results presented in Figure 6. ## File
 types and how to open (Usage Notes): *TIP: all .h5, .npy, and .csv files
 can be viewed and variables summarized by dragging the file into ChatGPT
 ([https://chatgpt.com/](https://chatgpt.com/)) prompt Zip files:
 compressed directories that contain the following can be opened by double
 clicking or right click&gt;expand Behavior videos (mp4): mp4 videos taken
 at 40 fps. Can be opened using QuickTime player. Base feature files:
 DeepLabCut keypoints and contour-derived features, .h5 files generated
 using the method described here:
 [https://www.nature.com/articles/s41593-018-0209-y](https://www.nature.com/articles/s41593-018-0209-y) where each column corresponds to a different keypoint and each row is a timepoint h5 files can be opened using the h5py package in Python scripts. Sample code for opening each h5 file with Python in a directory of h5 files: ``` import numpy as np import pandas as pd for i in np.arange(len('copy and paste the data directory path')): file_handle_auto = h5_files[i] with pd.HDFStore(file_handle_auto,'r') as file: data_auto = file.get('df_with_missing') data_auto.columns= data_auto.columns.droplevel() ``` Contour-derived feature files: Excel/csv files generated using custom code included here: [https://github.com/claire-everett/Preprocess_input_daart.git](https://github.com/claire-everett/Preprocess_input_daart.git). Rows are timepoints. Daart files: daart files are .npy files(standard binary file format that can be opened using the numpy package in Python script) with columns corresponding to the probability of an animal being in that state. Files are generated using methods described in: [https://github.com/themattinthehatt/daart](https://github.com/themattinthehatt/daart). Npy files can be opened using the numpy package in a Python script. ``` import numpy as np data = np.load ('copy and paste the data file path', allow_pickle=True) print (data) ``` Manual scoring: All manual scoring is in csv or Excel file in a binary array (1 = event) format with a frame number index associated with a 40 fps video (24000 frames = 10 minutes). The behaviors of flaring, tailbeating, and biting were scored. Excel or csv files can be opened using Microsoft Excel. #### Top Variables: flaring- gills flare Full (full operculum flare) Half ( half operculum flare where operculum is extended away from the body but not fully extended to a 90-degree angle) Combined (either full or half flaring) Background (neither full nor half flaring operculum) tailbeating- turn perpendicular to opponent and shake tail biting - biting with the mouth any part of the opponent pS6 files: cell counts of pS6+ cells saved in excel format. Cells were counted, and areas of regions were taken using Fiji These file and behavior descriptions will remain consistent for all following zip files. ### Files and variables #### File: Figure\_1\_dryad.zip **Description:** First, we wanted to observe how betta fish fight when in the same tank. We measured flaring, tail beating, and biting patterns in one dyad in the same tank and summarized aggression patterns across multiple dyads in a Thai fish fighting arena. Manual scoring of encounters performed in the same tank was completed. Additionally, we calculated flare rate and opponent size for multiple dyads in separate tanks to determine if flare rate or opponent size is a greater predictor of opponent aggression. See description of file types below. Files below pair with script file: Figure_1_script_dryad.py Zip contains Files: **File names inside of folders basefeatures, daart, and mp4 indicate the trial ID, with labels like 'iso' or 'SEA...' referring to the original experiment in which naive fish were included. Since all fish were exposed to the same stimulus across experiments, these labels do not signify experimental conditions but rather serve to solely distinguish between different trials.** basefeatures &gt; .csv files contain variables: operculum (degrees of gill being flared), orientation (body orientation (degrees)), movement_speed (speed (pixel/second)), turning angle(degrees), head (x, y) position (pixel), centroid (x,y) position (pixel), tail (x,y) position (pixel), tail angle (degrees), tail_dev (deviation from tail from body midline, pixels), operculum angle on the left/right(degrees), operculum distance from body on left/right(pixels), average left/right operculum angle (degrees), average left/right operculum distance (pixels). If using Python to open can use the following code: ``` import pandas as pd data = pd.read_csv('path_to_file') ``` daart &gt; .npy files with variables: likelihood (0-1) of being in state Full (full operculum flare), Half ( half operculum flare where operculum is extended away from body but not fully extended to a 90 degree angle), Background (neither full nor half flaring operculum). The closer the number is to 1, the more likely the fish is in that state. Can be opened using the numpy package in Python. See instructions for opening in Python in Usage notes. field_observations &gt; .xlsx files with variables: latency to flare and bite. Units found in data. flare_size_director.xlsx files with variables: body size (pixels), flaring rate (duration time spent flaring/experimental period) on sheet 1, and Relative size (opponent relative size, pixel) and flaring rate. mp4&gt; .mp4 files: top footage of fish performing aggressive display towards opponent. Can be opened using QuickTime Player. same_tank directory- analysis of two fish in the same tank (big fish and small fish) contains the following: same_tank&gt;bite&gt;.tsv files with variables Observation id, Observation date, Description, Media file, Total length, FPS, Subject Behavior, Behavioral category, Modifiers, Behavior type, Start (s), Stop (s), Duration (s). same_tank&gt;full&gt;.tsv files of full flaring events with variables Observation id, Observation date, Description, Media file, Total length, FPS, Subject Behavior, Behavioral category, Modifiers, Behavior type, Start (s), Stop (s), Duration (s).  same_tank&gt;half&gt;.tsv files of half flaring events with variables Observation id, Observation date, Description, Media file, Total length, FPS, Subject Behavior, Behavioral category, Modifiers, Behavior type, Start (s), Stop (s), Duration (s). same_tank&gt;lateral(tailbeat)&gt;.tsv files of tailbeating events with variables Observation id, Observation date, Description, Media file, Total length, FPS, Subject Behavior, Behavioral category, Modifiers, Behavior type, Start (s), Stop (s), Duration (s). same_tank&gt;bite&gt;.tsv files of biting events with variables Observation id, Observation date, Description, Media file, Total length, FPS, Subject Behavior, Behavioral category, Modifiers, Behavior type, Start (s), Stop (s), Duration (s). same_tank&gt;same_tank_dimensions.xlsx with variables time of first flare and first tailbeating for Fish 1 (big fish) and Fish 2 (small fish). Unit in data. same_tank&gt;sametank_bigfish_full.xlsx with binary arrays demarcating when the "big fish" (Fish_1) is half flaring, full flaring, half or full flaring, biting, or laterally displaying. 0 = event not happening, 1 = event happening same_tank&gt;sametank_smallfish_full.xlsx with binary arrays demarcating when the "small fish" (Fish_2) is half flaring, full flaring, half or full flaring, biting, or laterally displaying. 0 = event not happening, 1 = event happening #### File: Figure\_2\_dryad.zip **Description:** Comparison of aggression metrics between animation and conspecific (rf- real fish) encounters. Aggression metrics include flaring and different variables of shape and motion, for instance, orientation or speed. See description of file types below. Files below pair with script file: Figure_2_script_dryad.py Contains files:  anim_basefeatures&gt; .csv files with variables: operculum (degrees of gill being flared), orientation (body orientation (degrees)), movement_speed (speed (pixel/second)), turning angle(degrees), head (x, y) position (pixel), centroid (x,y) position (pixel), tail (x,y) position (pixel), tail angle (degrees), tail_dev (deviation from tail from body midline, pixels), operculum angle on the left/right(degrees), operculum distance from body on left/right(pixels), average left/right operculum angle (degrees), average left/right operculum distance (pixels). If using Python, you can use the following code: ``` import pandas as pd data = pd.read_csv('path_to_file') ``` anim_daart&gt; .npy files with variables: likelihood (0-1) of being in state Full (full operculum flare), Half ( half operculum flare where operculum is extended away from body but not fully extended to a 90 degree angle), Background (neither full nor half flaring operculum). The closer the number is to 1, the more likely the fish is in that state. Can be opened using the numpy package in Python. See instructions for opening in Python in Usage notes. anim_mp4&gt; .mp4 files with variables: Footage of fish performing aggressive display towards animation. Can be opened using QuickTime Player. rf_basefeatures&gt; .csv files with variables: operculum (degrees of gill being flared), orientation (body orientation (degrees)), movement_speed (speed (pixel/second)), turning angle(degrees), head (x, y) position (pixel), centroid (x,y) position (pixel), tail (x,y) position (pixel), tail angle (degrees), tail_dev (deviation from tail from body midline, pixels), operculum angle on the left/right(degrees), operculum distance from body on left/right(pixels), average left/right operculum angle (degrees), average left/right operculum distance (pixels). rf_daart.npy files with variables: likelihood (0-1) of being in state Full (full operculum flare), Half ( half operculum flare where operculum is extended away from body but not fully extended to a 90 degree angle), Background (neither full nor half flaring operculum). The closer the number is to 1, the more likely the fish is in that state. Can be opened using the numpy package in Python. See instructions for opening in Python in Usage notes. rf_mp4&gt; .mp4 files with variables: Footage of fish performing aggressive displays towards opponents. Can be opened using QuickTime Player. Animations&gt; aggro_new_white.mp4 of naturalistic animation used to stimulate aggression pers_full.xlsx - file that summarizes the flaring behavior against each loop of the animation across multiple subjects. The data contains variables flare rate per loop (duration flaring/loop length), timepoint (loop of animation), condition (what fish is seeing), and subject (ID of the fish). #### File: Figure\_3\_dryad.zip **Description:** Betta coordinates their flare response with dynamic visual cues. Investigation correlates the flaring of real fish with either an opponent or the animation's features of shape or motion. See description of file types below. Files below pair with script file: Figure_3_script_dryad.py both_1&gt; .csv files with variables from fish from the left/right tank of two tanks facing each other: * operculum (degrees), orientation(degrees), movement_speed (pixel/second), turning_angle(degrees) (motion-related metrics) * head_x, head_y, centroid_x, centroid_y, tail_x, tail_y (positional tracking, pixels) * oper_angle_R, oper_angle_L, oper_dist_R, oper_dist_L (operculum angles (degrees) and distances (pixels)) * Half, Full, Combined (flaring state, 1 = event happening) both_2&gt; .csv files with variables from fish from the right/left tank of two tanks facing each other: * operculum (degrees), orientation(degrees), movement_speed (pixel/second), turning_angle(degrees) (motion-related metrics) * head_x, head_y, centroid_x, centroid_y, tail_x, tail_y (positional tracking, pixels) * oper_angle_R, oper_angle_L, oper_dist_R, oper_dist_L (operculum angles (degrees) and distances (pixels)) * Half, Full, Combined (flaring state, 1 = event happening) left_anim&gt; .xlsx files capturing behavior of fish facing the animation with variables: Half, Full, Combined (flaring state, 1= event happening, 0 = event not happening) mp4_left_anim&gt; .mp4 files of video footage of fish as they face the animation. Can be opened using QuickTime Player. mp4_rf&gt; .mp4 files of video footage of fish as they face the real fish. Can be opened using QuickTime Player. combined_head_cent_final.xlsx contains information of the animation at each time point (frame of animation). Contains variables: flaring, flare + face (animation flaring and facing orientation), lateral (animatin lateral orienation (perpendicular to opponent)), statmov (whether the animation is moving or stationary), facing (facing orientation), turning (whether the animation is mid turn), turned_away (whether the animation is facing away from opponent) order_71.xlsx with variables: Animal ID (animal ID in the experiment), chamber (behavior chamber of test), Condition 1 (animation seen by animal) #### File: Figure\_4\_dryad.zip **Description:** Comparison of how fish flare against an animation that contains an animation that flares versus an animation that doesn't flare. Looking at the timing of the onset of real fish flaring against each animation, as well as the persistence of the flaring (rate of flaring over time). See description of file types below. Files below pair with script file: Figure_4_script_dryad.py Animations&gt; .mp4 files of animations shown to fish. keypoints&gt; .h5 files containing the tracked body parts of a fish in a deeplabcut tracking analysis. Each body part has three associated sub-fields: x, y, and likelihood. Body parts: * A_head (x, y (pixel), likelihood (0-1)) * B_rightoperculum (x, y (pixel), likelihood (0-1)) * C_tailbase (x, y (pixel), likelihood (0-1)) * D_tailtip (x, y (pixel), likelihood (0-1)) * E_leftoperculum (x, y (pixel), likelihood (0-1)) * F_spine1 to L_spine7 (x, y (pixel), likelihood (0-1)) * M_lefteye and N_righteye (x, y (pixel), likelihood (0-1)) * O_dorsaltip (x, y (pixel), likelihood (0-1)) * P_analtipfront and Q_analtipback (x, y (pixel), likelihood (0-1)) See usage notes to open .h5 files. Can use the associated script in this Dryad dataset: Figure_4_script_dryad.py. Manual_scoring&gt; .xlsx files containing variables Half, Full, Combined (flaring state) mp4&gt; .mp4 files as they face different animations. A set of animations can be seen in this zip file's 'Animations' folder operculum_size_calc&gt;head_to_operculum_ratio.xlsx demonstrating that the head to operculum ratio is similar between real fish and animation, making the flaring of the animation as realistic as possible. Files contain variables head_width, operculum width to calculate the ratio of head and operculum. Also includes Animation head width (pixels), Animation operculum width (pixels), and ratio of animation head to operculum width. operculum_size_calc&gt;source_photos: series of photos (.png) of aerial view of fish as it either flares or does not flare. order_figure_4.xlsx files of the order of the animations that each fish faced. The variables include the Fish ID, the Trial ID, and Condition 1, Condition 2, and Condition 3. There is one animation not included in the analysis (noflare_noturn); the other two animations (flare_turn and noflare_turn) are viewable in the Animations folder in this zip file. frame_start.xlsx files correspond with the order_figure_4.xlsx and lists for each trial ID and condition, the exact frame the animation started. The variables are Trial ID, condition 1, condition 2, and condition 3. pers_for_andres.py Python script demonstrating methodology for calculating the persistence of flaring. #### File: Figure\_5\_dryad.zip **Description:** Investigation into how flare rate changes as fish face animations at different elevations. Fish viewed animations at different heights in the water column. Animation was either a fish swimming back and forth on the screen, or going through a full naturalistic display. The flaring rate as well as the elevation of the real fish were recorded. See description of file types below. Files below pair with script file: Figure_5_script_dryad.py Animations&gt; .mp4 files of animations shown to fish. elev_order.xlsx file of the order of the animations that each fish faced. The variables include the Fish ID, the Trial ID, and Condition 1, Condition 2, and Condition 3. Condition names are a combination of the height of the water column (volume of water) and the height of the animation on the screen. Example: Low_Low = low water column height and low location of the animation on the screen. The low versus high location of the animation on the screen can be seen in the Animations folder in this zip file. elevation_for_heatmap&gt; heatmap_key.xlsx file with a subsample of trials showing trials and their start times, as well as how far the animation was from the surface of the water versus the floor of the tank. These trials were used to observe heatmaps of the elevation of the fish as they faced animations at different elevations. elevation_for_heatmap&gt; HH/HL/LL folders containing .mp4 file of the fish video'd from the side and corresponding .h5 file showing the location of the fish body parts from the side at each time point. Each body part has three associated sub-fields: x, y, and likelihood. Body parts, positions (x, y, pixels: * A_head(x, y (pixel), likelihood (0-1)) * B_dorsalbasefront(x, y (pixel), likelihood (0-1)) * C_dorsaltip(x, y (pixel), likelihood (0-1)) * D_dorsalbaseback(x, y (pixel), likelihood (0-1)) * E_caudalbasetop(x, y (pixel), likelihood (0-1)) * F_caudaltiptop(x, y (pixel), likelihood (0-1)) * G_caudalmid(x, y (pixel), likelihood (0-1)) * H_caudaltipbottom(x, y (pixel), likelihood (0-1)) * I_caudalbasebottom(x, y (pixel), likelihood (0-1)) * J_analtipback(x, y (pixel), likelihood (0-1)) * K_analtipfront(x, y (pixel), likelihood (0-1)) * L_analbasebottom(x, y (pixel), likelihood (0-1)) * M_ventralbase(x, y (pixel), likelihood (0-1)) * N_lefteye(x, y (pixel), likelihood (0-1)) * O_righteye(x, y (pixel), likelihood (0-1)) Manual_scoring&gt; xlsx files containing variables Half, Full, Combined (flaring state) (1=event is happening, 0 = event is not happening) top_mp4&gt; .mp4 files as fish face different animations. A set of animations can be seen in this zip file's 'Animations' folder #### File: Figure\_6\_dryad.zip **Description:** Investigates pS6 (activity indicator) changes in certain brain regions following exposure to a conspecific. Additionally, the folder includes rDm, cDm, and telencephalon lesion data, including mp4, DeepLabCut keypoints, and manual scoring to observe how flare rate, timing, and persistence change before and after the lesion. Fish display against real fish versus animation. See description of file types below. Files below pair with script file: Figure_6_script_dryad.py **pS6_all_counts_plot.xlsx** is an Excel that contains cells with calculations in sheet names: Vs, Vp, PGc. Calculations are as follows: cell H2: median(cell counts across fish viewing male conspecific), cell I2: median(cell counts across fish viewing male conspecific), and H4:cell counts across fish viewing male conspecific / cell counts across fish viewing male conspecific. Contains a series of directories that organize 3 file types: Keypoints .h5 containing the tracked body parts of a fish in a deeplabcut tracking analysis. Each body part has three associated su-fields: x, y, and likelihood. Body parts: * A_head (x, y (pixel), likelihood (0-1)) * B_rightoperculum (x, y (pixel), likelihood (0-1)) * C_tailbase (x, y (pixel), likelihood (0-1)) * D_tailtip (x, y (pixel), likelihood (0-1)) * E_leftoperculum (x, y (pixel), likelihood (0-1)) * F_spine1 to L_spine7 (x, y (pixel), likelihood (0-1)) * M_lefteye and N_righteye (x, y (pixel), likelihood (0-1)) * O_dorsaltip (x, y (pixel), likelihood (0-1)) * P_analtipfront and Q_analtipback (x, y (pixel), likelihood (0-1)) To open .h5 files, see Usage Notes, or use the associated script in this Dryad dataset: Figure_6_script_dryad.py. Manual scoring .xlsx files that contain variables Half, Full, and Combined flaring. (1=event is happening, 0 = event is not happening) Top footage .mp4 files of fish as they encounter either real fish or animation pre and post lesion. **Directories:**  Dryad_forebrain_lesions&gt;Animation&gt;lesion&gt;pre&gt;keypoints Dryad_forebrain_lesions&gt;Animation&gt;sham&gt;pre&gt;keypoints Dryad_forebrain_lesions&gt;Animation&gt;lesion&gt;post&gt;keypoints Dryad_forebrain_lesions&gt;Animation&gt;sham&gt;post&gt;keypoints Dryad_forebrain_lesions&gt;Real_fish&gt;lesion&gt;pre&gt;keypoints Dryad_forebrain_lesions&gt; Real_fish&gt;lesion_opponent&gt;pre&gt;keypoints Dryad_forebrain_lesions&gt;Real_fish&gt;lesion&gt;post&gt;keypoints Dryad_forebrain_lesions&gt; Real_fish&gt;lesion_opponent&gt;post&gt;keypoints Dryad_forebrain_lesions&gt;Real_fish&gt;sham&gt;pre&gt;keypoints Dryad_forebrain_lesions&gt; Real_fish&gt;sham_opponent&gt;pre&gt;keypoints Dryad_forebrain_lesions&gt;Real_fish&gt;sham&gt;post&gt;keypoints Dryad_forebrain_lesions&gt; Real_fish&gt;sham_opponent&gt;post&gt;keypoints Dryad_forebrain_lesions&gt;Animation&gt;lesion&gt;pre&gt;Manual_scoring Dryad_forebrain_lesions&gt;Animation&gt;sham&gt;pre&gt;Manual_scoring Dryad_forebrain_lesions&gt;Animation&gt;lesion&gt;post&gt;Manual_scoring Dryad_forebrain_lesions&gt;Animation&gt;sham&gt;post&gt;Manual_scoring Dryad_forebrain_lesions&gt;Real_fish&gt;lesion&gt;pre&gt;Manual_scoring Dryad_forebrain_lesions&gt; Real_fish&gt;lesion_opponent&gt;pre&gt;Manual_scoring Dryad_forebrain_lesions&gt;Real_fish&gt;lesion&gt;post&gt;Manual_scoring Dryad_forebrain_lesions&gt; Real_fish&gt;lesion_opponent&gt;post&gt;Manual_scoring Dryad_forebrain_lesions&gt;Real_fish&gt;sham&gt;pre&gt;Manual_scoring Dryad_forebrain_lesions&gt; Real_fish&gt;sham_opponent&gt;pre&gt;Manual_scoring Dryad_forebrain_lesions&gt;Real_fish&gt;sham&gt;post&gt;Manual_scoring Dryad_forebrain_lesions&gt; Real_fish&gt;sham_opponent&gt;post&gt;Manual_scoring Dryad_forebrain_lesions&gt;Animation&gt;lesion&gt;pre&gt;mp4 Dryad_forebrain_lesions&gt;Animation&gt;sham&gt;pre&gt;mp4 Dryad_forebrain_lesions&gt;Animation&gt;lesion&gt;post&gt;mp4 Dryad_forebrain_lesions&gt;Animation&gt;sham&gt;post&gt;mp4 Dryad_forebrain_lesions&gt;Real_fish&gt;lesion&gt;pre&gt;mp4 Dryad_forebrain_lesions&gt; Real_fish&gt;lesion_opponent&gt;pre&gt;mp4 Dryad_forebrain_lesions&gt;Real_fish&gt;lesion&gt;post&gt;mp4 Dryad_forebrain_lesions&gt; Real_fish&gt;lesion_opponent&gt;post&gt;mp4 Dryad_forebrain_lesions&gt;Real_fish&gt;sham&gt;pre&gt;mp4 Dryad_forebrain_lesions&gt; Real_fish&gt;sham_opponent&gt;pre&gt;mp4 Dryad_forebrain_lesions&gt;Real_fish&gt;sham&gt;post&gt;mp4 Dryad_forebrain_lesions&gt; Real_fish&gt;sham_opponent&gt;post&gt;mp4 Dryad_rDm_cDm_lesions&gt;cDm_analysis&gt;Animation&gt;lesion&gt;pre&gt;keypoints Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Animation&gt;sham&gt;pre&gt;keypoints Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Animation&gt;lesion&gt;post&gt;keypoints Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Animation&gt;sham&gt;post&gt;keypoints Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Real_fish&gt;lesion&gt;pre&gt;keypoints Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt; Real_fish&gt;lesion_opponent&gt;pre&gt;keypoints Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Real_fish&gt;lesion&gt;post&gt;keypoints Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt; Real_fish&gt;lesion_opponent&gt;post&gt;keypoints Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Real_fish&gt;sham&gt;pre&gt;keypoints Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt; Real_fish&gt;sham_opponent&gt;pre&gt;keypoints Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Real_fish&gt;sham&gt;post&gt;keypoints Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt; Real_fish&gt;sham_opponent&gt;post&gt;keypoints Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Animation&gt;lesion&gt;pre&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Animation&gt;sham&gt;pre&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Animation&gt;lesion&gt;post&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Animation&gt;sham&gt;post&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Real_fish&gt;lesion&gt;pre&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt; Real_fish&gt;lesion_opponent&gt;pre&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Real_fish&gt;lesion&gt;post&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt; Real_fish&gt;lesion_opponent&gt;post&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Real_fish&gt;sham&gt;pre&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt; Real_fish&gt;sham_opponent&gt;pre&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Real_fish&gt;sham&gt;post&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt; Real_fish&gt;sham_opponent&gt;post&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Animation&gt;lesion&gt;pre&gt;mp4 Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Animation&gt;sham&gt;pre&gt;mp4 Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Animation&gt;lesion&gt;post&gt;mp4 Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Animation&gt;sham&gt;post&gt;mp4 Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Real_fish&gt;lesion&gt;pre&gt;mp4 Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt; Real_fish&gt;lesion_opponent&gt;pre&gt;mp4 Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Real_fish&gt;lesion&gt;post&gt;mp4 Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt; Real_fish&gt;lesion_opponent&gt;post&gt;mp4 Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Real_fish&gt;sham&gt;pre&gt;mp4 Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt; Real_fish&gt;sham_opponent&gt;pre&gt;mp4 Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Real_fish&gt;sham&gt;post&gt;mp4 Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt; Real_fish&gt;sham_opponent&gt;post&gt;mp4 Dryad_rDm_cDm_lesions&gt;rDm_analysis&gt;Animation&gt;lesion&gt;pre&gt;keypoints Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Animation&gt;sham&gt;pre&gt;keypoints Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Animation&gt;lesion&gt;post&gt;keypoints Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Animation&gt;sham&gt;post&gt;keypoints Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Real_fish&gt;lesion&gt;pre&gt;keypoints Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt; Real_fish&gt;lesion_opponent&gt;pre&gt;keypoints Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Real_fish&gt;lesion&gt;post&gt;keypoints Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt; Real_fish&gt;lesion_opponent&gt;post&gt;keypoints Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Real_fish&gt;sham&gt;pre&gt;keypoints Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt; Real_fish&gt;sham_opponent&gt;pre&gt;keypoints Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Real_fish&gt;sham&gt;post&gt;keypoints Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt; Real_fish&gt;sham_opponent&gt;post&gt;keypoints Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Animation&gt;lesion&gt;pre&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Animation&gt;sham&gt;pre&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Animation&gt;lesion&gt;post&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Animation&gt;sham&gt;post&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Real_fish&gt;lesion&gt;pre&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt; Real_fish&gt;lesion_opponent&gt;pre&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Real_fish&gt;lesion&gt;post&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt; Real_fish&gt;lesion_opponent&gt;post&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Real_fish&gt;sham&gt;pre&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt; Real_fish&gt;sham_opponent&gt;pre&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Real_fish&gt;sham&gt;post&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt; Real_fish&gt;sham_opponent&gt;post&gt;Manual_scoring Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Animation&gt;lesion&gt;pre&gt;mp4 Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Animation&gt;sham&gt;pre&gt;mp4 Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Animation&gt;lesion&gt;post&gt;mp4 Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Animation&gt;sham&gt;post&gt;mp4 Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Real_fish&gt;lesion&gt;pre&gt;mp4 Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt; Real_fish&gt;lesion_opponent&gt;pre&gt;mp4 Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Real_fish&gt;lesion&gt;post&gt;mp4 Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt; Real_fish&gt;lesion_opponent&gt;post&gt;mp4 Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Real_fish&gt;sham&gt;pre&gt;mp4 Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt; Real_fish&gt;sham_opponent&gt;pre&gt;mp4 Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt;Real_fish&gt;sham&gt;post&gt;mp4 Dryad_rDm_cDm_lesions&gt;rDm_analysis &gt; Real_fish&gt;sham_opponent&gt;post&gt;mp4 Additional files:  pS6_findings&gt;ps6_all_counts_plot.xlsx with pS6 cell counts (activity indicator) for brain areas: male_dm (dorsomedial area of the pallium), male_dlv(dorsolateral ventral area of the pallium), male dld(dorsolateral dorsal area of the pallium), male dc3 (dorsocentral area of the pallium), Vs(ventral septal area of the pallium), Vp (ventral posterior area of the pallium), PGc (caudal preglomerular area). Each area’s counts are located in a separate tab. Each tab contains variables: condition (what condition the fish was exposed to; empty tank or male conspecific) and pS6 count (how many cells in that area were positive for pS6) Dryad_rDm_cDm_lesions&gt;cDm_analysis &gt;Animation&gt;order.xlsx: contains variables condition and animal id to indicate the animation each animal viewed. All fish viewed the naturalistic aggressive male display animation. ## Code/software #### File: Figure\_1\_script\_dryad.py **Description:** code for analyzing and visualizing the same tank encounters in the field and laboratory, focusing on flaring turn-taking as well as visualizing tail beating and biting events. Analysis of the size of the opponent versus the flare rate of the opponent as a regressor for flare rate.  #### File: Figure\_2\_script\_dryad.py **Description:** code for analyzing and visualizing the comparison of changes in position (heatmap, average distance), orientation (polar plot, change in time spent facing), flare rate, and flare persistence when fish are engaging with either animation or a conspecific.  #### File: Figure\_3\_script\_dryad.py **Description:** code for analyzing and visualizing the synchronization patterns of fish against animation with correlation of flaring events with different visual cues (opponent flare, orientation, and elevation).  #### File: Figure\_4\_script\_dryad.py **Description:** code for analyzing and visualizing the flare rate against animation with and without flaring. Further analysis of when the real fish's onset flaring is more likely to occur (when animation is stationary or moving) and the persistence of flaring over time. #### File: Figure\_5\_script\_dryad.py **Description:** code for analyzing and visualizing the flare rate against animation occurring at different elevations. DeepLabCut keypoints from model tracking side of the fish to show a position heatmap when fish face animations of different elevations.  #### File: Figure\_6\_script\_dryad.py **Description:** code for analyzing and visualizing pS6 and rDm/cDm/telencephalon lesion results contains analysis included in the main and supplemental figures associated with pS6 and lesions (flare rate, flare persistence, synchrony, correlation with certain visual features, change in position, orientation, speed).  ### File: helper\_functions\_VA.py **Description:** contains basic functions called across multiple scripts in the dataset. Contains, for instance, the 'manual_convert' function, which converts BORIS output into binary arrays of flaring events used across scripts. ## Access additional information Other publicly accessible locations of the automated scoring pipeline (daart) and DeepLabCut repository:  * Daart: [https://github.com/claire-everett/Preprocess_input_daart.git](https://github.com/claire-everett/Preprocess_input_daart.git) * DLC: [[https://drive.google.com/drive/folders/1-aFhzlOxAT0Km75jXMbnsp7go_rIHM2o?usp=sharing](https://drive.google.com/drive/folders/1-aFhzlOxAT0Km75jXMbnsp7go_rIHM2o?usp=sharing)] * Additional analyses: [[https://drive.google.com/drive/folders/1NOoo5bdpltSV4tkvvOtppNjw01LmMAVt?usp=sharing](https://drive.google.com/drive/folders/1NOoo5bdpltSV4tkvvOtppNjw01LmMAVt?usp=sharing)]