DOI: 10.5061/dryad.2280gb5tc
title: Density-by-diet interactions during larval development shape adult life-history trait expression and fitness in a polyphagous fly

description: Habitat quality early in life determines individual fitness, with possible
 long-term evolutionary effects on groups and populations. In
 holometabolous insects, larval ecology plays a major role in determining
 the expression of traits in adulthood, but how ecological conditions
 during larval stage interact to shape adult life-history and fitness,
 particularly in non-model organisms, remains subject to scrutiny.
 Consequently, our knowledge of the interactive effects of ecological
 factors on insect development is limited. Here, using the polyphagous fly
 Bactrocera tryoni, we conducted a fully-factorial design where we
 manipulated larval density and larval diet (protein-rich, standard, and
 sugar-rich) to gain insights into how these ecological factors interact to
 modulate adult fitness. As expected, a protein-rich diet resulted in
 faster larval development, heavier and leaner adults that were more fecund
 compared with standard and sugar-rich diets, irrespective of larval
 density. Females from the protein-rich larval diet had overall higher
 reproductive rate (i.e., eggs per day) than females from other diets, and
 reproductive rate decreased linearly with density for females from the
 protein-rich but non-linearly for females from the standard and sugar-rich
 diets over time. Surprisingly, adult lipid reserve increased with larval
 density for adults from the sugar-rich diet (as opposed to decreasing, as
 in other diets), possibly due to a stress-response to an extremely adverse
 condition during development (i.e., high intraspecific competition and
 poor nutrition). Together, our results provide insights into how
 ecological factors early in life interact and shape the fate of
 individuals through life-stages in holometabolous insects.
description: The data has been collected at the controlled temperature rooms
 at Macquarie University in 2019. The data was collected by behavioural and
 physiological protocols detailed in the manuscript. Analysis were
 conducted in R, and the script to replicate the analysis is attached along
 with the raw data.
description: File names <b>Ahn_density_emergence
 rate_2019.csv: </b>Data for adult emergence
 <b>Ahn_density_fecundity_2019.csv: </b>Data for the
 measures of fecundity
 <b>Ahn_density_lipid_2019.csv: </b>Data for the
 measures of lipid content and body composition
 <b>Ahn_density_pupalweight_2019.csv: </b>Data for the
 measures of pupal weight
 <b>Anh_density_DeveTime_2019.csv:</b> Data for the
 measures of developmental time  
 Variables <b>Replicate:
 </b>Replicate number
 <b>Volume/egg_vol</b>: Egg volume used to create
 different densities <b>Density</b>: Factor
 with 5 levels, corresponding to the 5 densities used in each
 diet <b>Diet:</b> Factor with 3 levels,
 corresponding to the 3 diets used in the experiment
 <b>Id:</b> For cases where repeated measures of same
 population was performed (e.g., several individuals from the same
 replicate), we used ‘id’ to identify the measures. 
 <b>Day: </b>days of data collection (for temporal
 patterns, e.g., offspring production per day).
 <b>Sex: </b>sex of the individual
 <b>N_total:</b> total number of pupae
 <b>Num_male / num_female: </b>number of each sex
 emerging from the pupae (for the pupal experiment) and the number of adult
 individuals in the population (for the fecundity experiment)
 <b>Num_emerg:</b> total number of emergence
 <b>Female_male:</b> sex ratio, female divided by
 male <b>Num_eggs:</b> number of eggs
 produced by a population
 <b>Eggs_per_female:</b> standardized number of eggs
 by the number of the females present in the population
 <b>Wt0 and wt1:</b> dried weight before and after
 lipid extraction <b>Lipidwt:</b> difference
 between wt0 and wt1 <b>Prop_lipid:</b>
 proportion of lipid relative to initial body weight (i.e., lipidwt /
 wt0) <b>Pupal_weight:</b> weight of the
 pupae <b>First_jump, las_jump,
 interval_jump:</b> the time until the first and last larvae jump to
 pupation, and the difference in time between these two events.
 <b>First_emerg:</b> first adult emergence from
 pupae <b>Dev_time:</b> developmental time
 in days accounting for the interval between first and last larval
 jumps.