Data and code from: Room to breathe: Nutrition and developmental oxygen modulate the crowding effect on size in Drosophila melanogaster
Data files
Jul 16, 2026 version files 316.50 KB
-
data_analysis.Rmd
16.11 KB
-
experiment_1.csv
209.61 KB
-
experiment_2.csv
69.75 KB
-
pf_experiment.csv
12.54 KB
-
README.md
8.50 KB
Abstract
In a wide variety of animals, developmental crowding results in adults with smaller bodies. The crowding effect on body size in Drosophila melanogaster is canonically attributed to heightened competition for nutrition. However, whether other consequences of crowding also contribute to its effect on size remains an open question. We tested the relative contributions of nutritional competition, oxygen availability, and larval-generated metabolites to the crowding effect on size. We found that while nutrition explains most of the variation in body size due to crowding, oxygen also contributes in a sex- and nutrition-dependent manner. We found no evidence that larval-generated chemicals affect body size. These data confirm a widely suspected but untested role of nutrition in producing the crowding effect on size in D. melanogaster, while revealing an unexpected role of oxygen, and raise the possibility that behavior may be a mediator of density-dependent plasticity.
General information
Title of associated manuscript: Room to breathe: Nutrition and developmental oxygen modulate the crowding effect on size in Drosophila melanogaster
Authors: Cole Nicholls and Alexander Shingleton
Corresponding author / contact: Cole Nicholls, cnich@uic.edu
Date of data collection: August 2025 - March 2026
Study location: Department of Biological Sciences, University of Illinois Chicago
Summary: This dataset accompanies a study testing the relative contributions of nutritional competition, oxygen availability, and larval-generated metabolites to the crowding effect on body size (CES) in D. melanogaster. Data were collected across three experiments: (1) a factorial manipulation of oxygen, nutrition, and larval density; (2) a follow-up experiment targeting the interaction between oxygen and density in males reared on low nutrition; and (3) an experiment testing whether larval-conditioned medium affects body size.
File inventory
| File | Description |
|---|---|
experiment_1.csv |
Data from the initial factorial experiment (oxygen nutrition density sex) |
experiment_2.csv |
Data from the follow-up experiment testing oxygen density in males on low nutrition |
pf_experiment.csv |
Data from the larval-conditioned medium experiment |
data_analysis.Rmd |
R Markdown script containing all statistical analyses and figure generation |
Variable definitions
experiment_1.csv (2,738 individuals)
| Column | Description |
|---|---|
id |
Unique identifier for each individual pupa |
area |
Pupal case area, in µm2 |
pupal |
Natural-log-transformed pupal case area |
oxygen |
Developmental oxygen level: hypo = 15% O2, norm = 21% O2 (normoxia/ambient), hyper = 40% O2 |
nutrition |
Larval diet: low = 1:16 protein:carbohydrate ratio, high = 2:1 protein:carbohydrate ratio (recipes in manuscript Supplementary Table S1) |
density |
Larval density at the start of the experiment: 50, 125, or 200 larvae per vial |
sex |
female or male, determined at the pupal stage |
block |
Rearing block (1, 2, or 3); vials were reared in three sequential temporal blocks |
vial |
Vial identifier |
experiment_2.csv (946 individuals)
| Column | Description |
|---|---|
id |
Unique identifier for each individual pupa |
area |
Pupal case area, in in µm2 |
pupal |
Natural-log-transformed pupal case area |
oxygen |
Developmental oxygen level: hyper = 40% O2, norm = 21% O2 |
density |
Larval density: 50 or 125 larvae per vial |
sex |
female or male |
vial |
Vial identifier |
Note: all individuals in this file were reared on low nutrition (1:16 protein:carbohydrate); nutrition is therefore not a column in this file. This dataset was combined with the matching low-nutrition subset of experiment_1.csv for the combined analysis reported in the manuscript (Table 2).
pf_experiment.csv (228 individuals)
| Column | Description |
|---|---|
id |
Unique identifier for each individual pupa |
area |
Pupal case area, in µm2 |
pupal |
Natural-log-transformed pupal case area |
processed |
Larval-conditioned medium treatment: control = no conditioned medium added; low = 0.1 g conditioned medium added; high = 0.2 g conditioned medium added. |
sex |
female or male |
vial |
Vial identifier |
All individuals in this file were reared at low density (50 larvae/vial) on low-nutrition medium, per the manuscript Methods.
Methodological summary
Flies were from the Samarkand strain (Bloomington Drosophila Stock Center #4270), maintained at 25C and 21% O2 on standard yeast-sugar-carrageenan medium except where experimentally manipulated. Pupal case size was measured by imaging the dorsal aspect of each pupa (Leica DM6B) and measuring case area in ImageJ. Full rearing, treatment, and measurement protocols are described in the Methods section of the associated manuscript.
Software and reproducibility
Analyses were conducted using R version 4.6.0 (2026-04-24), aarch64-apple-darwin23
Packages used:
tidyverse 2.0.0 (ggplot2 4.0.3, dplyr 1.2.1, tidyr 1.3.2, readr 2.2.0, purrr 1.2.2, tibble 3.3.1, stringr 1.6.0, forcats 1.0.1, lubridate 1.9.5)
lme4 2.0-1
lmerTest 3.2-1
emmeans 2.0.3
flextable 0.9.11
ggsignif 0.6.4
ggtext 0.1.2
colorBlindness 0.1.9
Matrix 1.7-5
Correspondence between code and manuscript results
| Manuscript item | Source in Data_analysis.Rmd |
|---|---|
| Table 1 (initial model ANOVA) | "Initial experiment" model-fitting section |
| Table 2 (combined dataset ANOVA) | "Combined dataset" model-fitting section |
| Supplementary Table S2 (full initial ANOVA) | Untrimmed initial_model ANOVA output |
| Supplementary Table S3 (viability selection covariate) | final_model with survival_rate covariate |
| Figure 1b | "Figure 1" chunk |
| Figure 2 | "Figure 2" chunk |
| Supplementary Figure S1 | "Figure 3" chunk (post hoc initial-experiment contrasts) |
Data quality notes
No observations were excluded from the datasets as provided.
Contact
For questions about the data or code, please contact Cole Nicholls at cnich@uic.edu.
