Phenotypic plasticity drives local adaptation by disrupting a genetically integrated jaw apparatus in Trinidadian guppies
Data files
Feb 03, 2026 version files 4.91 MB
-
DataAndCode.zip
4.90 MB
-
README.md
5.39 KB
Abstract
Our analysis includes four geometric morphometric analyses, as well as an integration analysis. This is reflected in the folder structure, with each of these five analyses having their own folder.
To run any of the codes, you must first install all required packages in R (below). Then you set the working directory as appropriate. After this, the code should run as normal.
Description of the data and file structure
All data listed below is contained in a single compressed file called "DataAndCode.zip"
Each of the four geometric morphometric analysis folders are named after the bone that they examine; Anguloarticular, dentary, lower pharyngeal jaw, and premaxilla. Within each of these folders is an R code that runs the analysis, a .PLY file of the focal bone that is used for visualization in the analysis, and two .csvs. The first .csv, "cureslideHalf.csv" gives a list of which landmarks are treated as semi-landmarks in the morphometrics analysis. The second .csv, "Segmentation_Landmarking Log..." lists all of the individuals contained in the analysis, with demographic information and which side (left or right) of the model was used in the final analysis. There is also another folder containing the landmarks for each individual in the given analysis. Each file within is named for the individual from which it was collected (see abbreviations below), and contains the X, Y, and Z coordinates for each landmark.
The specific data contained in each folder is as follows:
-
Premaxilla folder
Premax_geomorph_code.R Segmentation_Landmarking Log - Premax LM.csv curveslideHalf.csv test_half2_2.ply Landmarks -
Dentary folder
Dentary_geomorph_code.R Segmentation_Landmarking Log - Dentary LM.csv curveslideHalf.csv test_halfd.ply Landmarks -
Anguloarticular folder
AA_geomorph_code.R Segmentation_Landmarking Log - AA LM.csv curveslideHalf.csv test_half_aa.ply Landmarks -
Lower pharyngeal jaw folder
Lower_Pharyngeal _Jaw_Geomorph_Code.R Segmentation_Landmarking Log - LPJ LM.csv curveslideHalf.csv Aripo_WC_HP_F_C4_PJL_Right.ply Landmarks
The final folder, "Integration Analysis", contains four R data files, which are the outputs of the other four scripts. It also contains an R file which reads in each of these data files and then conducts the integration analysis.
-
Integration analysis folder
Integration_Analysis_Script.R LPJ_variables.RData - Output data from the lower pharyngeal jaw geometric morphometric analysis AA_variables.RData - Output data from the anguloarticular geometric morphometric analysis Dentary_variables.RData - Output data from the dentary geometric morphometric analysis PM_variables.RData - Output data from the premaxilla geometric morphometric analysis
Abbreviations
File names are constructed to include all information about the particular specimen.
Yarra/Aripo: River drainage that the fish comes from
WC: Wild-caught
LR: Lab-reared
LP: Low-predation, benthic
HP: High-predation, limnetic
AA: Anguloarticular
D: Dentary
LPJ: Lower pharyngeal jaw
PM: Premaxilla
Sharing/Access information
3D models of the fish from which these bones were sampled and landmarked are available on Dryad
Code/Software
There are two primary types of scripts, the geometric morphometric analysis scripts and the integration script. All four geometric morphometric scripts follow the exact same structure, and therefore can be summarized collectively.
The general structure of the geometric morphometric scripts is:
- Read in landmark data, and subsample it so that we only have points from one side of the head and along the midline.
- Read in the list of semi-landmarks and run a generalized procrusted analysis (function "gpagen") to scale, rotate, and translate all the specimens in space to overlap as much as possible.
- Check if specimen body length has an effect on bone shape (known as the allometric effect). If there is an allometric effect, then estimate it using a linear model. Finally, record the residuals of this model, and use this to calculate the new, allometrically corrected, shapes for each individual.
- Run a principle components analysis (PCA) on the allometrically corrected shapes (function "gm.prcomp")
- Visualize the results using PCA plots, 3d deformation plots, and by warping the .PLY file contained in the folder to reflect mean shapes of different populations.
The structure of the integration analysis is:
- Read in the analysis results from the geometric morphometrics
- Clean and align data from each analysis to be sure that we're grouping bones from the same individuals.
- Estimate the degree of integration across all pairwise sets of bones within each population (function "integration.test"). Specifically, conduct this analysis for sets of fish that are grouped by rearing environment and also for trophic niche.
Necessary R packages
- geomorph
- morpho
- plotly
- ggplot2
- ggthemes
