DOI: 10.5061/dryad.tdz08kq8d
title: Divergence in genetic (co)variances and the alignment of gmax with phenotypic divergence

description: To better understand the sources of biological diversity in nature, we
 need information on the mechanisms underlying population divergence.
 Biological systems with patterns of naturally occurring adaptive variation
 among populations can provide insight into the genetic architecture of
 diverging traits and the influence of genetic constraints on responses to
 selection. Using a system of reproductive character displacement in the
 North American mushroom-feeding fly Drosophila subquinaria, we assessed
 patterns of genetic (co)variance among a suite of chemical signaling
 traits and divergence in this pattern among populations. D. subquinaria
 exhibits stronger reproductive isolation against the closely related
 Drosophila recens in sympatry, where both female mating preferences and
 male chemical signalling traits have diverged from the ancestral
 allopatric populations. We collected three wild populations from each
 region and, in the lab, characterized the phenotypic divergence in these
 traits as well as the additive genetic (co)variance structure (G-matrix)
 with replicate breeding designs. We found divergence between allopatric
 and sympatric D. subquinaria in the shape and size of the G-matrix, and
 that the leading axis of genetic variance (gmax) had changed in sympatry
 to come into alignment with the primary axis of phenotypic divergence
 between the sympatric and allopatric regions.
description: This dataset was generated by phenotyping <em>Drosophila
 subquinaria</em> offspring from several large breeding designs. Lab
 stocks were established by collecting flies from several natural
 populations, which were then used to conduct blocked breeding designs in
 order to track the relatedness of offspring. Phenotyping was primarily the
 assessment of an individuals CHC (cuticular hydrocarbon) profile using gas
 chromatography. This profile is the relative abundance of a collection of
 chemical compounds that are necessary for various biological functions.
 These were transformed to give nine logcontrast traits for each
 individual. This phenotype, along with an individuals parentage codes and
 fixed effects of block and gas chromatograph channel, were used in all
 subsequent analyses.
description: # Divergence in genetic (co)variances and the alignment of
 <b>g</b><sub>max</sub> with phenotypic divergence
 [https://doi.org/10.5061/dryad.tdz08kq8d](https://doi.org/10.5061/dryad.tdz08kq8d) ## Description of the data and file structure This dataset was generated by phenotyping *Drosophila subquinaria* offspring from several large breeding designs. Lab stocks were established by collecting flies from several natural populations, which were then used to conduct blocked breeding designs in order to track the relatedness of offspring. Phenotyping was primarily the assessment of an individuals CHC (cuticular hydrocarbon) profile using gas chromatography. This profile is the relative abundance of a collection of chemical compounds that are necessary for various biological functions. These were transformed to give nine logcontrast traits for each individual. This phenotype, along with an individuals parentage codes and fixed effects of block and gas chromatography channel, were used in all subsequent analyses. ### Files and variables #### File: data\_and\_code.zip **Description:**  *BD_logcontrasts.csv* - Breeding design CHC data transformed into logcontrasts. See code for detailed data description. * *ID:* Individual fly ID code * *channel:* Gas chromatography channel during assay * *population:* geographic source population for lab stock * *patry:* region (sympatry or allopatry) * *block:* experimental block of the breeding design, representing the year assays were conducted in. * *sire/dam/animal:* ID codes from the breeding design indicting the sire (father) of the individual, the dam (mother), and individual. * *LC2 - LC20:* The logcontrast transformed relative CHC abundances. The multivariate phenotype on which all further analyses were conducted. See main text for details. D_structure.r - Estimating the D-matrix for CHC data variation among the six study populations. See script for details on running. G_structure.r - Assessing divergence in G between sympatry and allopatry using frequentest methods. See script for details on running. NullGs_patry - Folder containing necessary code and data for estimating the null distribution of G matrices for sympatry and allopatry. The .r file is a fully annotated script for estimating the posterior distribution of null G matrices for *D. subquinaria* populations in sympatry and allopatry. The two .RDS files are outputs of this script included for convenience. The .csv file is a duplicate of the file described above included here for convenience. See script files for details. ObsGs_patry - Folder containing necessary code and data for estimating the observed G matrices for sympatry and allopatry, and a single overall G matrix. The .r file is a fully annotated script for estimating the posterior distribution of observed G matrices for *D. subquinaria* populations in sympatry and allopatry. The three .RDS files are outputs of this script included for convenience. The .csv file is a duplicate of the file described above included here for convenience. See script files for details. Gcompare - Folder containing necessary code and data for subsequent analyses of G matrix divergence and associations between changes in genetic variance and phenotypic divergence. Each of the six .RDS file is the saved output from the G-matrix estimation processes contained in NullGs_patry and ObsGs_patry. Table_Dmatrix \_Vectors.csv is the output of D_structure.r containing the leading eigenvectors of the D matrix for divergence in CHC phenotypes among populations (labelled V1 - V5 with the corresponding trait loadings in each column). These can be recreated by following the instructions in each of those folders, but are included for convenience. G_compare2.R is a fully annotated script that takes these input files and performs the analyses described in Jarvis et al. 2025. See script for details. #### ## Code/software All analyses were conducted in R version 4.2.2. See code scripts for necessary packages.