DOI: 10.6084/m9.figshare.28687235
title: Data and Script repository for: Audet, T. Wilson, A. Dukas, R. & Dworkin, I. 2025. The role of resource defensibility in facilitating sexually-selected weapon evolution: An experimental evolution test. Evolution. doi: https://doi.org/10.1093/evolut/qpaf073

description: Data and scripts to repeat analyses as presented in the associated study<br>Audet, T. Wilson, A. Dukas, R. & Dworkin, I. 2025. The role of resource defensibility in facilitating sexually-selected weapon evolution: An experimental evolution test. [Evolution](https://doi.org/10.1093/evolut/qpaf073)<br>This is a static version of the data and scripts "frozen" at time of acceptance of the paper.<br>## Basic information<br>Images taken of Wilson flies (Spatial Heterogeneity manipulation experimental evolution)<br>Images taken by Audrey Wilson at generation 35 and Francesco Ruso at generation 75.<br>Measurements taken by Audrey Wilson at generation 35 and Tyler Audet at generation 75.<br>Images taken on Leica M12, Camera DFC400<br>Traits images: Head, wing, thorax, leg<br>Condition manipulation: C0 = unstarved C1 = 1 day starved C2 = 2 days starved<br><br>## DATA files and variables therein<br>`MM_aggression_FINAL.csv`<br>Day - Day the trial was run<br>Trial - Individual trial identifier (nested within day)<br>Threat_dur - Threat duration<br>Threat_SM - Threat (in seconds per minute)<br>Lunges - Count of observed lunges<br>Session - Session of experiment<br>CAM - Which camera was used for recording assays<br>TRT - Experimental treatment group. See script for correspondence with standard treatment identifiers (B = NT, V = UCT, F = SCT).<br>Lineage - Replicate lineage within experimental treatment group<br>Observer - Observer<br><br><br>`Territoriality_CommonCompetitorCVL_2020.csv`<br>Block - Identifier of experimental block<br>Cage_number - Identifier for which cage was used for the trial<br>Treatment - Experimental treatment group<br>Male_type - High (HQ) or low quality (LQ) identifier for cross male<br>wt_female - number of female offspring that are wild type<br>cvl_female - number of female offspring that are cvl phenotype<br>cvl_male - number of male offspring that are cvl phenotype<br><br><br>`F35_wideFly.csv`<br>treatment - Experimental treatment group<br>cohort0 - Condition cohort with 0 as the highest condition (corresponding to days starved)<br>replicate - experimental replicate<br>cohort - Condition cohort with 1 as the highest condition<br>sex - sex<br>individual - individual identifier (within sex and treatment)<br>tarsus - tarsus length (µm)<br>femur - length (µm)<br>tibial - length (µm)<br>winglength - length (µm)<br>wingwidth - length (µm)<br>thorax - length (µm)<br>head - length (µm)<br>thorax_c - thorax length centred around the mean thorax length<br>cohort_n - cohort read in as a numeric variable rather than a factor<br><br><br>`gen75_wideFly.csv`<br>treatment - experimental treatment group<br>replicate - experimental replicate<br>cohort - condition cohort with 1 as the highest condition<br>sex - sex<br>individual - individual identifier (within sex and treatment)<br>tarsus - tarsus length (µm)<br>femur - length (µm)<br>tibia - length (µm)<br>wing - length (µm)<br>thorax - length (µm)<br>head - length (µm)<br>thorax_c - thorax length centred around the mean thorax length<br><br><br>`Audet_2022_terryflies.csv`<br>Initials - imager (and measurer) initials<br>Treatment - experimental treatment group<br>Replicate - experimental replicate<br>Generation - generations of experimental evolution<br>Cohort - condition cohort with 1 as the highest condition<br>Sex - sex<br>Individual - individual identifier (within sex and treatment)<br>Trait - trait identifier (L= leg, H= head, W= wing, T= thorax)<br>length - measurement length (pixels)<br>scale - conversion factor to µm<br>scale_mm - conversion factor to mm<br>length_mm - measurements converted to mm<br>NewTrait - trait expanded to full word and includes specific leg trait<br>Cohort0 - condition cohort with 0 as the highest condition (corresponding to days starved)<br><br><br>`tarsus_ConditionData.csv`<br>X - The first two columns are just output row numbers from the measuring software<br>Initials - imager initials<br>Treatment - experimental treatment group<br>Replicate - experimental replicate<br>Generation - generations of experimental evolution<br>Cohort - condition cohort with 1 as the highest condition<br>Sex - sex<br>Individual - individual identifier (within sex and treatment)<br>Trait - trait identifier (L= leg)<br>Area - measuring software output removed in script<br>Mean - measuring software output removed in script<br>Min - measuring software output removed in script<br>Max - measuring software output removed in script<br>Angle - measuring software output removed in script<br>Length - measurement length (pixels)<br>scale - conversion factor to µm<br>scale_mm - conversion factor to mm<br>length_mm - measurements converted to mm<br>Cohort0 - condition cohort with 0 as the highest condition (corresponding to days starved)<br>length_um - measurements converted to µm<br>`TA_Measurements_F75_working.csv`<br>Number - software out row number<br>Label - image label (contains 'imager_treatment/replicate_cohort_sex_trait_individual' as outlined above as one label)<br>Length_px - length in pixels<br><br><br>## SCRIPTS<br>'Aggression_Analysis'<br>- This script corresponds to all aggression analyses- Uses the data file 'MM_aggression_FINAL.csv'<br>'AW_ConditionDependence_siringSuccess_Experiment'<br>- This script corresponds to the siring success analyses- Uses data from file 'Territoriality_CommonCompetitorCVL_2020.csv'<br>'Between_generation_comparison'<br>- This script corresponds to analyses looking at thorax size changes between F35 and F75- This script uses both data files 'F35_wideFly.csv' and 'gen75_wideFly.csv'<br>'combining_plots'<br>- This script is used to turn figures from F35 and F75 in to multi-panel plots- This script reads in no data, but is run when both 'TA_working_F35_analysis' and'TA_working_F75_analysis' have been run and go-lot objects are in the environment<br>'TA_working_F35_analysis'<br>- This script corresponds to all analyses done in the generation 35 flies- This script uses the data file 'Audet_2022_terryflies.csv' and 'tarsus_ConditionData.csv' and writes out the data file 'F35_wideFly.csv'<br>'TA_working_F75_analysis'<br>- This script corresponds to all analyses done in the generation 75 flies- This script uses data from 'TA_Measurements_F75_working.csv' and writes out the data file 'gen75_wideFly.csv'<br><br>FIGURES:<br>Figure 2 is generated in the script 'AW_ConditionDependence_siringSuccess_Experiment'<br>Figures 3, 4, 5, 6 are generated using both 'TA_working_F35_analysis' and 'TA_working_F75_analysis' scripts and then made in to panels using the script 'combining_plots'<br>Figure 7 is generated using the script 'Aggression_Analysis'<br>