Skip to main content
Dryad logo

Data from: Dietary-based developmental plasticity affects juvenile survival in an aquatic detritivore


Lürig, Moritz; Matthews, Blake (2021), Data from: Dietary-based developmental plasticity affects juvenile survival in an aquatic detritivore, Dryad, Dataset,


Developmental plasticity is ubiquitous in natural populations, but the underlying causes and fitness consequences are poorly understood. For consumers, nutritional variation of juvenile diets is likely associated with plasticity in developmental rates, but little is known about how diet quality can affect phenotypic trajectories in ways that might influence survival to maturity and lifetime reproductive output. Here, we tested how the diet quality a freshwater detritivorous isopod (Asellus aquaticus), in terms of elemental ratios of diet (i.e. carbon : nitrogen : phosphorus; C :N: P), can affect (i) developmental rates of body size and pigmentation and (ii) variation in juvenile survival. We reared 1047 individuals, in a full-sib split family design (29 families), on either a high (low C : P, C :N) or low quality (high C : P, C : N), and quantified developmental trajectories of body size and pigmentation for every individual over 12 weeks. Our diet contrast caused strong divergence in the developmental rates of pigmentation but not growth, culminating in a distribution of adult pigmentation spanning the broad range of phenotypes observed both within and among natural populations. Under low-quality diet, we found highest survival at intermediate growth and pigmentation rates. By contrast, survival under high-quality diet survival increased continuously with pigmentation rate, with longest lifespans at intermediate growth rates and high pigmentation rates. Building on previous work which suggests that visual predation mediates the evolution of cryptic pigmentation in A. aquaticus, our study shows how diet quality and composition can generate substantial phenotypic variation by affecting rates of growth and pigmentation during development in the absence of predation.


Common garden experiment 

Using a common garden experiment, we quantified the extent of variation in developmental rates of growth and pigmentation, and their effects on survival in A. aquaticus in response to diet composition (stoichiometric quality and tryptophan availability). To do so, we exposed 1047 juvenile isopods from 29 families shortly after their birth (1-3 days) to four different dietary contrasts: high elemental ratios (C:P and C:N, hereafter low quality [LQ] diet) and low elemental ratios (hereafter high-quality diet [HQ]), as well as each of these diet combinations crossed with a supplement (or not) of tryptophan. We measured growth, pigmentation and survival of each individual over the course of 12 weeks. For each family, half of the juveniles were randomly assigned to either low or high diet quality (full sib / split family design). For the eight families with the highest number of offspring (50-60 juveniles), we crossed the diet-quality treatment with a supplemental tryptophan treatment: in these eight families, 40 juveniles were randomly distributed among high- and low-quality treatments, and the remaining 10-20 individuals among the two treatments with tryptophan supplement. 

We used juvenile isopods from a total of 29 successful matings (for details on isopod collection and breeding, and started the common garden experiment in three temporal blocks. Using small pipettes (for isopods bigger than ~5 mm we used soft steel forceps), we transferred an individual from its tube into a small container with lake water, and from there onto a flat tray containing lake water underneath a camera mounted on a camera stand. After taking the picture, we transferred each isopod into a new (autoclaved) tube with fresh lake water and a new food pellet. We repeated this procedure with every individual, yielding up to five phenotypic measurements for each developmental trajectory. We took pictures of isopods using a camera stand with a digital single lens reflex camera (Canon) and a 100- mm macro lens (Tamron). The tray was uniformly illuminated with an LED spot ring (Leica). 

To quantify pigmentation and body size of isopods from the digital images, we applied computer vision techniques. For this purpose, we used the python package phenopype ( It uses thresholding algorithms to segment isopods from the image background, to then extract the phenotypic information from the pixels marking the animal (dorsal region of isopod torso = carapace, excluding legs and antennae). The greyscale values from these pixels were averaged and converted to a pigmentation scale from 0 (greyscale value of 255) to 1 (greyscale value of 0). Body size was measured as carapace length, excluding legs and antennae. 
Statistical analyses 

Statistical analysis

Follow the script from top to bottom, do all steps to generate the following figures and accompanying statistics:

(Fig 2)

We tested for effects of diet composition and tryptophan supplement on developmental rates of body size and pigmentation, as well as survival over the course of the experiment using a series of generalized additive mixed models (GAM), using the “gamm” function in mgcv. We fit separate models each for body size (GAM1, Table1) and pigmentation (log transformed, GAM2), with time separated by diet contrast as the fixed effect and a thin plate spline term with time in weeks. Furthermore, we fit a GAM with a binomial distribution family to test for differences in survival as a binary dependent variable, and fixed effect and spline terms identical to the developmental rate models (GAM3, Table1). All three models contained nested random terms for family and individual, and used diet as a parametric component in the spline terms. 

(Fig 3)

In a further step, we tested for effects of diet composition and of juvenile phenotypes right after birth on growth and pigmentation rates and survival by performing a path analysis using Bayesian multilevel modelling. In a single model, we implemented three hierarchical levels, and included family as the grouping term, allowing us to estimate relative effect sizes of developmental rates and starting conditions on lifespan under all diet treatment contrasts (See supplement for details, Table S2). We applied both types of analysis in a complementary fashion: with separate additive models, we accounted for the nonlinearity in developmental rates, and with the path analysis we were able to disentangle complex interactions linking rearing conditions and juvenile traits through development with survival variation.

(Fig 4)

To test for interactions between growth and pigmentation on survival, we also applied a more complex multivariate GAM. To do so, we first converted measurements of body size and pigmentation up until week 6 (dashed line in figure 2) to a single linear slope per individual isopod (hereafter growth and pigmentation rate, respectively). We chose to calculate slopes from this time frame, because pigmentation and growth increased linearly to this point, and isopod survival up to this point was high. We then implemented an additive model (GAM4) with the “gam” function from mgcv, using lifespan (in weeks) as the dependent variable, single thin plate spline terms for growth and pigmentation rate, and a tensor smooth product term to test for the interaction (Table1). The model included family as a random effect, and the spline and tensor term included diet as a parametric component (See supplement for details).

Usage Notes

Here we provide the data obtained from the image analysis pipeline (using phenopype: We provide a script from which the figures can be reproduced as an entry point to the comprehensive dataset. See the readme on how to get started.