Data for: Thermal specialization limits evolutionary responses to climate warming in lizards
Data files
Feb 23, 2026 version files 9.51 MB
-
Analyses_thermal_functions.R
14.45 KB
-
code.R
24.82 KB
-
data_lizards.csv
54.19 KB
-
fit_boostrap_TPC.r
1.40 KB
-
mean_temp.nc
9.36 MB
-
README.md
11.38 KB
-
size_geography.xlsx
17.97 KB
-
sp_phylo.nwk
4.40 KB
-
TPC_parameters.xlsx
25.37 KB
Abstract
Understanding how ectothermic animals perform under climate warming is key to predicting biodiversity responses to global change. We compiled empirical sprint speed data for 85 lizard species and fitted thermal performance curves (TPCs) using a mechanistic model capturing enzymatic and protein stability constraints. From fitted TPCs, we derived physiological traits related to the shape of the TPCs and tested whether body size, thermal environment, and phylogeny predict performance. Species adapted to warmer habitats exhibited higher optimum temperatures and maximal performance values, supporting the hotter-is-better hypothesis. But warm-adapted specialists had a narrower thermal breadth and a steeper performance decrease under the highest thermal challenges than cold-adapted species. These results suggest an evolutionary trade-off between specialists and generalists, shaped by the evolutionary history. Our findings exhibit how evolutionary processes can tune performance to present climates but may limit adaptive potential to future warming.
Dataset DOI: 10.5061/dryad.2280gb65z
Description of the data and file structure
We compiled empirical sprint-speed measurements for 85 lizard species and fitted thermal performance curves using a mechanistic Sharpe–Schoolfield–type model that captures enzymatic kinetics and high-temperature inactivation. From each fitted curve, we extracted key thermal traits (e.g., Topt, maximal performance, thermal breadth) and evaluated their relationships with body size, thermal environment, and phylogeny using phylogenetic generalized least squares (PGLS).
Files and variables
In this dataset, all NA values and blank cells are treated as missing data and handled accordingly during analysis.
1. "data_lizards.csv" - This dataset contains raw measurements of sprint speed across experimental temperatures for each lizard species, including metadata linking observations to their sources.
Column descriptions.
ta– Ambient or test temperature during the sprint-speed trial (°C).pf– Sprint performance measured at that temperature (m·s⁻¹), expressed as running speed.sp_original– Original species name as reported in the source publication (string; binomial nomenclature).ref– Bibliographic reference identifying the data source (string; e.g., author–year).code– Short alphanumeric identifier used to group all measurements belonging to the same species or experimental series (factor/string).
2. "size_geography.xlsx" - This table provides species-level morphological, geographic, and taxonomic information associated with each lizard dataset used for fitting thermal performance curves.
Column descriptions.
ref– Source reference for the dataset (string; author–year or study identifier).sp– Species name exactly as reported in the source publication (string; binomial nomenclature).sp_tree– Standardized species name matching the phylogenetic tree (string).code– Short alphanumeric code linking species metadata to raw sprint-speed measurements (string/factor).lat– Latitude of the sampling locality (decimal degrees; negative = southern hemisphere).long– Longitude of the sampling locality (decimal degrees; negative = western hemisphere).gen– Genus name (string).fam– Family name following current taxonomic classification (string).SVL– Snout–vent length (SVL) in millimetres (mm).mass_g– Body mass in grams (g).
3. "TPC_parameters.xlsx"- This table compiles all thermal performance curve (TPC) parameters estimated for each lizard species, together with sample size and corresponding taxonomic, morphological, and geographic metadata.
Column descriptions.
TPC parameter estimates
code– Short identifier linking each species or dataset across files (string).q10– Thermal sensitivity coefficient (unitless), describing the exponential increase in performance with temperature below the optimum.cte– Normalization constant (unitless), scaling baseline performance in the TPC model.thr– Thermal threshold (°C) at which the high-temperature decline begins.decay– Quadratic decay parameter (unitless), determining how rapidly performance decreases abovethr.ctmax– Upper critical temperature (°C) estimated from model parameters.max.pf– Maximum running performance (m·s⁻¹) predicted from the fitted curve.ta.opt– Temperature at which maximum performance occurs (Topt; °C).breadth.50– Thermal breadth (°C) over which performance remains ≥50% of the maximum.breadth.80– Thermal breadth (°C) over which performance remains ≥80% of the maximum.r.square– Model fit (R²; unitless).n.samples– Number of empirical sprint-speed measurements used to fit the TPC.
Species information
sp_original– Original species name as reported in the data source (string).ref– Reference from which the sprint-speed data were obtained (author–year).sp_tree– Standardized species name matching the phylogeny (string).
Geographic information
lat– Latitude of sampling locality (decimal degrees; negative = southern hemisphere).long– Longitude of sampling locality (decimal degrees; negative = western hemisphere).
Taxonomy
gen– Genus name (string).fam– Family name following current taxonomy (string).
Morphology
SVL– Snout–vent length (SVL) measured in millimetres (mm).mass_g– Body mass in grams (g).
4. "mean_temp.nc" - A global raster at 5 km × 5 km resolution containing mean temperature values.
5. "sp_phylo.nwk" - Phylogenetic tree including all reptile species analysed in the study.
Code/software
1. "Analyses_thermal_functions.R" - This file defines four core functions for fitting and analysing thermal performance curves (TPCs):
- compute.thermal.curve(q10, CTE, thr, decay): Generates predicted performance values between 10–50 °C by combining a thermal (Q10-type) component with a state component that introduces a quadratic decline above the threshold temperature thr. Returns a data frame with temperature and performance.
- fit.thermal.curve(ta, pf, ...): Normalises performance, performs a coarse grid search to obtain initial parameter values (q10, CTE, thr, decay), and fits a non-linear least squares (NLS) model to minimise squared error. Outputs estimated parameters including a CTmax proxy, Pmax, Topt, thermal breadth at 50% and 80% of maximum performance, R², AIC, and convergence status. Optionally plots the empirical data and fitted TPC.
- plot.thermal.curve(...) / plot.thermal.curve.1(...): Plots TPCs and their two components (thermal and state). The .1 variant can optionally return the temperature–performance series instead of producing a plot.
- breadth.thermal.curve(...): Computes thermal breadth (e.g., B50 or B80), defined as the temperature range over which performance exceeds a given fraction of the curve’s maximum.
- boot.thermal.curve(ta, pf, sd, rep = 1000): Implements a parametric bootstrap: simulates rep datasets by adding normally distributed error (scaled to the maximum observed value), refits the TPC for each replicate, and returns a table with the distributions of fitted parameters and derived metrics (q10, CTE, thr, decay, CTmax proxy, Pmax, Topt, thermal breadths, R², sample size). Optionally overlays simulated curves and empirical points.
2. "code.R" - Replicates all analyses and figures of the paper.
- Libraries. Uses
dplyr,tidyr,nlme,phytools,ape,visreg,openxlsx,terra/raster,corrplot, andviridis( Lite ). - Custom functions. Sources
Analyses_thermal_functions.Rwhich implements TPC helpers (compute.*,fit.*,plot.*,breadth.*,boot.*). - Inputs.
TPC_parameters.xlsx— per-species TPC parameters (and metadata).sp_phylo.nwk— time-scaled phylogeny.mean_temp.nc— raster of mean habitat temperature.
- Data curation.
- Filters records with missing
q10; orders bymax.pf. - Completes missing body masses via family-specific SVL→mass allometries (Meiri 2010), with a manual fix for Varanus griseus.
- Filters records with missing
- Deriving TPC traits.
- Computes
max.pfandta.optper species from the parametric curve (plot.thermal.curve.1(..., data=TRUE)). - Builds a trait subset (
q10,cte,thr,decay,ctmax,max.pf,ta.opt,breadth.50) and runs Pearson correlations with p-values; visualizes withcorrplot.
- Computes
- Phylogeny.
- Harmonizes species labels between tree and data; prunes both to common tips.
- Tests phylogenetic signal (Pagel’s λ) for focal traits with
phylosig.
- Environment.
- Extracts per-species mean habitat temperature from
mean_temp.ncusing species coordinates (terra::extract). - Predicts expected running speed at fixed temperatures (10–40 °C) from fitted TPCs to create
pf_10 … pf_40.
- Extracts per-species mean habitat temperature from
- Figure 1 workflow.
- A: Global map of mean temperature with species points (cividis palette).
- B: Stack of species-specific TPCs (base graphics; viridis-like palette).
- C: Phylogenetic PCA (λ-mode, correlation matrix) on TPC descriptors; biplot with loadings and species scores.
- PGLS analysis.
- Model:
max.pf ~ log10(mass) + ta.opt + temperature. - Phylogenetic correlation:
corPagel(λ estimated). - Reports VIFs, AIC, CIs; computes R² manually as
1 − RSS/TSS. - Assesses phylogenetic signal of predictors and response.
- Model:
- Figure 2 workflow.
- Partial effects for each predictor via
visreg(A: mass, B: Topt, C: habitat T). - For each predictor, shows a matching phylogenetic continuous-trait map (
contMap) with λ annotations.
- Partial effects for each predictor via
- Thermal challenge surface.
- Reshapes
pf_*columns to long format; fits LOESS: performance ~ habitat temperature × test temperature + scaled log mass. - Computes model R²; builds a prediction grid and a 3D surface (
persp) colored by predicted performance.
- Reshapes
- Figure 3 workflow.
- 3D surface of running speed across habitat temperature (x) and test temperature (y), at median mass (z = predicted performance).
- Key outputs.
- Updated per-species traits (
av_df), correlation matrix + p-matrix, λ statistics, PGLS summary (AIC, CIs, R²), mapped trees, and Figures 1–3.
- Updated per-species traits (
3. "fit_boostrap_TPC.r" - Fits Thermal Performance Curves (TPCs) to raw sprint-speed data in data_lizards.csv and generates a parameter table for downstream analyses.
- Functions used. Loads custom TPC utilities from
Analyses_thermal_functions.R(notablyboot.thermal.curve()). - Input data.
data_lizards.csv: long table with at leastcode(species/series ID),ta(ambient temperature, °C), andpf(performance).size_geography.xlsx: species metadata (size and site/geography fields; columns 3–10 are used).
- Pre-processing.
- Extracts unique series IDs (
code) and excludes four non-convergent cases:uo,pf,pi,plat.
- Extracts unique series IDs (
- Bootstrap fitting.
- Sets RNG seed
13for reproducibility. - For each
codecallboot.thermal.curve(ta, pf, sd = pf/5)(i.e., CV ≈ 0.2) to simulate and refit curves multiple times. - Collapses each bootstrap output to per-parameter medians (robust central tendency).
- Sets RNG seed
- Output assembly.
- Binds per-species bootstrap medians into
boost_df. - Adds identification fields by merging with
all_liz_tidy(sp_original,ref,code). - Merges size/site covariates from
size_geography.xlsx.
- Binds per-species bootstrap medians into
- Saved product.
- Writes
TPC_parameters.xlsx, containing (at minimum):q10,cte,thr,decay,ctmax(proxy),max.pf,ta.opt,breadth.50,breadth.80,r.square,n.samples, plus species and metadata columns.
- Writes
- Run time. Bootstrap fitting is computationally expensive; expect long runtimes depending on the number of species and bootstrap reps configured inside.
boot.thermal.curve().
