Skip to main content

Hamiltonian patterns of age-dependent adaptation to novel environments

Cite this dataset

Rutledge, Grant et al. (2020). Hamiltonian patterns of age-dependent adaptation to novel environments [Dataset]. Dryad.


Our intuitive understanding of adaptation by natural selection is dominated by the power of selection at early ages in large populations. Yet, as the forces of natural selection fall with adult age, we expect adaptation to be attenuated with age. Explicit simulations of age-dependent adaptation suggest that populations adapt to a novel environment quickly at early ages, but only slowly and incompletely at later adult ages. Experimental tests for age-dependent adaptation to a novel diet were performed on populations of Drosophila melanogaster. The results support the prediction that populations should perform better on an ancestral, long-standing diet, compared to an evolutionarily recent diet, only at later ages. D. melanogaster populations also perform poorly on a novel diet compared to an evolutionarily recent diet that has been sustained for hundreds of generations, particularly at earlier ages. Additional experiments demonstrate that the timing of the shift to a better performance in our populations on the long-standing diet is dependent on when the forces of natural selection weaken in the evolutionary history of experimental populations. Taken together, these experimental findings suggest that the forces of natural selection scale the rate of adaptation to novel environments. 



We used large, outbred populations of Drosophila melanogaster selected for two different patterns of age-specific reproduction. Five “ACO” replicates (ACO1-5) have been adapted to banana-molasses food for ~1000 generations and have a 10-day life cycle. Five “CO” replicates (CO1-5) have been adapted to banana-molasses food for ~500 generations and have a 28-day life cycle (S1 Fig). A more detailed and up-to-date description of the history and culture methods for the ACO and CO populations can be found in Burke et al. (2016). 

Experimental Design

A total of three diet-manipulation experiments were performed in the lab. 1. ACO replicate populations 1-5 were assayed on the apple and banana diets2. ACO replicate populations 1-3 were assayed on the banana and orange diets (ACO 4 and 5 were not used due to resource limitations at the time). 3. CO replicate populations 1-5 were assayed on the banana and apple diets. 

Food Preparation

The evolutionarily recent banana-molasses food given to fly cohorts is composed of the following ingredients per 1L distilled H20: 13.5g Apex Drosophila agar type II, 121g peeled, ripe organic banana, 10.8 mL light Karo corn syrup, 10.8mL dark Karo corn syrup, 16.1mL Eden organic barley malt syrup, 32.3g Red Star active dry yeast, 2.1g Sigma-Aldrich Methyl 4-hydroxybenzoate (anti-fungal), and 42.5 mL 95% ethanol. The novel orange food was prepared identically to the banana-molasses food except peeled banana was replaced with juice and pulp from peeled oranges. The long-ancestral apple food is prepared in the same manner as the banana food, except the diet lacks the barley malt and corn syrups, and we substitute organic peeled applesauce for the peeled banana.  This is our best emulation of the ancestral diet of our lab flies. Basic nutritional facets of each diet are shown in S1 Table. Our experimental cohorts are exposed to each of these foods throughout both their developmental stages and adulthood.

Mortality and Fecundity Assays

All populations were reared in polystyrene vials with the respective diet and given 9 (ACO) and 14 (CO) days to develop. Adult flies were transferred into 6L acrylic glass cages on the 9th (ACO) and 14th (CO) day using CO2 anesthesia and given fresh food every day with 1mL supplemented yeast (98mL distilled water, 2g active dry yeast, and 2mL 1% acetic acid). Individual mortality was assessed every 24 hours, the flies were sexed at death, and the observed cohort size was calculated from the complete recorded deaths. During the assay, flies were transferred to clean cages once a week using COanesthesia. Transferring was performed to prevent the buildup of feces, which made assessing mortality difficult and may have subjected flies to higher levels of ammonia. At the start of the assay, cohorts were assayed in 6L cages at ~1000 flies per cage. Flies were transferred to 3L cages at 50% starting cohort size to control for density effects. Age-specific fecundity was also assessed every 24-hours, being estimated from the number of eggs laid by females on the culture medium plates placed in each mortality assay cage, divided by the number of females still alive. Media plates were washed onto filter paper with the lab’s fecundity funnel system and then scanned for counting at a later time. Egg counting was performed using ImageJ (, a National Institute of Health validated image-processing program.

Statistical Analysis

pxmx analysis for ACO experiments

The age-specific survival probability (px) is the probability of a female surviving to age x, given that she survived to the start of the age-interval. It is calculated using the following equation:

px = 1- (d/ nx)  

where dx is the number of females that die at age xand nx is the number of females that were alive at the start of age xAge-specific fecundity (mx) is the average number of eggs laid per surviving female at age x. The product of these two variables gives an overall estimate of how cohorts of females are functioning at each age. In our experiments, the unit interval for x is a single day.

 For all three diets (banana, apple, and orange), pxmx remained roughly steady until a “breakday” when we see a linear decline in this parameter until day 39 (S2 Fig). The model we fit to this data was a three-parameter two-stage linear model with the following relationship between age (x) and pxmx:

 pxm= {a0, if x a; a+ a1 (x - a2), if x > a2 ,        

where a0 is the y-intercept of the first stage, ais the slope of the second stage, and ais the breakday. The model was fitted using all the pxmdata at each age starting on the first day of the assay (day 10 from egg). This model was fit to the data using a nonlinear least-squares function in the R-project for statistical computing (; version 3.3.3). We wrote a self-starting R-function for the two-stage linear model that provided initial estimates for the parameter values as well as the predicted pxmx from equation (2). A significance value of 0.05 (α) was used to test the null hypothesis that the slopes or y-intercepts of the two linear regressions for each diet for each regression analysis were not different. 

pxmx analysis for CO experiment

CO data did not follow the same trend as the ACO data and was thus analyzed using a different statistical approach. In this experiment, we tested for differences in pxmin seven five-day age-classes in CO populations exposed to the apple and banana diets. The observations consisted of pxmat an age (x) within an age-interval-k (k = 1, 2,…,7). Within each interval, pxmwas modeled by a straight-line allowing diet-j (j=1 for banana, or j=2 for apple) to affect the intercept, but not the slope of the line. The slope could vary between intervals. Populations-i (= 1, 2…,10) contributed random variation to these measures. With the notation above, the pxmat age (x), interval (k), diet (j), and population (i) is yijkx and can be described by,

yijkx = α + β+ δjγj + (ω + πkδk)+ δkδjμjk + ci + εijkx

where δs = 0 if = 1 and 1 otherwise, and ci and εijkx are independent standard normal random variables with variance σ2c and  σ2ε, respectively. The effects of diet on the intercept are assessed by considering the magnitude and variance of bothγj and μjk. Statistical computing was completed in R (; version 3.3.3).

px survivorship analysis

For each combination of treatment*sex, three-day survivorship intervals were computed in R (; version 3.3.3) [22]. For each interval a new categorical variable was then created, defining the status of each one of the flies (0 = dead or 1 = alive). The counts of each interval were used in a chi-square test to compare treatments (ACO banana vs. orange, ACO apple vs. banana, or CO apple vs. banana). A Bonferroni correction was applied to correct for the multiple age-classes per comparison. A p-value of less than 0.05 (α) was considered statistically significant. 


Undergraduate Research Opportunity Program (UROP)

United States Department of Education