Published June 18, 2024 | Version v1
Dataset Restricted

Supplementary Data and Code: Different traits dominate evolution at early and late stages of adaptive radiation

  • 1. University of Aberdeen
  • 2. University of Ljubljana, Biotechnical Faculty
  • 3. ROR icon University of Graz
  • 4. ROR icon Swiss Federal Institute of Aquatic Science and Technology
  • 5. ROR icon University of Bern
  • 6. ROR icon University of Zurich

Description

Supplementary Data and R code for phylogenetic analyses for manuscript entitled Different traits dominate evolution at early and late stages of adaptive radiation

Code.zip contains all R scripts and data needed for analyses in the paper. It is divided in two parts, DECOUPLED DIVERSIFICATION (folder 1) and STATES-DEPENDENT SPECIATION AND EXTINCTION (folder 2).

1) DECOUPLED DIVERSIFICATION

"data" folder contains phyogeny, morpho and eco data, species by clades, and RDS with imputed values for missing traits.

Niphargus_trait_evolution.rmd file runs neccessary packages and scripts and outputs results. Note that working directory and "result" folder need to be defined before you run the script.

00_data.R: import and data manipulation, including imputation of missing values to morpho ds. All variables needed in later analyses are defined here, including subsets, subclades, etc.
00_functions.R: all custom functions
01_figure1_phylogeny.R: plots half-circle phylogeny
02_regression_PCA.R: runs phylogenetic regression and PCA, and saves results
03_kmeans.R: calculates k-means and saves results
04_modeling.R: runs modeling, ancestral trait reconstruction and morphospace expansion through time, simulations and comparison of morphospace expansion of real and simulated data.

2) STATES-DEPENDENT SPECIATION AND EXTINCTION

This folder includes data and code used for sec_sse analysis. The analysis was run on whole genus and three major clades. Additionally, trophic trait classes were compared with habitat trait class (trophicD and trophicP), so overall, 8 combinations of model comparisons were performed. The folder is thus divided into "clades" and "whole_genus" subfolders. Data and R scripts for model setup, launching the analysis and calculation of AIC values are provided.

Files

Restricted

The record is publicly accessible, but files are restricted. Log in to check if you have access.