Data from: Evolutionary trade-offs between intergenerational and transgenerational fitness effects
Data files
Jul 09, 2026 version files 421.81 KB
-
data.tar
257.54 KB
-
README.md
10.42 KB
-
run_all.R
3.84 KB
-
scripts.tar
150.02 KB
Abstract
Intergenerational and transgenerational fitness effects can shape evolutionary processes. Theoretically, however, intergenerational and transgenerational effects can trade off with each other with profound consequences for evolutionary processes. Here we show that beneficial intergenerational effects that increase offspring fitness can result in detrimental transgenerational effects that decrease great-grand offspring fitness. We combined theoretical modelling and experimental approaches to investigate multigenerational fitness trade-offs induced by larval starvation in Caenorhabditis elegans. We demonstrate that larval starvation triggers a cascading effect: starved individuals suffered marked fitness losses, their direct offspring enjoyed fitness gains in both starvation and ad libitum environments, but great-grand-offspring paid fitness costs. Demographic simulation models revealed that genotypes exploiting this short-term intergenerational advantage outcompete rival genotypes despite the deferred transgenerational debt. Our findings demonstrate that adaptive intergenerational gains can be intrinsically linked to maladaptive transgenerational outcomes, challenging the assumption that transgenerational effects are inherently beneficial and highlighting the role of multigenerational trade-offs in evolution.
The study measures age-specific reproduction, lifetime reproductive success (LRS),
rate-sensitive fitness, and survival in the nematode Caenorhabditis elegans
across three generations (P0, F1 and F3) following early-life larval (L1) starvation.
Two experimental factors are crossed:
- Parental treatment – whether the parents experienced larval (L1) starvation
(Larval Starvation/L1) or were reared under standard food conditions
(Control/Con). - Offspring treatment – the same starvation vs. control manipulation applied to
the focal (offspring) generation.
All analyses were performed in R. The repository provides a complete,
reproducible workflow from the raw CSV files to the figures and model-output tables
reported in the paper.
Description of the data and file structure
The deposit contains two compressed folders and an R script:
data/ # Raw data as CSV files (input to the analyses)
scripts/ # R analysis scripts
run_all.R # Master script that runs every analysis in order
Decompress data.tar and scripts.tar to access the folders.
There are two kinds of data file:
- Reproduction files – one row per replicate plate, with daily offspring
counts in columnsD1,D2, … Each column is the number of live offspring
counted on that day of the reproductive period. - Survival files – individual worm survival records, one row per worm (except
P0GLMM.csv, which is in long format with one row per worm-per-day).
Treatment coding conventions
| File type | Column | Format | Example | Meaning of the example |
|---|---|---|---|---|
Reproduction (F1.csv, F3.csv, Transgen.csv) |
Treatment |
Offspring(Parental) |
L(C) |
Larval-starved offspring from Control parents |
Survival (*_survival.csv) |
TreatmentCode |
parental then offspring |
lc |
Larval-starved parent, Control offspring |
In both schemes the letters mean C / c = Control and L / l = Larval (L1)
starvation. The unambiguous Parental Treatment and Offspring Treatment columns
are also provided
Missing values
Missing values are coded as NA or left as an empty cell. In survival files,
Death_date, D1, Day and Age can be NA for individuals that were lost or
never scored. In reproduction files, days with no observation are blank/NA. Dates
are in DD/MM/YYYY format.
Cause-of-death codes (survival files)
Only worms that died of natural causes contribute a death event
(Event / status = 1). All other codes denote censored individuals
(Event / status = 0) removed for reasons unrelated to natural ageing:
| Code | Meaning | Counted as death? |
|---|---|---|
D |
Died (natural death) | Yes (Event = 1) |
M |
Matricide / internal (bag-of-worms) hatching | No (censored) |
L |
Lost from plate | No (censored) |
W |
Desiccated / crawled onto plate wall | No (censored) |
E |
Vulval bursting / exploded | No (censored) |
I |
Infection | No (censored) |
Files and variables
Data files
File: data/P0repro.csv
Age-specific reproduction of the parental (P0) generation. One row per plate
(60 plates; 30 per treatment).
Plate— plate / replicate identifierTreatment—ControlorLarval StarvationD1–D6— number of live offspring counted on days 1–6 of the reproductive period (integer counts)
File: data/P0Surv.csv
Individual survival records for P0 worms, one row per worm (200 worms). Input to the
Cox mixed-effects survival model.
Treatment—Con(control) orL1(larval starvation)Plate— plate identifierWorm— worm identifier within a plateDeath_date— date the worm died or was censored (DD/MM/YYYY)Cause— cause code (see cause-of-death table above)D1— start date of observation, i.e. day 1 (DD/MM/YYYY)Age— age in days at death/censoring (Death_date−D1)Event—1= died (natural death),0= censoredDay— survival time in days (equal toAge)
File: data/P0GLMM.csv
Long-format daily survival records for P0 worms (one row per worm-per-day; 3,198
records). Input to the binomial survival GLMM (status ~ Treatment + Age).
- (first, unnamed column) — row index
Worm— worm identifierAge— observation-day index for that worm (1, 2, 3, …)Treatment—ConorL1Plate— plate identifierDeath_date— date of death (DD/MM/YYYY)Cause— cause code (allDin this file)D1— start date (DD/MM/YYYY); may beNADay— day value used to reconstruct the survival timeline; may beNA(filled forward inP0.R)status—0= alive on that day,1= dead
File: data/F1.csv
Age-specific reproduction of the F1 generation. One row per plate (120 plates; 30 per
treatment combination).
Plate— plate identifierParental Treatment—ControlorLarval Starvation(grandparental/parental exposure)Offspring Treatment—ControlorLarval Starvation(F1 exposure)D1–D5— number of live offspring counted on days 1–5 (integer counts)Treatment— combined code inOffspring(Parental)format:C(C),C(L),L(C),L(L)
File: data/F3.csv
Age-specific reproduction of the F3 generation (transgenerational). One row per plate
(120 plates; 30 per treatment combination).
Plate— plate identifierParental Treatment—ControlorLarval StarvationOffspring Treatment—ControlorLarval StarvationD1–D6— number of live offspring counted on days 1–6 (integer counts)Treatment— combined code inOffspring(Parental)format:C(C),C(L),L(C),L(L)
File: data/F1_survival.csv
Individual survival records for F1 worms, one row per worm (400 worms).
Parental Treatment—ConorL1Treatment— offspring treatment:ConorL1Plate— plate identifierWorm— worm identifier within a plateDeath_date— date of death/censoring (DD/MM/YYYY)Cause— cause code (see table above)D1— start date, day 1 (DD/MM/YYYY)Age— age in days at death/censoringEvent—1= died,0= censoredTreatmentCode— combined code inparental+offspringformat:cc,cl,lc,ll
File: data/F3_survival.csv
Individual survival records for F3 worms, one row per worm (400 worms). Columns as in
F1_survival.csv, plus:
Day— survival time in days (equal toAge)
File: data/Transgen.csv
Combined F1 + F3 age-specific reproduction, used for the transgenerational analysis
(240 rows: 120 F1 plates + 120 F3 plates).
Plate— plate identifierGeneration—F1orF3Parental Treatment—ControlorLarval StarvationOffspring Treatment—ControlorLarval StarvationD1–D6— number of live offspring counted on days 1–6 (integer counts)Treatment— combined code inOffspring(Parental)format:C(C),C(L),L(C),L(L)
Code / script files
All scripts live in scripts/ and use the here package for portable file paths,
so they read the data from data/.
P0.R— P0 age-specific reproduction (spline GLMM), rate-sensitive fitness (Leslie-matrix dominant eigenvalue), LRS, and survival GLMM.P0_Plots.R— P0 reproduction / LRS / fitness figures.P0Surv.R— P0 Cox mixed-effects (coxme) survival model, Kaplan–Meier curve and forest plot.F1.R— F1 reproduction, fitness, LRS and survival analyses.F1Plots.R— F1 figures.F1Surv.R— F1 Cox mixed-effects survival model and Kaplan–Meier curves.F3.R— F3 reproduction, fitness, LRS and survival analyses.F3Plots.R— F3 figures.F3Surv.R— F3 Cox mixed-effects survival model and Kaplan–Meier curves.transgen.R— Transgenerational (F1 vs F3) reproduction analysis usingTransgen.csv.WormSimulation.R— Simulation of the dynamics of two life-history strategies in a worm population.GraphExport.R— Assembles and exports the main and supplementary figures (SVG) toplots/Final/Export/.ModelOutputs.R— Helper functions that turn the fitted models into formatted tables and export them as.docxtomodel_output/.run_all.R— Master script (in the repository root) that runs all of the above in order.
Code / software
Software: R (version ≥ 4.2). RStudio recommended.
R packages used across the scripts:
here, tidyverse (dplyr, tidyr, ggplot2, purrr, readr, stringr),
glmmTMB, DHARMa, car, splines, emmeans, easystats (performance),
patchwork, gt, survival, survminer, coxme, AICcmodavg
Install any missing packages with, e.g.:
install.packages(c(
"here", "tidyverse", "glmmTMB", "DHARMa", "car", "emmeans",
"performance", "patchwork", "gt", "survival", "survminer",
"coxme", "AICcmodavg"
))
To reproduce the full analysis:
-
Download the deposit and keep the
data/,scripts/andrun_all.Rstructure intact. -
Open the folder in R / RStudio (with the working directory set to the folder root).
-
Run:
source("run_all.R")
This runs the P0, F1, F3 and transgenerational analyses and the simulation, fits the
survival models, builds the figures, exports the model-output tables to
model_output/. Figures are written
to plots/Final/Export/.
Access information
Authors: Isaac Harris¹, Elizabeth M. L. Duxbury¹, Tracey Chapman¹,
Simone Immler¹, Alexei A. Maklakov¹
¹ School of Biological Sciences, University of East Anglia, Norwich Research Park,
Norwich NR4 7TJ, UK
Contact: Isaac Harris — Isaac.Harris@uea.ac.uk
