# The transcriptomic signature of responses to larval crowding in Drosophila melanogaster

Juliano Morimoto, Marius Wenzel, Davina Derous, Youn Henry, H Colinet

► To cite this version:

Juliano Morimoto, Marius Wenzel, Davina Derous, Youn Henry, H Colinet. The transcriptomic sig-nature of responses to larval crowding in Drosophila melanogaster. Insect Science, 2023, 30 (2), pp.539-554. 10.1111/1744-7917.13113 . hal-03800186

HAL Id: hal-03800186

https://hal.science/hal-03800186

Submitted on 16 Feb 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# The transcriptomic signature of responses to larval crowding in Drosophila melanogaster

Juliano Morimoto, Marius Wenzel, Davina Derous, Youn Henry, H Colinet

► To cite this version:

Juliano Morimoto, Marius Wenzel, Davina Derous, Youn Henry, H Colinet. The transcriptomic sig-nature of responses to larval crowding in Drosophila melanogaster. Insect Science, 2023, 30 (2), pp.539-554. 10.1111/1744-7917.13113 . hal-03800186

HAL Id: hal-03800186

https://hal.science/hal-03800186v1

Submitted on 16 Feb 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
<figure><img src="image_2.png" /></figure>

*Insect Science* (2023) 30, 539–554, DOI 10.1111/1744-7917.13113

ORIGINAL ARTICLE

# The transcriptomic signature of responses to larval crowding in *Drosophila melanogaster*

Juliano Morimoto<fnref n="1" />,²,³ ID, Marius Wenzel<fnref n="1" />, Davina Derous<fnref n="1" />, Youn Henry⁴,⁵ and Herve Colinet⁴

**Abstract** Intraspecific competition at the larval stage is an important ecological factor affecting life-history, adaptation and evolutionary trajectory in holometabolous insects. However, the molecular pathways underpinning these ecological processes are poorly characterized. We reared *Drosophila melanogaster* at three egg densities (5, 60, and 300 eggs/mL) and sequenced the transcriptomes of pooled third-instar larvae. We also examined emergence time, egg-to-adult viability, adult mass, and adult sex-ratio at each density. Medium crowding had minor detrimental effects on adult phenotypes compared to low density and yielded 24 differentially expressed genes (DEGs), including several *chitinase* enzymes. In contrast, high crowding had substantial detrimental effects on adult phenotypes and yielded 2107 DEGs. Among these, upregulated gene sets were enriched in sugar, steroid and amino acid metabolism as well as DNA replication pathways, whereas down-regulated gene sets were enriched in ABC transporters, taurine, Toll/Imd signaling, and P450 xenobiotics metabolism pathways. Overall, our findings show that larval crowding has a large consistent effect on several molecular pathways (i.e., core responses) with few pathways displaying density-specific regulation (i.e., idiosyncratic responses). This provides important insights into how holometabolous insects respond to intraspecific competition during development.

**Key words** intraspecific competition; larval crowding; life-history; trade-offs; transcription

Introduction

Intraspecific competition is an important evolution-
ary force leading to local adaptation, niche expan-
sion and speciation through adaptive radiation (Grant,
1972; Werner & Sherry, 1987). Theoretical models have

Correspondence: Juliano Morimoto, School of Biological Sciences, University of Aberdeen, Tillydrone Avenue, AB24 2TZ, United Kingdom. Email: juliano.morimoto@abdn.ac.uk; Herve Colinet, School of Biological Sciences, University of Rennes, CNRS, ECOBIO (Ecosystèmes, biodiversité, évolution)—UMR 6553, F 35000 Rennes, France. Email: herve.colinet@univ-rennes1.fr

predicted—and empirical work has highlighted—that
adaptation to novel resources is a key mechanism through
which intraspecific competition affects niche expansion.
For instance, theory predicts that high intraspecific com-
petition in one niche or resource can lead to the in-
vasion of underexploited niches by maladapted pheno-
types (Wilson & Turelli, 1986) and that intraspecific
competition modulates the degree of individual resource
specialization within populations (Svanbäck & Bolnick,
2005). Supporting evidence for these models comes
from work in *Drosophila melanogaster*, where popula-
tions experiencing high intraspecific competition lev-
els adapt to cadmium-containing diets (a toxic com-
pound) more rapidly than populations experiencing low

<footnote n="1">¹School of Biological Sciences, University of Aberdeen, Aberdeen, United Kingdom; ²Programa de Pós-graduação em Ecologia e Conservação, Universidade Federal do Paraná, Curitiba, Brazil; ³Institute of Mathematics, King's CollegeUniversity of Aberdeen, Aberdeen, United Kingdom; ⁴CNRS, ECOBIO (Ecosystèmes, biodiversité, évolution)—UMR 6553University of Rennes, Rennes, France and ⁵Department of Ecology and Evolution, University of Lausanne, Lausanne, Switzerland</footnote>
<figure><img src="image_2.png" /></figure>

*Insect Science* (2023) 30, 539–554, DOI 10.1111/1744-7917.13113

ORIGINAL ARTICLE

# The transcriptomic signature of responses to larval crowding in *Drosophila melanogaster*

Juliano Morimoto<fnref n="1" />,²,³ ID, Marius Wenzel<fnref n="1" />, Davina Derous<fnref n="1" />, Youn Henry⁴,<fnref n="5" /> and Herve Colinet⁴

**Abstract** Intraspecific competition at the larval stage is an important ecological factor affecting life-history, adaptation and evolutionary trajectory in holometabolous insects. However, the molecular pathways underpinning these ecological processes are poorly characterized. We reared *Drosophila melanogaster* at three egg densities (5, 60, and 300 eggs/mL) and sequenced the transcriptomes of pooled third-instar larvae. We also examined emergence time, egg-to-adult viability, adult mass, and adult sex-ratio at each density. Medium crowding had minor detrimental effects on adult phenotypes compared to low density and yielded 24 differentially expressed genes (DEGs), including several *chitinase* enzymes. In contrast, high crowding had substantial detrimental effects on adult phenotypes and yielded 2107 DEGs. Among these, upregulated gene sets were enriched in sugar, steroid and amino acid metabolism as well as DNA replication pathways, whereas down-regulated gene sets were enriched in ABC transporters, taurine, Toll/Imd signaling, and P450 xenobiotics metabolism pathways. Overall, our findings show that larval crowding has a large consistent effect on several molecular pathways (i.e., core responses) with few pathways displaying density-specific regulation (i.e., idiosyncratic responses). This provides important insights into how holometabolous insects respond to intraspecific competition during development.

**Key words** intraspecific competition; larval crowding; life-history; trade-offs; transcription

**Introduction**

Intraspecific competition is an important evolutionary force leading to local adaptation, niche expansion and speciation through adaptive radiation (Grant, 1972; Werner & Sherry, 1987). Theoretical models have

Correspondence: Juliano Morimoto, School of Biological Sciences, University of Aberdeen, Tillydrone Avenue, AB24 2TZ, United Kingdom. Email: juliano.morimoto@abdn.ac.uk; Herve Colinet, School of Biological Sciences, University of Rennes, CNRS, ECOBIO (Ecosystèmes, biodiversité, évolution)—UMR 6553, F 35000 Rennes, France. Email: herve.colinet@univ-rennes1.fr

predicted—and empirical work has highlighted—that adaptation to novel resources is a key mechanism through which intraspecific competition affects niche expansion. For instance, theory predicts that high intraspecific competition in one niche or resource can lead to the invasion of underexploited niches by maladapted phenotypes (Wilson & Turelli, 1986) and that intraspecific competition modulates the degree of individual resource specialization within populations (Svanbäck & Bolnick, 2005). Supporting evidence for these models comes from work in *Drosophila melanogaster*, where populations experiencing high intraspecific competition levels adapt to cadmium-containing diets (a toxic compound) more rapidly than populations experiencing low

<footnote n="1">¹School of Biological Sciences, University of Aberdeen, Aberdeen, United Kingdom; ²Programa de Pós-graduação em Ecologia e Conservação, Universidade Federal do Paraná, Curitiba, Brazil; ³Institute of Mathematics, King's CollegeUniversity of Aberdeen, Aberdeen, United Kingdom; ⁴CNRS, ECOBIO (Ecosystèmes, biodiversité, évolution)—UMR 6553University of Rennes, Rennes, France and</footnote>

<footnote n="5">⁵Department of Ecology and Evolution, University of Lausanne, Lausanne, Switzerland</footnote>
intraspecific competition levels (Bolnick, 2001). Similar patterns have been found in other species including tadpoles (Levis et al., 2020), sticklebacks (Svanbäck & Bolnick, 2007), bees (Fontaine et al., 2008) and beetles (Agashe & Bolnick, 2010), although in the latter species the pattern is less clear (Parent et al., 2014).

In holometabolous insects, intraspecific competition is likely to be the strongest at the larval stage because of the underlying assumption that insect larvae are often much less mobile than adults (see e.g., Jones, 1977; Hansen et al., 1984; Markow, 2015, but also Goddard et al., 2020) and reliant primarily upon female oviposition site choices for feeding (Thompson, 1988; Larsson & Ekbom, 1995; Gripenberg et al., 2010). In this case, intraspecific competition at the larval stage can trigger positive and negative responses that can carry-over to adult stage and modulate fitness. On the one hand, high intraspecific competition at the larval stage beyond natural levels ("overcrowding") increases stress-tolerance through hormesis-like responses (Henry et al., 2018; Lushchak et al., 2019), which may result in longer adult lifespan (Shenoi et al., 2016). Moreover, experimental evolution studies in D. melanogaster have also found that populations adapt to higher intraspecific competition at the larval stage by increasing thermal tolerance, feeding rates and tolerance to toxic compounds (e.g., urea) (Bubli et al., 1998; Borash et al., 2000; Mueller et al., 2005; Shakarad et al., 2005), which can be interpreted as a plausible proximate explanation for the diet niche expansion in high intraspecific competition populations (Bolnick 2001). Similar effects have been described in other drosophilids (Nagarajan et al., 2016). On the other hand, overcrowding constrains the availability of nutrients per capita, thereby constraining larval growth as well as adult morphology, behavior and fitness (Klepsatel et al., 2018; Than et al., 2020). In D. melanogaster, larvae developing in overcrowded conditions have unfavorable phenotypes that resemble those of individuals in protein-deficient larval diets (Klepsatel et al., 2018), suggesting that overcrowding strengthens the competition for nutrients and limits the availability of protein, which is essential for larval growth and adult reproduction. Moreover, overcrowding is also known to modulate the bacterial composition of the diet in which larvae are feeding which can affect pathogenicity of substrate, larval behavior, and life-history traits (Wong et al., 2017; Henry et al., 2020). Similar effects were described in the tephritid fruit fly *B. tryoni* (Nguyen et al., 2019) and other insects (reviewed by Than et al., 2020). Although these examples highlight that physiological responses to crowding induce a range

of phenotypic changes that can facilitate or hinder the survival and adaptation to local conditions, we know very little of the global gene expression patterns that underpin the responses to overcrowding. Previous target studies have examined molecular responses using only few candidate genes (Henry et al., 2018; Lushchak et al., 2019; Borash et al., 2000), which precludes our understanding of broad gene expression profiles that shape the entire suite of phenotypic responses to overcrowding. For example, Henry et al. (2018) and Sørensen & Loeschcke (2001) found higher relative expression of *Hsp70* and/or *Hsp40*, which is a sign of oxidative stress, in overcrowded conditions. Oxidative stress modulates a range of physiological responses that influence life-history traits, but we do not know the knock-on effects of higher oxidative stress on broader physiological processes. As a result, we lack a proper understanding of pleiotropic constraints and physiological trade-offs that can affect plastic and evolutionary responses to overcrowding and can in turn, modulate life-histories, niche expansion and ecological specialization (Kawecki, 2008; Poisot et al., 2011; Remold, 2012).

Here we address this knowledge gap by identifying for the first time the molecular basis of larval responses to overcrowding in a controlled experiment. We manipulated the intraspecific competition at the larval stage of *D. melanogaster* individuals using three larval density treatments (Henry et al., 2018; Henry et al., 2020) and investigated the global transcriptomic response to overcrowding. We used three larval crowding levels, one of which is within the natural range of larval crowding observed in nature and two crowding levels which are beyond the larval crowding found in nature, providing us with the opportunity to explore the molecular responses to extreme crowding (Morimoto & Pietras, 2020). *Drosophila melanogaster* is the ideal model system to investigate the molecular responses to overcrowding for several reasons. First, *Drosophila* larvae are thought to be relatively immobile and, therefore, strongly influenced by interspecific competition (Markow, 2015; Morimoto & Pietras, 2020). Second, larval density modulates a range of fitness-related traits in both positive (e.g., hormesis-like) and negative (e.g., lower mating success) manners (Borash et al., 2000; Henry et al., 2018; Lushchak et al., 2019; Henry et al., 2020). Third, responses to overcrowding modulate the strength of selection and can have intergenerational effects in *D. melanogaster* groups (Morimoto et al., 2016; Morimoto et al., 2017). Lastly, responses to crowding are involved in increased larval competitive abilities that can result in niche expansion in evolutionary experiments in this model (Bolnick, 2001; Shenoi et al., 2016). Table 1 shows our
intraspecific competition levels (Bolnick, 2001). Similar patterns have been found in other species including tadpoles (Levis *et al.*, 2020), sticklebacks (Svanbäck & Bolnick, 2007), bees (Fontaine *et al.*, 2008) and beetles (Agashe & Bolnick, 2010), although in the latter species the pattern is less clear (Parent *et al.*, 2014).

In holometabolous insects, intraspecific competition is likely to be the strongest at the larval stage because of the underlying assumption that insect larvae are often much less mobile than adults (see e.g., Jones, 1977; Hansen *et al.*, 1984; Markow, 2015, but also Goddard *et al.*, 2020) and reliant primarily upon female oviposition site choices for feeding (Thompson, 1988; Larsson & Ekbom, 1995; Gripenberg *et al.*, 2010). In this case, intraspecific competition at the larval stage can trigger positive and negative responses that can carry-over to adult stage and modulate fitness. On the one hand, high intraspecific competition at the larval stage beyond natural levels (“overcrowding”) increases stress-tolerance through hormesis-like responses (Henry *et al.*, 2018; Lushchak *et al.*, 2019), which may result in longer adult lifespan (Shenoi *et al.*, 2016). Moreover, experimental evolution studies in *D. melanogaster* have also found that populations adapt to higher intraspecific competition at the larval stage by increasing thermal tolerance, feeding rates and tolerance to toxic compounds (e.g., urea) (Bubli *et al.*, 1998; Borash *et al.*, 2000; Mueller *et al.*, 2005; Shakarad *et al.*, 2005), which can be interpreted as a plausible proximate explanation for the diet niche expansion in high intraspecific competition populations (Bolnick 2001). Similar effects have been described in other drosophilids (Nagarajan *et al.*, 2016). On the other hand, overcrowding constrains the availability of nutrients *per capita*, thereby constraining larval growth as well as adult morphology, behavior and fitness (Klepsatel *et al.*, 2018; Than *et al.*, 2020). In *D. melanogaster*, larvae developing in overcrowded conditions have unfavorable phenotypes that resemble those of individuals in protein-deficient larval diets (Klepsatel *et al.*, 2018), suggesting that overcrowding strengthens the competition for nutrients and limits the availability of protein, which is essential for larval growth and adult reproduction. Moreover, overcrowding is also known to modulate the bacterial composition of the diet in which larvae are feeding which can affect pathogenicity of substrate, larval behavior, and life-history traits (Wong *et al.*, 2017; Henry *et al.*, 2020). Similar effects were described in the tephritid fruit fly *B. tryoni* (Nguyen *et al.*, 2019) and other insects (reviewed by Than *et al.*, 2020). Although these examples highlight that physiological responses to crowding induce a range

of phenotypic changes that can facilitate or hinder the survival and adaptation to local conditions, we know very little of the global gene expression patterns that underpin the responses to overcrowding. Previous target studies have examined molecular responses using only few candidate genes (Henry *et al.*, 2018; Lushchak *et al.*, 2019; Borash *et al.*, 2000), which precludes our understanding of broad gene expression profiles that shape the entire suite of phenotypic responses to overcrowding. For example, Henry *et al.* (2018) and Sørensen & Loeschcke (2001) found higher relative expression of *Hsp70* and/or *Hsp40*, which is a sign of oxidative stress, in overcrowded conditions. Oxidative stress modulates a range of physiological responses that influence life-history traits, but we do not know the knock-on effects of higher oxidative stress on broader physiological processes. As a result, we lack a proper understanding of pleiotropic constraints and physiological trade-offs that can affect plastic and evolutionary responses to overcrowding and can in turn, modulate life-histories, niche expansion and ecological specialization (Kawecki, 2008; Poisot *et al.*, 2011; Remold, 2012).

Here we address this knowledge gap by identifying for the first time the molecular basis of larval responses to overcrowding in a controlled experiment. We manipulated the intraspecific competition at the larval stage of *D. melanogaster* individuals using three larval density treatments (Henry *et al.*, 2018; Henry *et al.*, 2020) and investigated the global transcriptomic response to overcrowding. We used three larval crowding levels, one of which is within the natural range of larval crowding observed in nature and two crowding levels which are beyond the larval crowding found in nature, providing us with the opportunity to explore the molecular responses to extreme crowding (Morimoto & Pietras, 2020). *Drosophila melanogaster* is the ideal model system to investigate the molecular responses to overcrowding for several reasons. First, *Drosophila* larvae are thought to be relatively immobile and, therefore, strongly influenced by interspecific competition (Markow, 2015; Morimoto & Pietras, 2020). Second, larval density modulates a range of fitness-related traits in both positive (e.g., hormesis-like) and negative (e.g., lower mating success) manners (Borash *et al.*, 2000; Henry *et al.*, 2018; Lushchak *et al.*, 2019; Henry *et al.*, 2020). Third, responses to overcrowding modulate the strength of selection and can have intergenerational effects in *D. melanogaster* groups (Morimoto *et al.*, 2016; Morimoto *et al.*, 2017). Lastly, responses to crowding are involved in increased larval competitive abilities that can result in niche expansion in evolutionary experiments in this model (Bolnick, 2001; Shenoi *et al.*, 2016). Table 1 shows our
<table><caption>**Table 1** Predictions for the effects of larval crowding.</caption><thead><tr><td>Predictions</td><td>Literature</td></tr></thead><tbody><tr><td>Downregulation of metabolic pathways linked to dietary protein (e.g., TOR) due to protein limitation caused by high larval density (Prediction 1)</td><td>Klepsatel et al. (2018)</td></tr><tr><td>Upregulation of immunity due to density-dependent prophylaxis observed in other insects as well as upregulation of pathways related to survival (e.g., autophagy) if density-dependent responses increase survival (Prediction 2)</td><td>Schmid-Hempel (2003); Siva-Jothy et al. (2005); Shenoi et al. (2016); Kapila et al. (2021)</td></tr><tr><td>Upregulation of stress-related pathways (e.g., heat-shock proteins) as an hormesis-like response to overcrowding (Prediction 3)</td><td>Henry et al. (2018); Lushchak et al. (2019)</td></tr><tr><td>No change or downregulation of pathways involved in reproduction (e.g., spermatogenesis) although some insects respond to high larval density by increasing testis sizes relative to body mass</td><td>McGraw et al. (2007); Johnson et al. (2017); Than et al. (2020); Morimoto et al. (2021)</td></tr></tbody></table>

predictions for the highest density treatment based on the literature.

## Materials and methods

### Larval density manipulation and adult phenotyping

We used an outbred laboratory population of *D. melanogaster* established from wild individuals collected in September 2015 in Rennes, Brittany (France). Fly stocks were maintained, and all experiments conducted, at 25 °C and 70% relative humidity (12 h light : 12 h darkness) on standard food comprising inactive brewer's yeast (MP Bio 029 033 1205, MP Bio, 80 g/L), sucrose (50 g/L), agar (Sigma-Aldrich A1296, 10 g/L) and supplemented with anti-mold Nipagin (Sigma-Aldrich H5501; 10% 8 mL/L). Adult flies from rearing stocks were allowed to lay eggs for less than 12 h on standard food supplemented with extra agar (15 g/L) and food dye. Eggs were collected with a paint brush, counted on moistened fabric and then transferred into new vials (50 mL; diameter = 23 mm) with 2.0 mL of standard food. We created three larval density treatments known to show contrasting phenotypes: L (low density; 5 eggs/mL), M (medium density; 60 eggs/mL), and H (high density; 300 eggs/mL) (see Henry *et al.*, 2018, 2020). Egg manipulation was performed identically in all treatments and we standardized time spent under the stereomicroscope to 15 min to eliminate handling effects on the experiment. Eggs were allowed to hatch and larvae were allowed to develop until the wandering stage (third-instar larvae). At this precise point, we collected three replicates of 10 larvae per density treatment from independent vials ($N_{larvae} = 90$; $N_{replicates} = 9$) into cryotubes, which were snap-frozen in liquid nitrogen and stored at -80 °C. Due to the lack of sex-specific phenotypic mark-

ers such as size and coloration (as seen in adults), larvae were selected without consideration of sex. We kept some vials unsampled (20, 2, and 2, respectively, for conditions L, M, and H) and allowed the flies to complete development until the adult stage in order to assess the viability, the development time, and the sex ratio. This was done to avoid any small sampling effects on the crowding of the developing larvae. Recently emerged adults (<24 h) were placed in single-sex vials with fresh food for three days before freezing at -20 °C. Thirty males and 30 females per larval density treatment were then randomly collected, dried for one week at 60 °C and weighed in a microbalance (Mettler Toledo UMX2, Mettler Toledo, Greifensee, Switzerland; accurate to 1 µg). We examined effects of larval density on adult weight using generalized linear models (GLM) with Gaussian distribution followed by Student–Newman–Keuls post hoc tests using the *agricolae* package (De Mendiburu, 2014). Sexes were analyzed separately and *P*-values were obtained from *F*-statistics.

### Larval transcriptome sequencing

Larval samples were ground to fine powder in 1.5 mL tubes placed in liquid nitrogen. Samples were mixed with 500 µL of lysis buffer (containing 1% β-mercaptoethanol) from Nucleospin® RNA extraction kits (Macherey-Nagel GmbH & Co. KG, Düren, Germany) and vortexed to complete homogenization. RNA extraction and purification were performed using Nucleospin® RNA columns (Macherey-Nagel) according to manufacturer's instructions. Total RNA was eluted in 50 µL of RNase-free water. RNA was quantified and quality-checked using the NanoDrop ND-1000 spectrophotometer (NanoDrop Technologies, USA) and by running 200 ng of total RNA on 1%
<table><caption>**Table 1** Predictions for the effects of larval crowding.</caption><thead><tr><td>Predictions</td><td>Literature</td></tr></thead><tbody><tr><td>Downregulation of metabolic pathways linked to dietary protein (e.g., TOR) due to protein limitation caused by high larval density (Prediction 1)</td><td>Klepsatel et al. (2018)</td></tr><tr><td>Upregulation of immunity due to density-dependent prophylaxis observed in other insects as well as upregulation of pathways related to survival (e.g., autophagy) if density-dependent responses increase survival (Prediction 2)</td><td>Schmid-Hempel (2003); Siva-Jothy et al. (2005); Shenoi et al. (2016); Kapila et al. (2021)</td></tr><tr><td>Upregulation of stress-related pathways (e.g., heat-shock proteins) as an hormesis-like response to overcrowding (Prediction 3)</td><td>Henry et al. (2018); Lushchak et al. (2019)</td></tr><tr><td>No change or downregulation of pathways involved in reproduction (e.g., spermatogenesis) although some insects respond to high larval density by increasing testis sizes relative to body mass</td><td>McGraw et al. (2007); Johnson et al. (2017); Than et al. (2020); Morimoto et al. (2021)</td></tr></tbody></table>

predictions for the highest density treatment based on the literature.

## Materials and methods

### Larval density manipulation and adult phenotyping

We used an outbred laboratory population of *D. melanogaster* established from wild individuals collected in September 2015 in Rennes, Brittany (France). Fly stocks were maintained, and all experiments conducted, at 25 °C and 70% relative humidity (12 h light : 12 h darkness) on standard food comprising inactive brewer's yeast (MP Bio 029 033 1205, MP Bio, 80 g/L), sucrose (50 g/L), agar (Sigma-Aldrich A1296, 10 g/L) and supplemented with anti-mold Nipagin (Sigma-Aldrich H5501; 10% 8 mL/L). Adult flies from rearing stocks were allowed to lay eggs for less than 12 h on standard food supplemented with extra agar (15 g/L) and food dye. Eggs were collected with a paint brush, counted on moistened fabric and then transferred into new vials (50 mL; diameter = 23 mm) with 2.0 mL of standard food. We created three larval density treatments known to show contrasting phenotypes: L (low density; 5 eggs/mL), M (medium density; 60 eggs/mL), and H (high density; 300 eggs/mL) (see Henry *et al.*, 2018, 2020). Egg manipulation was performed identically in all treatments and we standardized time spent under the stereomicroscope to 15 min to eliminate handling effects on the experiment. Eggs were allowed to hatch and larvae were allowed to develop until the wandering stage (third-instar larvae). At this precise point, we collected three replicates of 10 larvae per density treatment from independent vials ($N_{larvae} = 90$; $N_{replicates} = 9$) into cryotubes, which were snap-frozen in liquid nitrogen and stored at -80 °C. Due to the lack of sex-specific phenotypic mark-

ers such as size and coloration (as seen in adults), larvae were selected without consideration of sex. We kept some vials unsampled (20, 2, and 2, respectively, for conditions L, M, and H) and allowed the flies to complete development until the adult stage in order to assess the viability, the development time, and the sex ratio. This was done to avoid any small sampling effects on the crowding of the developing larvae. Recently emerged adults (<24 h) were placed in single-sex vials with fresh food for three days before freezing at -20 °C. Thirty males and 30 females per larval density treatment were then randomly collected, dried for one week at 60 °C and weighed in a microbalance (Mettler Toledo UMX2, Mettler Toledo, Greifensee, Switzerland; accurate to 1 µg). We examined effects of larval density on adult weight using generalized linear models (GLM) with Gaussian distribution followed by Student–Newman–Keuls post hoc tests using the *agricolae* package (De Mendiburu, 2014). Sexes were analyzed separately and *P*-values were obtained from *F*-statistics.

### Larval transcriptome sequencing

Larval samples were ground to fine powder in 1.5 mL tubes placed in liquid nitrogen. Samples were mixed with 500 µL of lysis buffer (containing 1% β-mercaptoethanol) from Nucleospin® RNA extraction kits (Macherey-Nagel GmbH & Co. KG, Düren, Germany) and vortexed to complete homogenization. RNA extraction and purification were performed using Nucleospin® RNA columns (Macherey-Nagel) according to manufacturer's instructions. Total RNA was eluted in 50 µL of RNase-free water. RNA was quantified and quality-checked using the NanoDrop ND-1000 spectrophotometer (NanoDrop Technologies, USA) and by running 200 ng of total RNA on 1%
agarose gel. Quality control was also performed by Agilent Bioanalyzer Picochip (Agilent, Palo Alto, CA) which ensured high quality of all extractions (Fig. S1). Illumina TruSeq stranded mRNA-Seq libraries were prepared and sequenced on an Illumina HiSeq 2500 instrument (Eurofins Genomics, Ebersberg, Germany), generating 100 bp paired-end reads.

The quality of the raw reads was examined in FASTQC 0.11 (Andrews 2010) and MULTIQC 1.7 (Ewels et al., 2016). Bases with a phred score below 20 and Illumina adapter read-through of at least 3 bp were trimmed from the 3' end using TRIMGALORE 0.6.4 (Krueger, 2015). Trimmed reads were aligned to the *D. melanogaster* release 6 genome (GCF_000001215.4) using HISAT 2.1.0 (Kim et al., 2019) and alignments were processed using SAMTOOLS 1.9 (Li et al., 2009). To estimate the fraction of males in each larval pool, we obtained read coverage per chromosome using QUALIMAP 2.2.1 (Okonechnikov et al., 2016), standardized coverage to exome size as obtained from exon annotations using BEDTOOLS 2.28 (Quinlan & Hall, 2010) and calculated relative Y-chromosome coverage [Y/(X + Y)], expected to range from 0 (no males) to 0.5 (all males) (Palmer et al., 2019).

*Differential gene expression*

Read alignments were quantified against exon annotations and summarized at the gene level using FEA-TURECOUNTS 1.6.2 (Liao *et al.*, 2014), considering only concordantly mapped read pairs and assigning mult timappers as fractional counts to all mapping locations to avoid multicopy gene families dropping out of the analysis. Differential gene expression analysis among the three treatment groups was carried out with *DESeq2* 1.26.0 (Love *et al.*, 2014) in R 3.6.1 (R Core Team, 2019), shrinking fold-changes of low-count genes using the *apeglm* method (Zhu *et al.*, 2019). To account for con-founding differences in sex-specific trade-off responses (Magwere *et al.*, 2004) due to varying sex-ratios among pools, the model incorporated relative Y-chromosome coverage as a covariate. Differentially expressed genes (DEGs) were selected at an FDR-corrected (Benjamini & Hochberg 1995) *P*-value cut-off (*q*-value) of 0.05 and an absolute fold-change cut-off of at least 1.5×. Over-laps of DEG lists between the three contrasts were in-spected using intersection plots generated using *UpsetR* 1.4.0 (Conway *et al.*, 2017). Expression heatmaps were constructed using *gplots* in R (Warnes *et al.*, 2016). To validate RNAseq data, expression levels of 20 candi-date DEGs were assessed with RT-qPCRs using the same (reverse-transcribed) RNA extracts (Table S1).

*KEGG pathway and GeneOntology annotation and enrichment*

We assigned KEGG pathway annotations to each gene using the KEGG pathway database (https://www.genome.jp/kegg/pathway.html) API as implemented in CLUSTERPROFILER 3.14.3 (Yu *et al.*, 2012). Gene names were converted to NCBI ENTREZ identifiers using the Bioconductor org.Dm.eg.db_3.10.0 database. We first examined the fold-change distributions of genes within each of the five main KEGG classes (Cellular Processes, Environmental Information Processing, Genetic Information Processing, Metabolism and Organismal Systems) and compared medians using the Kruskal–Wallis test. Second, we calculated the root-sum-square of fold-changes within each KEGG class (regulation score). Third, we tested for significant functional overrepresentation of individual KEGG pathways against the *D. melanogaster* whole-genome background among sets of DEGs common across or idiosyncratic to specific density contrasts. Significantly overrepresented KEGG pathways were selected at an FDR-corrected *P*-value cut-off (*q*-value) of 0.05. Finally, we constructed a network illustrating the overlap in genes between the significantly enriched KEGG pathways in Cytoscape version 3.7.1 with the plugin EnrichmentMap (default analysis type setting) (Shannon *et al.*, 2003; Merico *et al.*, 2010). Overrepresentation of GeneOntology (GO) terms in the biological process ontology was examined using CLUSTERPROFILER, keeping terms at GO levels 1–4 and clustering terms by semantic similarity based on a Wang distance cutoff of 0.5 (Wang *et al.*, 2007) and retaining the term with the lowest *P*-value in each cluster.

## Results

*Larval density effects on adult phenotypes*

We subjected *D. melanogaster* larvae to three density treatments (low density; 5 eggs/mL), M (medium density; 60 eggs/mL), and H (high density; 300 eggs/mL) and examined whether developmental time, adult body weight, and sex ratio at emergence differed between treatments. Larval density affected the development dynamics, with individuals from the H treatment taking longer to reach adulthood than those from L and M (*t*-test, both adjusted *P* < 0.001) (Fig. 1A). Viability from egg to adult was also impaired at higher densities, dropping from 76% (CI95: 69–88) in L to 73% (CI95: 67–76) in M and to 46% (CI95: 43–48) in H (Fig. 1B). The sex-ratio of adult flies was slightly skewed toward females in all densities,
agarose gel. Quality control was also performed by Agilent Bioanalyzer Picochip (Agilent, Palo Alto, CA) which ensured high quality of all extractions (Fig. S1). Illumina TruSeq stranded mRNA-Seq libraries were prepared and sequenced on an Illumina HiSeq 2500 instrument (Eurofins Genomics, Ebersberg, Germany), generating 100 bp paired-end reads.

The quality of the raw reads was examined in FASTQC 0.11 (Andrews 2010) and MULTIQC 1.7 (Ewels et al., 2016). Bases with a phred score below 20 and Illumina adapter read-through of at least 3 bp were trimmed from the 3' end using TRIMGALORE 0.6.4 (Krueger, 2015). Trimmed reads were aligned to the *D. melanogaster* release 6 genome (GCF_000001215.4) using HISAT 2.1.0 (Kim et al., 2019) and alignments were processed using SAMTOOLS 1.9 (Li et al., 2009). To estimate the fraction of males in each larval pool, we obtained read coverage per chromosome using QUALIMAP 2.2.1 (Okonechnikov et al., 2016), standardized coverage to exome size as obtained from exon annotations using BEDTOOLS 2.28 (Quinlan & Hall, 2010) and calculated relative Y-chromosome coverage [Y/(X + Y)], expected to range from 0 (no males) to 0.5 (all males) (Palmer et al., 2019).

## Differential gene expression

Read alignments were quantified against exon annotations and summarized at the gene level using FEA-TURECOUNTS 1.6.2 (Liao et al., 2014), considering only concordantly mapped read pairs and assigning multimappers as fractional counts to all mapping locations to avoid multicopy gene families dropping out of the analysis. Differential gene expression analysis among the three treatment groups was carried out with *DESeq2* 1.26.0 (Love et al., 2014) in R 3.6.1 (R Core Team, 2019), shrinking fold-changes of low-count genes using the *apeglm* method (Zhu et al., 2019). To account for confounding differences in sex-specific trade-off responses (Magwere et al., 2004) due to varying sex-ratios among pools, the model incorporated relative Y-chromosome coverage as a covariate. Differentially expressed genes (DEGs) were selected at an FDR-corrected (Benjamini & Hochberg 1995) *P*-value cut-off (*q*-value) of 0.05 and an absolute fold-change cut-off of at least 1.5×. Overlaps of DEG lists between the three contrasts were inspected using intersection plots generated using *UpsetR* 1.4.0 (Conway et al., 2017). Expression heatmaps were constructed using *gplots* in R (Warnes et al., 2016). To validate RNAseq data, expression levels of 20 candidate DEGs were assessed with RT-qPCRs using the same (reverse-transcribed) RNA extracts (Table S1).

## KEGG pathway and GeneOntology annotation and enrichment

We assigned KEGG pathway annotations to each gene using the KEGG pathway database (https://www.genome.jp/kegg/pathway.html) API as implemented in CLUSTERPROFILER 3.14.3 (Yu et al., 2012). Gene names were converted to NCBI ENTREZ identifiers using the Bioconductor org.Dm.eg.db_3.10.0 database. We first examined the fold-change distributions of genes within each of the five main KEGG classes (Cellular Processes, Environmental Information Processing, Genetic Information Processing, Metabolism and Organismal Systems) and compared medians using the Kruskal-Wallis test. Second, we calculated the root-sum-square of fold-changes within each KEGG class (regulation score). Third, we tested for significant functional overrepresentation of individual KEGG pathways against the *D. melanogaster* whole-genome background among sets of DEGs common across or idiosyncratic to specific density contrasts. Significantly overrepresented KEGG pathways were selected at an FDR-corrected *P*-value cut-off (*q*-value) of 0.05. Finally, we constructed a network illustrating the overlap in genes between the significantly enriched KEGG pathways in Cytoscape version 3.7.1 with the plugin EnrichmentMap (default analysis type setting) (Shannon et al., 2003; Merico et al., 2010). Overrepresentation of GeneOntology (GO) terms in the biological process ontology was examined using CLUSTERPROFILER, keeping terms at GO levels 1-4 and clustering terms by semantic similarity based on a Wang distance cutoff of 0.5 (Wang et al., 2007) and retaining the term with the lowest *P*-value in each cluster.

## Results

### Larval density effects on adult phenotypes

We subjected *D. melanogaster* larvae to three density treatments (low density; 5 eggs/mL), M (medium density; 60 eggs/mL), and H (high density; 300 eggs/mL) and examined whether developmental time, adult body weight, and sex ratio at emergence differed between treatments. Larval density affected the development dynamics, with individuals from the H treatment taking longer to reach adulthood than those from L and M (*t*-test, both adjusted *P* < 0.001) (Fig. 1A). Viability from egg to adult was also impaired at higher densities, dropping from 76% (CI95: 69–88) in L to 73% (CI95: 67–76) in M and to 46% (CI95: 43–48) in H (Fig. 1B). The sex-ratio of adult flies was slightly skewed toward females in all densities,
<figure><img src="image_3.png" /><figcaption>**Fig. 1** Effects of larval density on adult phenotypes. (A) Adult emergence dynamics time. (B) Egg to adult viability. (C) Proportion of females in emergent adults. (D) Body mass. Three larval densities were tested: L (low density; 5 eggs/mL; in gray), M (medium density; 60 eggs/mL; in orange) and H (high density; 300 eggs/mL; in red). Error bars in B are 95% confidence intervals.</figcaption></figure>

ranging from 56% in L to 64% in H (Fig. 1C). Larval density significantly affected both females' ($F_{2,87} = 261.54; P < 0.001$) and males' ($F_{2,87} = 319.18; P < 0.001$) dry body mass, whereby the H treatment generated adults that were significantly lighter than adults from L or M treatments (Fig. 1D). These observations confirm that the H treatment was a resource-limiting and potentially stressful developmental environment for individuals, while the medium-density treatment had only minor effects.

## Larval density effects on larval transcriptional patterns

Having confirmed our phenotypic effects of our larval manipulation, we then investigated the associated transcriptional responses to larval crowding in three lar-

val pools per treatment. We generated 18 988 311 to 28 154 203 high-quality read pairs per pool, of which 97.4%–97.8% aligned to the genome and 82.3%–86.9% of alignments (including 6.9% to 11.5% from multimapping reads) were quantified against gene annotations (Table S2). The reads covered 91.3% of the 17 759 annotated reference genes; ignoring multimapping reads decreased this proportion to 90.9% and had no effect on the interpretation of the results. To estimate sex ratio in each pool, we identified relative Y-chromosome coverage, which ranged from 0.09 to 0.54 (suggesting 2–10 males per pool; Table S2) and varied among density groups ($F_{2,6} = 7.57; P = 0.02$). Principal component analysis (PCA) on the variance-stabilized normalized read counts showed clear separation between the three larval density groups on the first axis
<figure><img src="image_3.png" /><figcaption>**Fig. 1** Effects of larval density on adult phenotypes. (A) Adult emergence dynamics time. (B) Egg to adult viability. (C) Proportion of females in emergent adults. (D) Body mass. Three larval densities were tested: L (low density; 5 eggs/mL; in gray), M (medium density; 60 eggs/mL; in orange) and H (high density; 300 eggs/mL; in red). Error bars in B are 95% confidence intervals.</figcaption></figure>

ranging from 56% in L to 64% in H (Fig. 1C). Larval density significantly affected both females' ($F_{2,87}$ = 261.54; $P < 0.001$) and males' ($F_{2,87}$ = 319.18; $P < 0.001$) dry body mass, whereby the H treatment generated adults that were significantly lighter than adults from L or M treatments (Fig. 1D). These observations confirm that the H treatment was a resource-limiting and potentially stressful developmental environment for individuals, while the medium-density treatment had only minor effects.

## Larval density effects on larval transcriptional patterns

Having confirmed our phenotypic effects of our larval manipulation, we then investigated the associated transcriptional responses to larval crowding in three lar-

val pools per treatment. We generated 18 988 311 to 28 154 203 high-quality read pairs per pool, of which 97.4%–97.8% aligned to the genome and 82.3%–86.9% of alignments (including 6.9% to 11.5% from multimap-ping reads) were quantified against gene annotations (Table S2). The reads covered 91.3% of the 17 759 an-notated reference genes; ignoring multimapping reads decreased this proportion to 90.9% and had no effect on the interpretation of the results. To estimate sex ra-tio in each pool, we identified relative Y-chromosome coverage, which ranged from 0.09 to 0.54 (suggest-ing 2–10 males per pool; Table S2) and varied among density groups ($F_{2,6}$ = 7.57; $P$ = 0.02). Principal component analysis (PCA) on the variance-stabilized normalized read counts showed clear separation be-tween the three larval density groups on the first axis
(60% of variance explained; Fig. 2A). The second PCA axis explained 26% of the variance and was significantly associated with standardized Y-coverage ($F_{1,7} = 16.42$; $P = 0.005$; adjusted $R^2 = 0.66$; Fig. 2A). The lowest Y-coverage was observed at medium density, whereas samples at high density had highest Y-coverage but also large variation, overlapping with samples from low density (Fig. 2A).

To account for this sex-specific effect, we incorporated standardized Y-coverage as a numeric covariate into the DGE model. The transcriptomic response was entirely consistent with phenotypic effects, whereby medium density had a weak effect and high density had a large effect on gene expression (Fig. 2B). Fold-changes within the three contrasts were tightly correlated with qPCR-based fold-changes ($R^2$ ranging from 0.95 to 0.97; Table S1). Only 24 differentially expressed genes (DEGs) were observed at medium density (M vs. L contrast), whereas 1623 and 1768 DEGs were observed at high density (H vs. M and H vs. L contrasts, respectively) (Fig. S2, Table S3). The union of DEGs among these two high-density contrasts comprised 2107 DEGs, of which 1284 DEGs were shared, representing the “core” high-density crowding response (Fig. S2). Considering overlaps among up- and downregulated DEGs separately among all contrasts resulted in a core crowding response of 427 up- and 856 downregulated genes (Fig. 2C, Table S3). For example, the *Hr38*, *ng1*, and *ng3* genes were among the most strongly upregulated genes in the core crowding response (Table S3), and *ng2* was the only upregulated gene common across all three contrasts (Fig. 2C). The H vs. M and H vs. L contrasts also contained 118 or 265 upregulated and 221 or 216 downregulated unshared (“idiosyncratic”) DEGs, respectively (Fig. 2C, Table S3). Although 21 of 24 DEGs at medium density were shared with other contrasts (Fig. S2), the direction of regulation was opposite from that at high density for 20 of 24 DEGs (Fig. 2C, Table S3). For example, *phu* was the most strongly upregulated gene at medium density but was among the most strongly downregulated genes at high density (Table S3).

## Biological pathway analysis of differentially expressed gene sets

Next, we examined biological pathway annotations in each identified shared and idiosyncratic (unique) gene set among density contrasts since these may represent distinct ecophysiological processes. The core crowding response (i.e., purple intersection in Fig. 2C)

comprised 1273 genes with strongly correlated fold-changes between the H vs. M and H vs. L contrasts ($R^2 = 0.928$; Figs. 3A and S2). Of these, 944 (75%) and 265 genes (21%) were annotated with GeneOntology (GO) terms from the biological process ontology and KEGG pathways, respectively (background annotation rates: 76% and 20%). Most of the KEGG annotations were from the “Metabolism” class, which displayed by far the largest root-sum-square fold-change among all five KEGG classes, for both up- and downregulated DEGs (Fig. 3B). This strong regulation of metabolism was also observed for the idiosyncratic components of all three density contrasts (Fig. 3C).

We then performed KEGG pathway enrichment (overrepresentation) analysis on the core crowding response and idiosyncratic responses. The upregulated DEGs in the core crowding response supported overrepresentation ($FDR \le 0.05$) of eleven pathways, including several metabolism pathways, purine metabolism, and steroid biosynthesis (Fig. 4, Table S4). The downregulated DEGs supported overrepresentation of sphingolipid metabolism, lysosome, taurine metabolism, and Toll and Imd signaling pathways (Fig. 4, Table S4). The *Metabolic pathways* and *ABC transporters* pathways were significantly overrepresented both among up- and downregulated DEGs (Fig. 4, Table S4). There was little overlap in genes among these pathways, suggesting that these represent independent physiological responses (Fig. 5). The idiosyncratic response to medium crowding (M vs. L) indicated significant overrepresentation of the *Amino sugar and nucleotide sugar metabolism* pathways among downregulated DEGs, but no significant overrepresentation of any pathway among upregulated DEGs (Fig. 4, Table S4). The two idiosyncratic responses to high crowding in the H vs. M and H vs. L contrasts indicated significant overrepresentation of *DNA replication* (both H vs. M and H vs. L) and *Mucin type O-glycan biosynthesis* (H vs. M. only) among upregulated DEGs, as well as multiple *P450 xenobiotics metabolism pathways* (H vs. L. only) among downregulated DEGs (Fig 4, Table S4). Due to gene sharing with the P450 pathways, retinol metabolism and ascorbate and aldarate metabolism were also overrepresented among downregulated DEGs (Fig. 5).

Overrepresentation tests of GeneOntology terms in the biological process ontology yielded similar results to the KEGG analysis, highlighting upregulation of energy metabolism and downregulation of homeostasis and immune defense in the core crowding response, as well as downregulation of drug metabolism and developmental growth in idiosyncratic responses (Fig. S3).
(60% of variance explained; Fig. 2A). The second PCA axis explained 26% of the variance and was significantly associated with standardized Y-coverage ($F_{1,7} = 16.42$; $P = 0.005$; adjusted $R^2 = 0.66$; Fig. 2A). The lowest Y-coverage was observed at medium density, whereas samples at high density had highest Y-coverage but also large variation, overlapping with samples from low density (Fig. 2A).

To account for this sex-specific effect, we incorporated standardized Y-coverage as a numeric covariate into the DGE model. The transcriptomic response was entirely consistent with phenotypic effects, whereby medium density had a weak effect and high density had a large effect on gene expression (Fig. 2B). Fold-changes within the three contrasts were tightly correlated with qPCR-based fold-changes ($R^2$ ranging from 0.95 to 0.97; Table S1). Only 24 differentially expressed genes (DEGs) were observed at medium density (M vs. L contrast), whereas 1623 and 1768 DEGs were observed at high density (H vs. M and H vs. L contrasts, respectively) (Fig. S2, Table S3). The union of DEGs among these two high-density contrasts comprised 2107 DEGs, of which 1284 DEGs were shared, representing the “core” high-density crowding response (Fig. S2). Considering overlaps among up- and downregulated DEGs separately among all contrasts resulted in a core crowding response of 427 up- and 856 downregulated genes (Fig. 2C, Table S3). For example, the *Hr38*, *ng1*, and *ng3* genes were among the most strongly upregulated genes in the core crowding response (Table S3), and *ng2* was the only upregulated gene common across all three contrasts (Fig. 2C). The H vs. M and H vs. L contrasts also contained 118 or 265 upregulated and 221 or 216 downregulated unshared (“idiosyncratic”) DEGs, respectively (Fig. 2C, Table S3). Although 21 of 24 DEGs at medium density were shared with other contrasts (Fig. S2), the direction of regulation was opposite from that at high density for 20 of 24 DEGs (Fig. 2C, Table S3). For example, *phu* was the most strongly upregulated gene at medium density but was among the most strongly downregulated genes at high density (Table S3).

*Biological pathway analysis of differentially expressed gene sets*

Next, we examined biological pathway annotations in each identified shared and idiosyncratic (unique) gene set among density contrasts since these may represent distinct ecophysiological processes. The core crowding response (i.e., purple intersection in Fig. 2C)

comprised 1273 genes with strongly correlated fold-changes between the H vs. M and H vs. L contrasts ($R^2 = 0.928$; Figs. 3A and S2). Of these, 944 (75%) and 265 genes (21%) were annotated with GeneOntology (GO) terms from the biological process ontology and KEGG pathways, respectively (background annotation rates: 76% and 20%). Most of the KEGG annotations were from the “Metabolism” class, which displayed by far the largest root-sum-square fold-change among all five KEGG classes, for both up- and downregulated DEGs (Fig. 3B). This strong regulation of metabolism was also observed for the idiosyncratic components of all three density contrasts (Fig. 3C).

We then performed KEGG pathway enrichment (overrepresentation) analysis on the core crowding response and idiosyncratic responses. The upregulated DEGs in the core crowding response supported overrepresentation ($FDR \le 0.05$) of eleven pathways, including several metabolism pathways, purine metabolism, and steroid biosynthesis (Fig. 4, Table S4). The downregulated DEGs supported overrepresentation of sphingolipid metabolism, lysosome, taurine metabolism, and Toll and Imd signaling pathways (Fig. 4, Table S4). The *Metabolic pathways* and *ABC transporters* pathways were significantly overrepresented both among up- and downregulated DEGs (Fig. 4, Table S4). There was little overlap in genes among these pathways, suggesting that these represent independent physiological responses (Fig. 5). The idiosyncratic response to medium crowding (M vs. L) indicated significant overrepresentation of the *Amino sugar and nucleotide sugar metabolism* pathways among downregulated DEGs, but no significant overrepresentation of any pathway among upregulated DEGs (Fig. 4, Table S4). The two idiosyncratic responses to high crowding in the H vs. M and H vs. L contrasts indicated significant overrepresentation of *DNA replication* (both H vs. M and H vs. L) and *Mucin type O-glycan biosynthesis* (H vs. M. only) among upregulated DEGs, as well as multiple *P450 xenobiotics metabolism pathways* (H vs. L only) among downregulated DEGs (Fig 4, Table S4). Due to gene sharing with the P450 pathways, retinol metabolism and ascorbate and aldarate metabolism were also overrepresented among downregulated DEGs (Fig. 5).

Overrepresentation tests of GeneOntology terms in the biological process ontology yielded similar results to the KEGG analysis, highlighting upregulation of energy metabolism and downregulation of homeostasis and immune defense in the core crowding response, as well as downregulation of drug metabolism and developmental growth in idiosyncratic responses (Fig. S3).
<figure><img src="image_4.png" /><figcaption>**Fig. 2** Effects of larval density on larval gene. (A) Left: Scatter plot of the first two principal components (PC1/PC2) of variance-stabilized normalized read counts among samples Right: Scatter plot and linear regression of PC2 against standardized Y-coverage (proxy for sex ratio in larval pool). The coefficient of determination ($R^2$) and the P-value of the linear model are displayed on the top right. Samples are labeled and colored by density treatment as in Fig. 1. (B) Volcano plots summarizing expression change (log₂ fold-change) and statistical significance (−log₁₀ P-value) for each gene in medium/low (M vs. L), high/medium (H vs. M) and high/low (H vs. L) larval density contrasts. Significant DEGs (FDR ≤ 0.05, fold-change ≥ 1.5×) are highlighted in dark gray (M vs. L), amber (H vs. M), or red (H vs. L). (C) Intersection plots summarizing overlap between upregulated (left) or downregulated (right) DEGs among the three contrasts. Four key intersections are highlighted in dark gray (M vs. L only), amber (H vs. M only), red (H vs. L only) and purple (DEGs common between H vs. M and H vs. L contrasts).</figcaption></figure>
<figure><img src="image_4.png" /><figcaption>**Fig. 2** Effects of larval density on larval gene. (A) Left: Scatter plot of the first two principal components (PC1/PC2) of variance-stabilized normalized read counts among samples Right: Scatter plot and linear regression of PC2 against standardized Y-coverage (proxy for sex ratio in larval pool). The coefficient of determination ($R^2$) and the P-value of the linear model are displayed on the top right. Samples are labeled and colored by density treatment as in Fig. 1. (B) Volcano plots summarizing expression change (log₂ fold-change) and statistical significance (−log₁₀ P-value) for each gene in medium/low (M vs. L), high/medium (H vs. M) and high/low (H vs. L) larval density contrasts. Significant DEGs (FDR ≤ 0.05, fold-change ≥ 1.5×) are highlighted in dark gray (M vs. L), amber (H vs. M), or red (H vs. L). (C) Intersection plots summarizing overlap between upregulated (left) or downregulated (right) DEGs among the three contrasts. Four key intersections are highlighted in dark gray (M vs. L only), amber (H vs. M only), red (H vs. L only) and purple (DEGs common between H vs. M and H vs. L contrasts).</figcaption></figure>
<figure><img src="image_5.png" /><figcaption>**Fig. 3** KEGG pathway regulation among DEGs responding to larval crowding. (A) Correlation of log₂ fold-changes of DEGs in core crowding response between the two high-density contrasts (H vs. M and H vs. L). (B) Regulation strength scores (root-sum-square of fold-changes) for each KEGG class based on the DEGs for the core crowding response and for idiosyncratic DEGs in M vs. L, H vs. M, and H vs. L contrasts. (C) Genes log₂FC organized according to KEGG class with boxplots superimposed for up- and downregulated genes separately. Each dot represents a gene and dots are colored according to contrast.</figcaption></figure>

Discussion

We present the first transcriptome-wide overview of re-
sponses to larval crowding in *Drosophila melanogaster*.
Our results show that larval transcriptomic responses are
consistent with the known negative adult phenotypic ef-
fects of larval overcrowding. While medium crowding
had little effect on adult phenotypes and larval gene ex-
pression, high crowding had substantial phenotypic and
transcriptomic effects, which were distinct from those at
medium density. These data allow us for the first time to
test predictions from previous targeted studies and pro-
vide novel candidate genes and physiological pathways
for studying the ecological processes affected by larval
overcrowding.

We predicted that high crowding can lead to accumu-
lation of toxic compounds, which necessitates molecu-

lar responses to cope with a toxic developmental envi-
ronment (Table 1). We found that high crowding caused
marked transcriptional changes in metabolic pathways
and pathways related to growth and toxicity. This is con-
sistent with decreased protein availability in the larval
diet and an accumulation of toxic waste compounds,
with knock-on effects for larval growth (Henry *et al.*,
2018; Klepsatel *et al.*, 2018; Henry *et al.*, 2020). For
instance, we found that steroid metabolism was up-
regulated, including lipases *Lip3* and *Lip4*. This is in
agreement with recent findings showing that *Lip3* is up-
regulated under responses to extreme dietary stress (star-
vation) (Hänschke *et al.*, 2022). Interestingly Klepsatel
*et al.* (2018) reported that flies that had developed un-
der high larval density had reduced protein content and
were fatter than the flies from standard density. Likewise,
Zwaan *et al.* (1991) reported that the fat content of flies
<figure><img src="image_5.png" /><figcaption>**Fig. 3** KEGG pathway regulation among DEGs responding to larval crowding. (A) Correlation of log₂ fold-changes of DEGs in core crowding response between the two high-density contrasts (H vs. M and H vs. L). (B) Regulation strength scores (root-sum-square of fold-changes) for each KEGG class based on the DEGs for the core crowding response and for idiosyncratic DEGs in M vs. L, H vs. M, and H vs. L contrasts. (C) Genes log₂FC organized according to KEGG class with boxplots superimposed for up- and downregulated genes separately. Each dot represents a gene and dots are colored according to contrast.</figcaption></figure>

Discussion

We present the first transcriptome-wide overview of re-
sponses to larval crowding in *Drosophila melanogaster*.
Our results show that larval transcriptomic responses are
consistent with the known negative adult phenotypic ef-
fects of larval overcrowding. While medium crowding
had little effect on adult phenotypes and larval gene ex-
pression, high crowding had substantial phenotypic and
transcriptomic effects, which were distinct from those at
medium density. These data allow us for the first time to
test predictions from previous targeted studies and pro-
vide novel candidate genes and physiological pathways
for studying the ecological processes affected by larval
overcrowding.

We predicted that high crowding can lead to accumu-
lation of toxic compounds, which necessitates molecu-

lar responses to cope with a toxic developmental envi-
ronment (Table 1). We found that high crowding caused
marked transcriptional changes in metabolic pathways
and pathways related to growth and toxicity. This is con-
sistent with decreased protein availability in the larval
diet and an accumulation of toxic waste compounds,
with knock-on effects for larval growth (Henry *et al.*,
2018; Klepsatel *et al.*, 2018; Henry *et al.*, 2020). For
instance, we found that steroid metabolism was up-
regulated, including lipases *Lip3* and *Lip4*. This is in
agreement with recent findings showing that *Lip3* is up-
regulated under responses to extreme dietary stress (star-
vation) (Hänschke *et al.*, 2022). Interestingly Klepsatel
*et al.* (2018) reported that flies that had developed un-
der high larval density had reduced protein content and
were fatter than the flies from standard density. Likewise,
Zwaan *et al.* (1991) reported that the fat content of flies
<figure><img src="image_6.png" /><figcaption>**Fig. 4** KEGG pathway enrichment in DEGs unique to individual density contrasts (idiosyncratic responses) or common in high/low and high/medium contrasts (core crowding response). The statistical significance (−log₁₀ *q* value) is plotted for each KEGG pathway (*q* ≤ 0.05), whereby the direction of the bar indicates up- or downregulation of the underlying DEGs. The numbers of DEGs annotated with the enriched pathway are indicated at the end of each bar. Four key intersections are highlighted in dark gray (M vs. L only), amber (H vs. M only), red (H vs. L only), and purple (DEGs common between H vs. M and H vs. L contrasts).</figcaption></figure>

increased with increasing crowding. Hence it appears that crowding triggers a shift in metabolic pathways leading to triglyceride (fat) accumulation. This may be related to limiting dietary yeast/proteins in diet under crowded conditions, whereby the ratio of protein:carbohydrate decreases rapidly in crowded larval conditions resulting in increased responses to metabolic responses to carbohydrate (i.e., Skorupa *et al.*, 2008; Klepsatel *et al.*, 2018). Molecular responses to protein:carbohydrate ratios have been observed in *Drosophila* adult and therefore, are plausible in larvae (Post & Tatar, 2016). Likewise, a metabolic remodeling hypothesis was also suggested by metabolomic profiling data which revealed dissimilar metabotypes among larval densities, which were mainly characterized by high concentrations of sugars and low amounts of amino acids at higher densities (Henry *et al.*, 2018). We also found that glycolysis, gluconeogenesis and galactose metabolism were upregulated probably as a by-product of elevated food uptake due to compensatory feeding to satisfy for protein requirements (Skorupa *et al.*, 2008; Klepsatel *et al.*, 2018). *Hr38* was among the most strongly upregulated genes, consistent

with its role in regulating carbohydrate metabolism and glycogen storage of growing larval stage (Ruaud *et al.*, 2011). Moreover, purine metabolism was also upregulated as shown by the *uro* gene, which corroborates previous findings showing that *uro* is a key gene in the response to larval crowding (Henry *et al.*, 2018). Sphingolipid and taurine metabolism as well as lysosome and ABC transporters were downregulated suggesting that excretion and recycling pathways may be negatively impacted in crowded conditions. Together, these results show that larval crowding modulates the response to low nutrition and high toxicity.

High crowding also caused strong downregulation of immunity via the Toll/Imd pathways involving two PGRPs (*PGRP-SD* and *PGRP-LA*) and *spätzle*, which resulted in downregulation of antimicrobial peptide expression including *DptA*, *Drs*, and *Drsl5*. This finding challenges the prediction that *Drosophila* larvae should upregulate immune function due to density-dependent prophylaxis as in other insects (e.g., Cotter *et al.*, 2004; Siva-Jothy *et al.*, 2005). However, it is possible that the larval densities used here are above the larval densities
<figure><img src="image_6.png" /><figcaption>**Fig. 4** KEGG pathway enrichment in DEGs unique to individual density contrasts (idiosyncratic responses) or common in high/low and high/medium contrasts (core crowding response). The statistical significance (−log₁₀ *q* value) is plotted for each KEGG pathway (*q* ≤ 0.05), whereby the direction of the bar indicates up- or downregulation of the underlying DEGs. The numbers of DEGs annotated with the enriched pathway are indicated at the end of each bar. Four key intersections are highlighted in dark gray (M vs. L only), amber (H vs. M only), red (H vs. L only), and purple (DEGs common between H vs. M and H vs. L contrasts).</figcaption></figure>

increased with increasing crowding. Hence it appears that crowding triggers a shift in metabolic pathways leading to triglyceride (fat) accumulation. This may be related to limiting dietary yeast/proteins in diet under crowded conditions, whereby the ratio of protein:carbohydrate decreases rapidly in crowded larval conditions resulting in increased responses to metabolic responses to carbohydrate (i.e., Skorupa *et al.*, 2008; Klepsatel *et al.*, 2018). Molecular responses to protein:carbohydrate ratios have been observed in *Drosophila* adult and therefore, are plausible in larvae (Post & Tatar, 2016). Likewise, a metabolic remodeling hypothesis was also suggested by metabolomic profiling data which revealed dissimilar metabotypes among larval densities, which were mainly characterized by high concentrations of sugars and low amounts of amino acids at higher densities (Henry *et al.*, 2018). We also found that glycolysis, gluconeogenesis and galactose metabolism were upregulated probably as a by-product of elevated food uptake due to compensatory feeding to satisfy for protein requirements (Skorupa *et al.*, 2008; Klepsatel *et al.*, 2018). *Hr38* was among the most strongly upregulated genes, consistent

with its role in regulating carbohydrate metabolism and glycogen storage of growing larval stage (Ruaud *et al.*, 2011). Moreover, purine metabolism was also upregulated as shown by the *uro* gene, which corroborates previous findings showing that *uro* is a key gene in the response to larval crowding (Henry *et al.*, 2018). Sphingolipid and taurine metabolism as well as lysosome and ABC transporters were downregulated suggesting that excretion and recycling pathways may be negatively impacted in crowded conditions. Together, these results show that larval crowding modulates the response to low nutrition and high toxicity.

High crowding also caused strong downregulation of immunity via the Toll/Imd pathways involving two PGRPs (*PGRP-SD* and *PGRP-LA*) and *spätzle*, which resulted in downregulation of antimicrobial peptide expression including *DptA*, *Drs*, and *Drsl5*. This finding challenges the prediction that *Drosophila* larvae should upregulate immune function due to density-dependent prophylaxis as in other insects (e.g., Cotter *et al.*, 2004; Siva-Jothy *et al.*, 2005). However, it is possible that the larval densities used here are above the larval densities
<figure><img src="image_7.png" /><figcaption>**Fig. 5** KEGG pathway similarity network for DEGs unique to three individual density contrasts (idiosyncratic responses) or common in H vs. M and H vs. L contrasts (core crowding response). The nodes represent the KEGG pathways significant at each comparison and the edges represent the similarity between the different KEGG pathways (i.e., overlap in genes). The size of the nodes represents the number of genes in the pathway with bigger nodes representing more genes. The width of the edges between the nodes represents the similarity coefficient. The thicker the edge the more genes they have in common. Pathways are colored according to KEGG classification.</figcaption></figure>

which stimulate immunity. Nevertheless, the repression of transcripts involved in immunity found here is likely responsible for increased larval mortality in crowded conditions found here and elsewhere (Than *et al.*, 2020), which imposes a strong selective pressure for populations experiencing high larval densities. In *Drosophila*, populations adapted to larval overcrowding evolve pathogen-specific responses against Gram-positive pathogens, suggesting that larval crowding might increase the risk of immune challenges by Gram-positive pathogens in the population (Kapila *et al.*, 2021). Crowding directly alters the nutritional properties of the diet, not only quantitatively but also qualitatively, with accumulation of metabolic wastes and decaying dead carcasses (Henry

*et al.*, 2018; Henry *et al.*, 2020). This in turn triggers marked changes in the bacterial composition of food with, for instance, the appearance of genus like *Pseudomonas* (Henry *et al.*, 2020). These bacteria are well known for their pathogenicity toward *Drosophila* (D'Argenio *et al.*, 2001). Hence, the emergence of pathogens in food concurrently with a reduced immunity may be, at least in part, a driver of lethality at high larval density.

We also hypothesized that autophagy pathways would be upregulated in the core responses to crowding due to the reported increased lifespan in adults from crowded larval environments (Shenoi *et al.*, 2016; Klepsatel *et al.*, 2018) (Table 1). This is because disruption of autophagy
<figure><img src="image_7.png" /><figcaption>**Fig. 5** KEGG pathway similarity network for DEGs unique to three individual density contrasts (idiosyncratic responses) or common in H vs. M and H vs. L contrasts (core crowding response). The nodes represent the KEGG pathways significant at each comparison and the edges represent the similarity between the different KEGG pathways (i.e., overlap in genes). The size of the nodes represents the number of genes in the pathway with bigger nodes representing more genes. The width of the edges between the nodes represents the similarity coefficient. The thicker the edge the more genes they have in common. Pathways are colored according to KEGG classification.</figcaption></figure>

which stimulate immunity. Nevertheless, the repression of transcripts involved in immunity found here is likely responsible for increased larval mortality in crowded conditions found here and elsewhere (Than *et al.*, 2020), which imposes a strong selective pressure for populations experiencing high larval densities. In *Drosophila*, populations adapted to larval overcrowding evolve pathogen-specific responses against Gram-positive pathogens, suggesting that larval crowding might increase the risk of immune challenges by Gram-positive pathogens in the population (Kapila *et al.*, 2021). Crowding directly alters the nutritional properties of the diet, not only quantitatively but also qualitatively, with accumulation of metabolic wastes and decaying dead carcasses (Henry

*et al.*, 2018; Henry *et al.*, 2020). This in turn triggers marked changes in the bacterial composition of food with, for instance, the appearance of genus like *Pseudomonas* (Henry *et al.*, 2020). These bacteria are well known for their pathogenicity toward *Drosophila* (D'Argenio *et al.*, 2001). Hence, the emergence of pathogens in food concurrently with a reduced immunity may be, at least in part, a driver of lethality at high larval density.

We also hypothesized that autophagy pathways would be upregulated in the core responses to crowding due to the reported increased lifespan in adults from crowded larval environments (Shenoi *et al.*, 2016; Klepsatel *et al.*, 2018) (Table 1). This is because disruption of autophagy
is a known factor in aging (Maruzs *et al.*, 2019). Our results do not directly support our predictions as our KEGG analysis did not detect an enrichment of the autophagy pathway. However, our analysis showed that the lysosome pathway, which is indirectly related to autophagy as well as directly involved in other biological processes, is downregulated in the core responses to high crowding. For instance, *LERP* is a receptor that is important lysosome vesicle trafficking as well as for eye development related to autophagy (Hasanagic *et al.*, 2015). *LERP* knockdown results in lower body bass and increased starvation sensitivity in adult flies, which are traits associated with development in crowded environments (Than *et al.*, 2020). Similarly, we found that *Npc2a* was downregulated, which is an important gene regulating the sterol metabolism and molting in *Drosophila* larvae (Huang *et al.*, 2007). *Ppt2* was also downregulated and is a gene linked to neuronal development in *Drosophila* (O’Hern 2011). *Ppt2* knockdown showed abnormal neuronal development which could lead to impaired functions. This can help explain why *Drosophila* larvae developing in crowded conditions showed impaired learned visual recognition (Slepian *et al.*, 2015). Autophagy is not only used for recycling damaged organelles or proteins; it also provides nutrients to maintain important cellular functions. Lipids including sphingolipids are increasingly recognized as key regulators of a series of critical cellular processes such as autophagy (Hebbar *et al.*, 2015). We found here that genes involved in sphingolipid metabolism were also downregulated in the core responses to larval crowding. Studies in flies have underscored the roles of sphingolipids in controlling lipid storage and response to nutrient availability (Kraut, 2011). For instance, changes in sphingolipid metabolic genes are part of the transcriptional response to sugar feeding of *Drosophila* larvae (Zinke *et al.*, 2002). This study identified an acid sphingomyelinase (aSMase) and a ceramidase (CDase) both as being downregulated after sugar feeding, whereas fatty acid synthesis was upregulated. We also found that CDase was downregulated in response to crowding, as well as *schlank*, a ceramide synthase, and the ceramide kinase (*Cerk*), which catalyzes phosphorylation of ceramide. Taken together, our results highlight sphingolipid metabolism is important during crowding, either for the regulation of cell death (autophagy) or for the metabolic regulation of nutrient scarcity.

Larval crowding was expected to trigger the expres-
sion of heat-shock proteins in a hormesis-like response
in our experiment (Henry *et al.*, 2018; Lushchak *et al.*,
2019). However, our data did not show increased expres-
sion of heat-shock proteins at high density, suggesting

that hormesis-like responses may not be as strong as pre-
viously considered under the circumstances tested in this
study. In a target gene expression study, Henry *et al.*
(2018) also failed to find strong upregulation of *hsp* fam-
ily genes in M and H larvae, corroborating the present
results. Thus, it appears that effects of crowding (ben-
eficial or detrimental) are unrelated to heat-shock re-
sponse. Nevertheless, high crowding downregulated the
autophagy and lysosome pathways (i.e., recycling path-
ways), which could lead to a generalized stress response
if damages in protein and other cellular components accu-
mulate in individuals experiencing larval crowding. This
accumulation of stress could underpin hormesis-like re-
sponses in adulthood. It is possible that our design, which
sampled wandering larvae, selectively excluded larvae
that accumulated higher stress levels as those were likely
slower to pupate. This would explain the contradictory re-
sults presented here and the literature. Alternatively, it is
possible that specific genes of the stress pathways are up-
regulated but not enough to be detected in our differential
expression analysis. Future studies that directly manipu-
late larval stress levels will provide greater insights into
the genes as well as overall transcriptional responses in-
volved in organismal responses to stress and will allow
us to compare how those pathways are affected by larval
crowding.

Larval crowding is also expected to affect reproduc-
tive processes, for example by increasing testis sizes rel-
ative to body mass (Johnson *et al.*, 2017; Than *et al.*,
2020; Morimoto *et al.*, 2021). Males and females devel-
oping in crowded larval environments are smaller and
with lower mating and reproductive success, displaying
higher investment in mating opportunities (Wigby *et al.*,
2016; Than *et al.*, 2020). Moreover, phenotypic effects
caused by larval crowding can persist through to next
generations (Morimoto *et al.*, 2017). While our pheno-
typic data is consistent with these ideas, the transcrip-
tomic data had no evidence of direct changes in repro-
ductive pathways. One important limitation of our experi-
mental design was that our larval pools had unknown sex-
ratios and thus did not allow to specifically test for sex-
specific effects on transcription. However, our sex-ratio
estimates based on Y-chromosome coverage suggested
that our pools differed in sex-ratio and that the tran-
scriptomic response is affected by variation in sex-ratio.
This is consistent with previous reports of sex-specific re-
sponses in reproduction to larval crowding (Baldal *et al.*,
2005; Vishalakshi & Singh, 2008; Kapila *et al.*, 2021)
and warrants future efforts into ascertaining sex-specific
crowding-associated trade-offs. It is important to mention
that Y-chromosome coverage was highest in the high-
density group, which suggests a male-biased sex-ratio,
is a known factor in aging (Maruzs *et al.*, 2019). Our results do not directly support our predictions as our KEGG analysis did not detect an enrichment of the autophagy pathway. However, our analysis showed that the lysosome pathway, which is indirectly related to autophagy as well as directly involved in other biological processes, is downregulated in the core responses to high crowding. For instance, *LERP* is a receptor that is important lysosome vesicle trafficking as well as for eye development related to autophagy (Hasanagic *et al.*, 2015). *LERP* knockdown results in lower body bass and increased starvation sensitivity in adult flies, which are traits associated with development in crowded environments (Than *et al.*, 2020). Similarly, we found that *Npc2a* was downregulated, which is an important gene regulating the sterol metabolism and molting in *Drosophila* larvae (Huang *et al.*, 2007). *Ppt2* was also downregulated and is a gene linked to neuronal development in *Drosophila* (O’Hern 2011). *Ppt2* knockdown showed abnormal neuronal development which could lead to impaired functions. This can help explain why *Drosophila* larvae developing in crowded conditions showed impaired learned visual recognition (Slepian *et al.*, 2015). Autophagy is not only used for recycling damaged organelles or proteins; it also provides nutrients to maintain important cellular functions. Lipids including sphingolipids are increasingly recognized as key regulators of a series of critical cellular processes such as autophagy (Hebbar *et al.*, 2015). We found here that genes involved in sphingolipid metabolism were also downregulated in the core responses to larval crowding. Studies in flies have underscored the roles of sphingolipids in controlling lipid storage and response to nutrient availability (Kraut, 2011). For instance, changes in sphingolipid metabolic genes are part of the transcriptional response to sugar feeding of *Drosophila* larvae (Zinke *et al.*, 2002). This study identified an acid sphingomyelinase (aSMase) and a ceramidase (CDase) both as being downregulated after sugar feeding, whereas fatty acid synthesis was upregulated. We also found that CDase was downregulated in response to crowding, as well as *schlank*, a ceramide synthase, and the ceramide kinase (*Cerk*), which catalyzes phosphorylation of ceramide. Taken together, our results highlight sphingolipid metabolism is important during crowding, either for the regulation of cell death (autophagy) or for the metabolic regulation of nutrient scarcity.

Larval crowding was expected to trigger the expres-
sion of heat-shock proteins in a hormesis-like response
in our experiment (Henry *et al.*, 2018; Lushchak *et al.*,
2019). However, our data did not show increased expres-
sion of heat-shock proteins at high density, suggesting

that hormesis-like responses may not be as strong as pre-
viously considered under the circumstances tested in this
study. In a target gene expression study, Henry *et al.*
(2018) also failed to find strong upregulation of *hsp* fam-
ily genes in M and H larvae, corroborating the present
results. Thus, it appears that effects of crowding (ben-
eficial or detrimental) are unrelated to heat-shock re-
sponse. Nevertheless, high crowding downregulated the
autophagy and lysosome pathways (i.e., recycling path-
ways), which could lead to a generalized stress response
if damages in protein and other cellular components accu-
mulate in individuals experiencing larval crowding. This
accumulation of stress could underpin hormesis-like re-
sponses in adulthood. It is possible that our design, which
sampled wandering larvae, selectively excluded larvae
that accumulated higher stress levels as those were likely
slower to pupate. This would explain the contradictory re-
sults presented here and the literature. Alternatively, it is
possible that specific genes of the stress pathways are up-
regulated but not enough to be detected in our differential
expression analysis. Future studies that directly manipu-
late larval stress levels will provide greater insights into
the genes as well as overall transcriptional responses in-
volved in organismal responses to stress and will allow
us to compare how those pathways are affected by larval
crowding.

Larval crowding is also expected to affect reproduc-
tive processes, for example by increasing testis sizes rel-
ative to body mass (Johnson *et al.*, 2017; Than *et al.*,
2020; Morimoto *et al.*, 2021). Males and females devel-
oping in crowded larval environments are smaller and
with lower mating and reproductive success, displaying
higher investment in mating opportunities (Wigby *et al.*,
2016; Than *et al.*, 2020). Moreover, phenotypic effects
caused by larval crowding can persist through to next
generations (Morimoto *et al.*, 2017). While our pheno-
typic data is consistent with these ideas, the transcrip-
tomic data had no evidence of direct changes in repro-
ductive pathways. One important limitation of our experi-
mental design was that our larval pools had unknown sex-
ratios and thus did not allow to specifically test for sex-
specific effects on transcription. However, our sex-ratio
estimates based on Y-chromosome coverage suggested
that our pools differed in sex-ratio and that the tran-
scriptomic response is affected by variation in sex-ratio.
This is consistent with previous reports of sex-specific re-
sponses in reproduction to larval crowding (Baldal *et al.*,
2005; Vishalakshi & Singh, 2008; Kapila *et al.*, 2021)
and warrants future efforts into ascertaining sex-specific
crowding-associated trade-offs. It is important to mention
that Y-chromosome coverage was highest in the high-
density group, which suggests a male-biased sex-ratio,
but the data for adult emergence suggest a female-biased treatment. This is because for the former, Y-chromosome coverage was estimated from RNAseq of the subset of wandering larvae collected for the experiment (see Materials and methods) whereas the emergence data takes into account the total number of individuals that emerged. The former is naturally affected by stochasticity during sampling (particularly for larvae, which does not present morphological sex dimorphism). This sampling stochasticity was present across all treatments in a similar fashion.

Three out of the four genes most strongly upregulated in response to high crowding were new glue genes *ng1*, *ng2*, *ng3*. These genes are normally transcribed from the beginning of the third instar and their expression is repressed later to allow the puffing stages transition to proceed in salivary gland chromosomes (D'Avino *et al.*, 1995). These intermolt puffs are regulated by ecdysone before the onset of metamorphosis, whereby an ecdysone peak can trigger key developmental events such as the cessation of feeding and the initiation of wandering of the larvae (Dominick & Truman, 1985). In *D. melanogaster* this ecdysone peak is also responsible for the repression of *ng1*, *ng2*, and *ng3* (Furia *et al.*, 1990; D'Avino *et al.*, 1995). In this study, we only sampled wandering larvae and the relative high expression of *ng* genes in crowded condition suggests a possible disturbance of ecdysone-mediated developmental processes (e.g., longer puffing stage transitions). This would be consistent with the observation that larval crowding affects the development dynamics, with individuals at high larval density taking longer to develop to adulthood than those from medium or low density.

The majority of the effects in molecular pathways belonged to the core responses to crowding, whereas the idiosyncratic responses to crowding revealed a relatively small number of pathways. For instance, medium crowding resulted in a small decrease in body mass and downregulation of *Cht4* and *Cht9* genes involved in the amino sugar and nucleotide sugar metabolism pathway. A further increase in larval crowding resulted in strong phenotypic effects as shown by a reduction in egg-to-adult viability and adult body weight (Fig. 1), but upregulation of only repair enzymes of the DNA replication pathways (*Mcm* gens) and *Pgant* genes involved in mucin-type O-glycan biosynthesis pathways (H vs. M). Similar patterns were observed in the comparison between L and H, where the DNA replication pathway (*Mcm* and *DNAPol* genes) were upregulated. Moreover, we also found that genes related to the metabolism of toxic compounds, including *Ugt* and *Gst*, were downregulated. In insects,

*Ugt* genes are known to modulate the conjugation of glucose to eliminate toxic compounds and play a role in several physiological processes, including insecticide resistance (Lee *et al.*, 2005; Ahn & Marygold, 2021). Likewise, *Gst* are also involved in detoxification and insecticide resistance (Le Goff *et al.*, 2006; Willoughby *et al.*, 2006). Therefore, H larvae have different susceptibility to toxic compounds relative to L larvae. Thus, increasing larval crowding has a consistent effect on molecular pathways above and beyond the magnitude of phenotypic effects (i.e., core response), and only specific pathways are regulated on a density-specific manner (i.e., idiosyncratic responses). Other Omics results also suggest that larval crowding generated physiological phenotypes that are density-specific (Henry *et al.*, 2018). It is important to highlight that the *phurba tashi (phu)* gene, which is involved in hypoxia responses in *Drosophila* (Mossman *et al.*, 2017), showed a density-dependent expression pattern, whereby *phu* was strongly upregulated in M larvae but amongst the most downregulated in the H larvae. These density-specific physiological and molecular signatures may underlie hormetic responses triggered by crowding (Henry *et al.*, 2018; Lushchak *et al.*, 2019). It is also worth mentioning that we sampled wandering larvae, which is a dynamic stage for transcriptional changes. While we standardized the sampling to account for asynchronies, it is still possible that some of the idiosyncratic responses observed here emerge from small (but random) effects of sampling time. Future studies standardizing sampling relative to Zeitgeber time may minimize these potential effects.

Overall, we show that larval crowding induces changes in the transcriptomic profile of *Drosophila melanogaster* larvae. These responses are primarily related to metabolic pathways, but also include pathways related to growth and maintenance and toxicity. In particular, sugar, steroid and amino acid metabolism pathways as well as DNA replication, ABC transporters, taurine metabolism, P450 xenobiotics metabolism and the Toll/Imd signaling pathways were identified as key pathways underpinning the molecular responses to larval overcrowding and thus, are candidates for future targeted studies. For instance, it will be important to characterize the specific role of the differentially expressed genes and pathways on the response to larval crowding across holometabolous insects, allowing for a comparative understanding of the molecular responses to intraspecific competition. Importantly, the molecular insights gained here help answer disparate questions in the field of developmental ecology, by shedding light into how molecular pathways respond to a stressful and competitive developmental environment. Overall, our study shows the molecular pathways under-
but the data for adult emergence suggest a female-biased treatment. This is because for the former, Y-chromosome coverage was estimated from RNAseq of the subset of wandering larvae collected for the experiment (see Materials and methods) whereas the emergence data takes into account the total number of individuals that emerged. The former is naturally affected by stochasticity during sampling (particularly for larvae, which does not present morphological sex dimorphism). This sampling stochasticity was present across all treatments in a similar fashion.

Three out of the four genes most strongly upregulated in response to high crowding were new glue genes *ng1*, *ng2*, *ng3*. These genes are normally transcribed from the beginning of the third instar and their expression is repressed later to allow the puffing stages transition to proceed in salivary gland chromosomes (D'Avino *et al.*, 1995). These intermolt puffs are regulated by ecdysone before the onset of metamorphosis, whereby an ecdysone peak can trigger key developmental events such as the cessation of feeding and the initiation of wandering of the larvae (Dominick & Truman, 1985). In *D. melanogaster* this ecdysone peak is also responsible for the repression of *ng1*, *ng2*, and *ng3* (Furia *et al.*, 1990; D'Avino *et al.*, 1995). In this study, we only sampled wandering larvae and the relative high expression of *ng* genes in crowded condition suggests a possible disturbance of ecdysone-mediated developmental processes (e.g., longer puffing stage transitions). This would be consistent with the observation that larval crowding affects the development dynamics, with individuals at high larval density taking longer to develop to adulthood than those from medium or low density.

The majority of the effects in molecular pathways belonged to the core responses to crowding, whereas the idiosyncratic responses to crowding revealed a relatively small number of pathways. For instance, medium crowding resulted in a small decrease in body mass and downregulation of *Cht4* and *Cht9* genes involved in the amino sugar and nucleotide sugar metabolism pathway. A further increase in larval crowding resulted in strong phenotypic effects as shown by a reduction in egg-to-adult viability and adult body weight (Fig. 1), but upregulation of only repair enzymes of the DNA replication pathways (*Mcm* gens) and *Pgant* genes involved in mucin-type O-glycan biosynthesis pathways (H vs. M). Similar patterns were observed in the comparison between L and H, where the DNA replication pathway (*Mcm* and *DNApol* genes) were upregulated. Moreover, we also found that genes related to the metabolism of toxic compounds, including *Ugt* and *Gst*, were downregulated. In insects,

*Ugt* genes are known to modulate the conjugation of glucose to eliminate toxic compounds and play a role in several physiological processes, including insecticide resistance (Lee *et al.*, 2005; Ahn & Marygold, 2021). Likewise, *Gst* are also involved in detoxification and insecticide resistance (Le Goff *et al.*, 2006; Willoughby *et al.*, 2006). Therefore, H larvae have different susceptibility to toxic compounds relative to L larvae. Thus, increasing larval crowding has a consistent effect on molecular pathways above and beyond the magnitude of phenotypic effects (i.e., core response), and only specific pathways are regulated on a density-specific manner (i.e., idiosyncratic responses). Other Omics results also suggest that larval crowding generated physiological phenotypes that are density-specific (Henry *et al.*, 2018). It is important to highlight that the *phurba tashi* (*phu*) gene, which is involved in hypoxia responses in *Drosophila* (Mossman *et al.*, 2017), showed a density-dependent expression pattern, whereby *phu* was strongly upregulated in M larvae but amongst the most downregulated in the H larvae. These density-specific physiological and molecular signatures may underlie hormetic responses triggered by crowding (Henry *et al.*, 2018; Lushchak *et al.*, 2019). It is also worth mentioning that we sampled wandering larvae, which is a dynamic stage for transcriptional changes. While we standardized the sampling to account for asynchronies, it is still possible that some of the idiosyncratic responses observed here emerge from small (but random) effects of sampling time. Future studies standardizing sampling relative to Zeitgeber time may minimize these potential effects.

Overall, we show that larval crowding induces changes in the transcriptomic profile of *Drosophila melanogaster* larvae. These responses are primarily related to metabolic pathways, but also include pathways related to growth and maintenance and toxicity. In particular, sugar, steroid and amino acid metabolism pathways as well as DNA replication, ABC transporters, taurine metabolism, P450 xenobiotics metabolism and the Toll/Imd signaling pathways were identified as key pathways underpinning the molecular responses to larval overcrowding and thus, are candidates for future targeted studies. For instance, it will be important to characterize the specific role of the differentially expressed genes and pathways on the response to larval crowding across holometabolous insects, allowing for a comparative understanding of the molecular responses to intraspecific competition. Importantly, the molecular insights gained here help answer disparate questions in the field of developmental ecology, by shedding light into how molecular pathways respond to a stressful and competitive developmental environment. Overall, our study shows the molecular pathways under-
pinning larval responses to developmental environments and broadens our understanding of how holometabolous insects respond to intraspecific competition during development.

## Acknowledgments

We are grateful to EcoGeno Platform from UMS OSUR 3343 in Rennes for access to genomic facilities (2100 Bioanalyzer System and LC480 Roche qPCR System). This study was supported by Drothermal project of The French National Research Agency (ANR-20-CE02-0011-01). JM is supported by the Royal Society (RGS/R2/202220) and a BBSRC grant (BB/V015249/1).

## Data Archiving

Raw sequence data and the processed gene-count matrix have been deposited at the NCBI Gene Expression Omnibus database (Edgar et al., 2002) and are accessible through GEO Series accession number GSE193120.

## Disclosure

All authors have seen and agree with the contents of the manuscript and there is no conflict of interest, including specific financial interest and relationships and affiliations relevant to the subject of manuscript.

## References

Agashe, D. & Bolnick, D.I. (2010) Intraspecific genetic variation and competition interact to influence niche expansion. *Proceedings of the Royal Society B: Biological Sciences*, 277(1696), 2915-2924.

Ahn, S.J. & Marygold, S.J. (2021) The UDP-Glycosyltransferase family in *Drosophila melanogaster*: nomenclature update, gene expression and phylogenetic analysis. *Frontiers in Physiology*, 12, 300.

Andrews, S. (2010) FastQC: a quality control tool for high throughput sequence data. Version 0.11. 2. Available at http://www.bioinformatics.babraham.ac.uk/projects/fastqc.

Baldal, E.A., van der Linde, K., van Alphen, J.J.M., Brakefield, P.M. & Zwaan, B.J. (2005) The effects of larval density on adult life-history traits in three species of *Drosophila*. *Mechanisms of Ageing and Development*, 126, 407-416.

Benjamini, Y. & Hochberg, Y. (1995) Controlling the false discovery rate: a practical and powerful approach to multiple testing. *Journal of the Royal Statistical Society: Series B (Methodological)*, 57, 289-300.

Bolnick, D.I. (2001) Intraspecific competition favours niche width expansion in *Drosophila melanogaster*. *Nature*, 410, 463-466.

Borash, D.J., Teotónio, H., Rose, M.R. & Mueller, L.D. (2000) Density-dependent natural selection in *Drosophila*: correlations between feeding rate, development time and viability. *Journal of Evolutionary Biology*, 13, 181-187.

Bubli, O.A., Imasheva, A.G. & Loeschcke, V. (1998) Selection for knockdown resistance to heat in *Drosophila melanogaster* at high and low larval densities. *Evolution*, 52, 619-625.

Conway, J.R., Lex, A. & Gehlenborg, N. (2017) UpSetR: an R package for the visualization of intersecting sets and their properties. *Bioinformatics*, 33(18), 2938-2940.

Cotter, S.C., Hails, R.S., Cory, J.S. & Wilson, K. (2004) Density-dependent prophylaxis and condition-dependent immune function in Lepidopteran larvae: a multivariate approach. *Journal of Animal Ecology*, 73, 283-293.

D'Argenio, D.A., Gallagher, L.A., Berg, C.A. & Manoil, C. (2001) *Drosophila* as a model host for *Pseudomonas aeruginosa* infection. *Journal of Bacteriology*, 183, 1466-1471.

D'Avino, P.P., Crispi, S. & Furia, M. (1995) Hormonal regulation of the *Drosophila melanogaster* ng-gene. *European Journal of Entomology*, 92, 259.

De Mendiburu, F. (2014) Agricolae: statistical procedures for agricultural research. *R package version*, 1(1).

Dominick, O. & Truman, J.W. (1985) The physiology of wandering behaviour in *Manduca sexta*. II. The endocrine control of wandering behaviour. *Journal of Experimental Biology*, 117, 45-68.

Edgar, R., Domrachev, M. & Lash, A.E. (2002) Gene Expression Omnibus: NCBI gene expression and hybridization array data repository. *Nucleic Acids Research*, 30, 207-210.

Ewels, P., Magnusson, M., Lundin, S. & Käller, M. (2016) MultiQC: summarize analysis results for multiple tools and samples in a single report. *Bioinformatics*, 32, 3047-3048.

Fontaine, C., Collin, C.L. & Dajoz, I. (2008) Generalist foraging of pollinators: diet expansion at high density. *Journal of Ecology*, 96, 1002-1010.

Furia, M., Digilio, F.A., Artiaco, D., Giordano, E. & Polito, L.C. (1990) A new gene nested within the dunce genetic unit of *Drosophila melanogaster*. *Nucleic Acids Research*, 18, 5837-5841.

Goddard, J., De Jong, G. & Meyer, F. (2020) Unidirectional en masse larval dispersal of blow flies (Diptera: Calliphoridae). *Food Webs*, 23, e00137.

Le Goff, G., Hilliou, F., Siegfried, B.D., Boundy, S., Wajnberg, E., Sofer, L., Audant, P., ffrench-Constant, R.H. & Feyereisen, R. (2006) Xenobiotic response in *Drosophila melanogaster*: sex dependence of P450 and GST gene induction. *Insect Biochemistry and Molecular Biology*, 36, 674-682.
pinning larval responses to developmental environments and broadens our understanding of how holometabolous insects respond to intraspecific competition during development.

## Acknowledgments

We are grateful to EcoGeno Platform from UMS OSUR 3343 in Rennes for access to genomic facilities (2100 Bioanalyzer System and LC480 Roche qPCR System). This study was supported by Drothermal project of The French National Research Agency (ANR-20-CE02-0011-01). JM is supported by the Royal Society (RGS/R2/202220) and a BBSRC grant (BB/V015249/1).

## Data Archiving

Raw sequence data and the processed gene-count matrix have been deposited at the NCBI Gene Expression Omnibus database (Edgar et al., 2002) and are accessible through GEO Series accession number GSE193120.

## Disclosure

All authors have seen and agree with the contents of the manuscript and there is no conflict of interest, including specific financial interest and relationships and affiliations relevant to the subject of manuscript.

## References

Agashe, D. & Bolnick, D.I. (2010) Intraspecific genetic variation and competition interact to influence niche expansion. *Proceedings of the Royal Society B: Biological Sciences*, 277(1696), 2915-2924.

Ahn, S.J. & Marygold, S.J. (2021) The UDP-Glycosyltransferase family in *Drosophila melanogaster*: nomenclature update, gene expression and phylogenetic analysis. *Frontiers in Physiology*, 12, 300.

Andrews, S. (2010) FastQC: a quality control tool for high throughput sequence data. Version 0.11. 2. Available at http://www.bioinformatics.babraham.ac.uk/projects/fastqc.

Baldal, E.A., van der Linde, K., van Alphen, J.J.M., Brakefield, P.M. & Zwaan, B.J. (2005) The effects of larval density on adult life-history traits in three species of *Drosophila*. *Mechanisms of Ageing and Development*, 126, 407-416.

Benjamini, Y. & Hochberg, Y. (1995) Controlling the false discovery rate: a practical and powerful approach to multiple testing. *Journal of the Royal Statistical Society: Series B (Methodological)*, 57, 289-300.

Bolnick, D.I. (2001) Intraspecific competition favours niche width expansion in *Drosophila melanogaster*. *Nature*, 410, 463-466.

Borash, D.J., Teotónio, H., Rose, M.R. & Mueller, L.D. (2000) Density-dependent natural selection in *Drosophila*: correlations between feeding rate, development time and viability. *Journal of Evolutionary Biology*, 13, 181-187.

Bubli, O.A., Imasheva, A.G. & Loeschcke, V. (1998) Selection for knockdown resistance to heat in *Drosophila melanogaster* at high and low larval densities. *Evolution*, 52, 619-625.

Conway, J.R., Lex, A. & Gehlenborg, N. (2017) UpSetR: an R package for the visualization of intersecting sets and their properties. *Bioinformatics*, 33(18), 2938-2940.

Cotter, S.C., Hails, R.S., Cory, J.S. & Wilson, K. (2004) Density-dependent prophylaxis and condition-dependent immune function in Lepidopteran larvae: a multivariate approach. *Journal of Animal Ecology*, 73, 283-293.

D'Argenio, D.A., Gallagher, L.A., Berg, C.A. & Manoil, C. (2001) *Drosophila* as a model host for *Pseudomonas aeruginosa* infection. *Journal of Bacteriology*, 183, 1466-1471.

D'Avino, P.P., Crispi, S. & Furia, M. (1995) Hormonal regulation of the *Drosophila melanogaster* ng-gene. *European Journal of Entomology*, 92, 259.

De Mendiburu, F. (2014) Agricolae: statistical procedures for agricultural research. *R package version*, 1(1).

Dominick, O. & Truman, J.W. (1985) The physiology of wandering behaviour in *Manduca sexta*. II. The endocrine control of wandering behaviour. *Journal of Experimental Biology*, 117, 45-68.

Edgar, R., Domrachev, M. & Lash, A.E. (2002) Gene Expression Omnibus: NCBI gene expression and hybridization array data repository. *Nucleic Acids Research*, 30, 207-210.

Ewels, P., Magnusson, M., Lundin, S. & Käller, M. (2016) MultiQC: summarize analysis results for multiple tools and samples in a single report. *Bioinformatics*, 32, 3047-3048.

Fontaine, C., Collin, C.L. & Dajoz, I. (2008) Generalist foraging of pollinators: diet expansion at high density. *Journal of Ecology*, 96, 1002-1010.

Furia, M., Digilio, F.A., Artiaco, D., Giordano, E. & Polito, L.C. (1990) A new gene nested within the dunce genetic unit of *Drosophila melanogaster*. *Nucleic Acids Research*, 18, 5837-5841.

Goddard, J., De Jong, G. & Meyer, F. (2020) Unidirectional en masse larval dispersal of blow flies (Diptera: Calliphoridae). *Food Webs*, 23, e00137.

Le Goff, G., Hilliou, F., Siegfried, B.D., Boundy, S., Wajnberg, E., Sofer, L., Audant, P., ffrench-Constant, R.H. & Feyereisen, R. (2006) Xenobiotic response in *Drosophila melanogaster*: sex dependence of P450 and GST gene induction. *Insect Biochemistry and Molecular Biology*, 36, 674-682.
Grant, P.R. (1972) Convergent and divergent character dis-
placement. *Biological Journal of the Linnean Society*, **4**,
39–68.

Gripenberg, S., Mayhew, P.J., Parnell, M. & Roslin, T. (2010)
A meta-analysis of preference–performance relationships in
phytophagous insects. *Ecology Letters*, **13**, 383–393.

Hänschke, L., Heier, C., Maya Palacios, S.J., Özek, H.E., Thiele, C., Bauer, R., et al. (2022) *Drosophila* Lipase 3 mediates the metabolic response to starvation and aging. *Frontiers in Aging*, **3**, 800153.

Hansen, J.D., Ludwig, J.A., Owens, J.C. & Huddleston, E.W. (1984) Larval movement of the range caterpillar, *Hemileuca oliviae* (Lepidoptera: Saturniidae). *Environmental Entomology*, **13**, 415–420.

Hasanagic, M., Van Meel, E., Luan, S., Aurora, R., Kornfeld, S. & Eissenberg, J.C. (2015) The lysosomal enzyme receptor protein (LERP) is not essential, but is implicated in lysosomal function in *Drosophila melanogaster*. *Biology Open*, **4**, 1316–1325.

Hebbar, S., Sahoo, I., Matysik, A., Argudo Garcia, I., Osborne, K.A., Papan, C., et al. (2015) Ceramides and stress signalling intersect with autophagic defects in neurodegenerative *Drosophila* blue cheese (bchs) mutants. *Scientific Reports*, **5**, 15926.

Henry, Y., Renault, D. & Colinet, H. (2018) Hormesis-
like effect of mild larval crowding on thermotolerance in
*Drosophila* flies. *The Journal of Experimental Biology*, **221**,
jeb169342.

Henry, Y., Tarapacki, P. & Colinet, H. (2020) Larval density affects phenotype and surrounding bacterial community without altering gut microbiota in *Drosophila melanogaster*. *FEMS Microbiology Ecology*, **96**(4). https://doi.org/10.1093/femsec/fiaa055.

Huang, X., Warren, J.T., Buchanan, J., Gilbert, L.I. & Scott, M.P. (2007) *Drosophila* Niemann-Pick type C-2 genes control sterol homeostasis and steroid biosynthesis: a model of human neurodegenerative disease. *Development*, **134**, 3733–3742.

Johnson, T.L., Symonds, M.R.E. & Elgar, M.A. (2017) An-
ticipatory flexibility: larval population density in moths de-
termines male investment in antennae, wings and testes. *Proceedings of the Royal Society B: Biological Sciences*, **284**(1866), 20172087.

Jones, R.E. (1977) Search behaviour: a study of three caterpillar
species. *Behaviour*, **60**(3-4), 237-259.

Kapila, R., Kashyap, M., Poddar, S., Gangwal, S. & Prasad, N.G.G. (2021) Evolution of pathogen-specific improved survivorship post-infection in populations of *Drosophila melanogaster* adapted to larval crowding. *PLoS ONE*, **16**(4), e0250055.

Kapila, R., Kashyap, M., Gulati, A., Narasimhan, A., Poddar, S., Mukhopadhaya, A. & Prasad, N.G. (2021) Evolution of

sex-specific heat stress tolerance and larval Hsp70 expres-
sion in populations of *Drosophila melanogaster* adapted to
larval crowding. *Journal of Evolutionary Biology*, 34, 1376–
1385.

Kawecki, T.J. (2008) Adaptation to marginal habitats. *Annual Review of Ecology, Evolution, and Systematics*, 39, 321–342.

Kim, D., Paggi, J.M., Park, C., Bennett, C. & Salzberg, S.L. (2019) Graph-based genome alignment and genotyping with HISAT2 and HISAT-genotype. *Nature Biotechnology*, **37**, 907–915.

Klepsatel, P., Procházka, E. & Gáliková, M. (2018) Crowding of *Drosophila* larvae affects lifespan and other life-history traits via reduced availability of dietary yeast. *Experimental Gerontology*, **110**, 298–308.

Kraut, R. (2011) Roles of sphingolipids in *Drosophila* develop-
ment and disease. *Journal of Neurochemistry*, **116**, 764–778.

Krueger, F. (2015) Trim galore. *A wrapper tool around Cu-
tadapt and FastQC to consistently apply quality and adapter
trimming to FastQ files*, 516–517.

Larsson, S. & Ekbom, B. (1995) Oviposition mistakes in herbiv-
orous insects: confusion or a step towards a new host plant?
*Oikos*, **155**, 155–160.

Lee, S.W., Shono, T., Tashiro, S. & Ohta, K. (2005) Metabolism of PyracDofos in housefly, *Musca domestica*. *Journal of Asia-Pacific Entomology*, **8**, 387–392.

Levis, N.A., Fuller, C.G. & Pfennig, D.W. (2020) An exper-
imental investigation of how intraspecific competition and
phenotypic plasticity can promote the evolution of novel,
complex phenotypes. *Biological Journal of the Linnean So-
ciety*, **131**, 76–87.

Li, H., Handsaker, B., Wysoker, A., Fennell, T., Ruan, J., Homer, N., et al. (2009) The sequence alignment/map format and SAMtools. *Bioinformatics*, **25**(16), 2078–2079.

Liao, Y., Smyth, G.K. & Shi, W. (2014) featureCounts: an effi-
cient general purpose program for assigning sequence reads
to genomic features. *Bioinformatics*, **30**(7), 923–930.

Love, M.I., Huber, W. & Anders, S. (2014) Moderated estima-
tion of fold change and dispersion for RNA-seq data with
DESeq2. *Genome Biology*, **15**(12), 550.

Lushchak, O.V., Karaman, H.S., Kozeretska, I.A., Koliada, A.K., Zabuga, O.G., Pisaruk, A.V., et al. (2019) Larval crowding results in hormesis-like effects on longevity in *Drosophila*: timing of eclosion as a model. *Biogerontology*, **20**(2), 191–201.

Magwere, T., Chapman, T. & Partridge, L. (2004) Sex differ-
ences in the effect of dietary restriction on lifespan and mor-
tality rates in female and male *Drosophila melanogaster*. *The
Journals of Gerontology: Series A*, **59**(1), B3–B9.

Markow, T.A. (2015) The natural history of model organisms:
the secret lives of *Drosophila* flies. *eLife*, **4**, e06793.

Maruzs, T., Simon-Vecsei, Z., Kiss, V., Csizmadia, T. & Juhasz, G. (2019) On the fly: recent progress on autophagy and aging
Grant, P.R. (1972) Convergent and divergent character dis-
placement. *Biological Journal of the Linnean Society*, **4**,
39–68.

Gripenberg, S., Mayhew, P.J., Parnell, M. & Roslin, T. (2010)
A meta-analysis of preference–performance relationships in
phytophagous insects. *Ecology Letters*, **13**, 383–393.

Hänschke, L., Heier, C., Maya Palacios, S.J., Özek, H.E., Thiele, C., Bauer, R., et al. (2022) *Drosophila* Lipase 3 mediates the metabolic response to starvation and aging. *Frontiers in Aging*, **3**, 800153.

Hansen, J.D., Ludwig, J.A., Owens, J.C. & Huddleston, E.W. (1984) Larval movement of the range caterpillar, *Hemileuca oliviae* (Lepidoptera: Saturniidae). *Environmental Entomology*, **13**, 415–420.

Hasanagic, M., Van Meel, E., Luan, S., Aurora, R., Kornfeld, S. & Eissenberg, J.C. (2015) The lysosomal enzyme receptor protein (LERP) is not essential, but is implicated in lysosomal function in *Drosophila melanogaster*. *Biology Open*, **4**, 1316–1325.

Hebbar, S., Sahoo, I., Matysik, A., Argudo Garcia, I., Osborne, K.A., Papan, C., et al. (2015) Ceramides and stress signalling intersect with autophagic defects in neurodegenerative *Drosophila* blue cheese (bchs) mutants. *Scientific Reports*, **5**, 15926.

Henry, Y., Renault, D. & Colinet, H. (2018) Hormesis-
like effect of mild larval crowding on thermotolerance in
*Drosophila* flies. *The Journal of Experimental Biology*, **221**,
jeb169342.

Henry, Y., Tarapacki, P. & Colinet, H. (2020) Larval density affects phenotype and surrounding bacterial community without altering gut microbiota in *Drosophila melanogaster*. *FEMS Microbiology Ecology*, **96**(4). https://doi.org/10.1093/
femsec/fiaa055.

Huang, X., Warren, J.T., Buchanan, J., Gilbert, L.I. & Scott, M.P. (2007) *Drosophila* Niemann-Pick type C-2 genes control sterol homeostasis and steroid biosynthesis: a model of human neurodegenerative disease. *Development*, **134**, 3733–3742.

Johnson, T.L., Symonds, M.R.E. & Elgar, M.A. (2017) An-
ticipatory flexibility: larval population density in moths de-
termines male investment in antennae, wings and testes.
*Proceedings of the Royal Society B: Biological Sciences*,
**284**(1866), 20172087.

Jones, R.E. (1977) Search behaviour: a study of three caterpillar
species. *Behaviour*, **60**(3-4), 237-259.

Kapila, R., Kashyap, M., Poddar, S., Gangwal, S. & Prasad, N.G.G. (2021) Evolution of pathogen-specific improved survivorship post-infection in populations of *Drosophila melanogaster* adapted to larval crowding. *PLoS ONE*, **16**(4), e0250055.

Kapila, R., Kashyap, M., Gulati, A., Narasimhan, A., Poddar, S., Mukhopadhaya, A. & Prasad, N.G. (2021) Evolution of

sex-specific heat stress tolerance and larval Hsp70 expres-
sion in populations of *Drosophila melanogaster* adapted to
larval crowding. *Journal of Evolutionary Biology*, 34, 1376–
1385.

Kawecki, T.J. (2008) Adaptation to marginal habitats. *Annual Review of Ecology, Evolution, and Systematics*, 39, 321–342.

Kim, D., Paggi, J.M., Park, C., Bennett, C. & Salzberg, S.L. (2019) Graph-based genome alignment and genotyping with HISAT2 and HISAT-genotype. *Nature Biotechnology*, **37**, 907–915.

Klepsatel, P., Procházka, E. & Gáliková, M. (2018) Crowding of *Drosophila* larvae affects lifespan and other life-history traits via reduced availability of dietary yeast. *Experimental Gerontology*, **110**, 298–308.

Kraut, R. (2011) Roles of sphingolipids in *Drosophila* develop-
ment and disease. *Journal of Neurochemistry*, **116**, 764–778.

Krueger, F. (2015) Trim galore. *A wrapper tool around Cu-
tadapt and FastQC to consistently apply quality and adapter
trimming to FastQ files*, 516–517.

Larsson, S. & Ekbom, B. (1995) Oviposition mistakes in herbiv-
orous insects: confusion or a step towards a new host plant?
*Oikos*, **155**, 155–160.

Lee, S.W., Shono, T., Tashiro, S. & Ohta, K. (2005) Metabolism of PyracDofos in housefly, *Musca domestica*. *Journal of Asia-Pacific Entomology*, **8**, 387–392.

Levis, N.A., Fuller, C.G. & Pfennig, D.W. (2020) An exper-
imental investigation of how intraspecific competition and
phenotypic plasticity can promote the evolution of novel,
complex phenotypes. *Biological Journal of the Linnean So-
ciety*, **131**, 76–87.

Li, H., Handsaker, B., Wysoker, A., Fennell, T., Ruan, J., Homer, N., et al. (2009) The sequence alignment/map format and SAMtools. *Bioinformatics*, **25**(16), 2078–2079.

Liao, Y., Smyth, G.K. & Shi, W. (2014) featureCounts: an effi-
cient general purpose program for assigning sequence reads
to genomic features. *Bioinformatics*, **30**(7), 923–930.

Love, M.I., Huber, W. & Anders, S. (2014) Moderated estima-
tion of fold change and dispersion for RNA-seq data with
DESeq2. *Genome Biology*, **15**(12), 550.

Lushchak, O.V., Karaman, H.S., Kozeretska, I.A., Koliada, A.K., Zabuga, O.G., Pisaruk, A.V., et al. (2019) Larval crowding results in hormesis-like effects on longevity in *Drosophila*: timing of eclosion as a model. *Biogerontology*, **20**(2), 191–201.

Magwere, T., Chapman, T. & Partridge, L. (2004) Sex differ-
ences in the effect of dietary restriction on lifespan and mor-
tality rates in female and male *Drosophila melanogaster*. *The
Journals of Gerontology: Series A*, **59**(1), B3–B9.

Markow, T.A. (2015) The natural history of model organisms:
the secret lives of *Drosophila* flies. *eLife*, **4**, e06793.

Maruzs, T., Simon-Vecsei, Z., Kiss, V., Csizmadia, T. & Juhasz, G. (2019) On the fly: recent progress on autophagy and aging
in *Drosophila*. *Frontiers in Cell and Developmental Biology*,
7, 140.

McGraw, L.A., Fiumera, A.C., Ramakrishnan, M., Mad-
havarapu, S., Clark, A.G. & Wolfner, M.F. (2007) Lar-
val rearing environment affects several post-copulatory
traits in *Drosophila melanogaster*. *Biology Letters*, *3*, 607–
610.

Merico, D., Isserlin, R., Stueker, O., Emili, A. & Bader, G.D. (2010) Enrichment map: a network-based method for gene-set enrichment visualization and interpretation. *PLoS ONE*, *5*(11), e13984.

Morimoto, J., Ponton, F., Tychsen, I., Cassar, J. & Wigby, S. (2017) Interactions between the developmental and adult social environments mediate group dynamics and offspring traits in *Drosophila melanogaster*. *Scientific Reports*, *7*(1), 3574.

Morimoto, J., Barcellos, R., Schoborg, T.A., Nogueira, L.P. & Colaço, M.V. (2021) 3D imaging reveals potential anticipatory responses to increasing intraspecific competition in the *Drosophila* male reproductive system. *bioRxiv*, p. 2021.07.22.453343. https://doi.org/10.1101/2021.07.22.453343.

Morimoto, J. & Pietras, Z. (2020) Natural history of model organisms: the secret (group) life of *Drosophila melanogaster* larvae and why it matters to developmental ecology. *Ecology and Evolution*, 10(24), 13593–13601. https://doi.org/10.1002/ece3.7003.

Morimoto, J., Pizzari, T. & Wigby, S. (2016) Developmental environment effects on sexual selection in male and female *Drosophila melanogaster*. *PLoS ONE*, 11(5), e0154468.

Mossman, J.A., Tross, J.G., Jourjine, N.A., Li, N., Wu, Z. & Rand, D.M. (2017) Mitonuclear interactions mediate transcriptional responses to hypoxia in *Drosophila*. *Molecular Biology and Evolution*, *34*, 447–466.

Mueller, L.D., Folk, D.G., Nguyen, N., Nguyen, P., Lam, P., Rose, M.R. & Bradley, T. (2005) Evolution of larval foraging behaviour in *Drosophila* and its effects on growth and metabolic rates. *Physiological Entomology*, *30*, 262–269.

Nagarajan, A., Natarajan, S.B., Jayaram, M., Thammanna, A., Chari, S., Bose, J., et al. (2016) Adaptation to larval crowding in *Drosophila ananassae* and *Drosophila nasuta nasuta*: increased larval competitive ability without increased larval feeding rate. *Journal of Genetics*, *95*, 411–425.

Nguyen, B., Ponton, F., Than, A., Taylor, P.W., Chapman, T. & Morimoto, J. (2019) Interactions between ecological factors in the developmental environment modulate pupal and adult traits in a polyphagous fly. *Ecology and Evolution*, *9*(11), https://doi.org/10.1002/ece3.5206.

O'Hern, P.J. (2011) Investigation of Ppt2 RNAi knock-down during *Drosophila* neurogenesis. *The FASEB Journal*, *25*(1), 753.5–753.5.

Okonechnikov, K., Conesa, A. & García-Alcalde, F. (2016) Qualimap 2: advanced multi-sample quality control for high-throughput sequencing data. *Bioinformatics*, *32*, 292–294.

Palmer, D.H., Rogers, T.F., Dean, R. & Wright, A.E. (2019) How to identify sex chromosomes and their turnover. *Molecular Ecology*, *28*, 4709–4724.

Parent, C.E., Agashe, D. & Bolnick, D.I. (2014) Intraspecific competition reduces niche width in experimental populations. *Ecology and Evolution*, *4*, 3978–3990.

Poisot, T., Bever, J.D., Nemri, A., Thrall, P.H. & Hochberg, M.E. (2011) A conceptual framework for the evolution of ecological specialisation. *Ecology Letters*, *14*, 841–851.

Post, S. & Tatar, M. (2016) Nutritional geometric profiles of insulin/IGF expression in *Drosophila melanogaster*. *PLoS ONE*, *11*, e0155628.

Quinlan, A.R. & Hall, I.M. (2010) BEDTools: a flexible suite of utilities for comparing genomic features. *Bioinformatics*, *26*, 841–842.

R Core Team (2019) R: a language and environment for statistical computing. *R Foundation for Statistical Computing*. Available at: https://www.r-project.org/

Remold, S. (2012) Understanding specialism when the jack of all trades can be the master of all. *Proceedings of the Royal Society B: Biological Sciences*, 279(1749), 4861–4869.

Ruaud, A.F., Lam, G. & Thummel, C.S. (2011) The *Drosophila* NR4A nuclear receptor DHR38 regulates carbohydrate metabolism and glycogen storage. *Molecular endocrinology*, *25*, 83–91.

Schmid-Hempel, P. (2003) Variation in immune defence as a question of evolutionary ecology. *Proceedings of the Royal Society of London. Series B: Biological Sciences*, 270(1513), 357–366.

Shakarad, M., Prasad, N.G., Gokhale, K., Gadagkar, V., Rajamani, M. & Joshi, A. (2005) Faster development does not lead to correlated evolution of greater pre-adult competitive ability in *Drosophila melanogaster*. *Biology Letters*, *1*, 91–94.

Shannon, P., Markiel, A., Ozier, O., Baliga, N.S., Wang, J.T., Ramage, D., et al. (2003) Cytoscape: a software environment for integrated models of biomolecular interaction networks. *Genome Research*, *13*, 2498–2504.

Shenoi, V.N., Ali, S.Z. & Prasad, N.G. (2016) Evolution of increased adult longevity in *Drosophila melanogaster* populations selected for adaptation to larval crowding. *Journal of Evolutionary Biology*, *29*, 407–417.

Siva-Jothy, M.T., Moret, Y. & Rolff, J. (2005) Insect immunity: an evolutionary ecology perspective. *Advances in Insect Physiology*, *32*, 1–48.

Skorupa, D.A., Dervisefendic, A., Zwiener, J. & Pletcher, S.D. (2008) Dietary composition specifies consumption, obesity, and lifespan in *Drosophila melanogaster*. *Aging Cell*, *7*, 478–490.
in *Drosophila*. *Frontiers in Cell and Developmental Biology*,
7, 140.

McGraw, L.A., Fiumera, A.C., Ramakrishnan, M., Mad-
havarapu, S., Clark, A.G. & Wolfner, M.F. (2007) Lar-
val rearing environment affects several post-copulatory
traits in *Drosophila melanogaster*. *Biology Letters*, *3*, 607–
610.

Merico, D., Isserlin, R., Stueker, O., Emili, A. & Bader, G.D. (2010) Enrichment map: a network-based method for gene-set enrichment visualization and interpretation. *PLoS ONE*, *5*(11), e13984.

Morimoto, J., Ponton, F., Tychsen, I., Cassar, J. & Wigby, S. (2017) Interactions between the developmental and adult social environments mediate group dynamics and offspring traits in *Drosophila melanogaster*. *Scientific Reports*, *7*(1), 3574.

Morimoto, J., Barcellos, R., Schoborg, T.A., Nogueira, L.P. & Colaço, M.V. (2021) 3D imaging reveals potential anticipatory responses to increasing intraspecific competition in the *Drosophila* male reproductive system. *bioRxiv*, p. 2021.07.22.453343. https://doi.org/10.1101/2021.07.22.453343.

Morimoto, J. & Pietras, Z. (2020) Natural history of model organisms: the secret (group) life of *Drosophila melanogaster* larvae and why it matters to developmental ecology. *Ecology and Evolution*, 10(24), 13593–13601. https://doi.org/10.1002/ece3.7003.

Morimoto, J., Pizzari, T. & Wigby, S. (2016) Developmental environment effects on sexual selection in male and female *Drosophila melanogaster*. *PLoS ONE*, 11(5), e0154468.

Mossman, J.A., Tross, J.G., Jourjine, N.A., Li, N., Wu, Z. & Rand, D.M. (2017) Mitonuclear interactions mediate transcriptional responses to hypoxia in *Drosophila*. *Molecular Biology and Evolution*, *34*, 447–466.

Mueller, L.D., Folk, D.G., Nguyen, N., Nguyen, P., Lam, P., Rose, M.R. & Bradley, T. (2005) Evolution of larval foraging behaviour in *Drosophila* and its effects on growth and metabolic rates. *Physiological Entomology*, *30*, 262–269.

Nagarajan, A., Natarajan, S.B., Jayaram, M., Thammanna, A., Chari, S., Bose, J., et al. (2016) Adaptation to larval crowding in *Drosophila ananassae* and *Drosophila nasuta nasuta*: increased larval competitive ability without increased larval feeding rate. *Journal of Genetics*, *95*, 411–425.

Nguyen, B., Ponton, F., Than, A., Taylor, P.W., Chapman, T. & Morimoto, J. (2019) Interactions between ecological factors in the developmental environment modulate pupal and adult traits in a polyphagous fly. *Ecology and Evolution*, *9*(11), https://doi.org/10.1002/ece3.5206.

O'Hern, P.J. (2011) Investigation of Ppt2 RNAi knock-down during *Drosophila* neurogenesis. *The FASEB Journal*, *25*(1), 753.5–753.5.

Okonechnikov, K., Conesa, A. & García-Alcalde, F. (2016) Qualimap 2: advanced multi-sample quality control for high-throughput sequencing data. *Bioinformatics*, *32*, 292–294.

Palmer, D.H., Rogers, T.F., Dean, R. & Wright, A.E. (2019) How to identify sex chromosomes and their turnover. *Molecular Ecology*, *28*, 4709–4724.

Parent, C.E., Agashe, D. & Bolnick, D.I. (2014) Intraspecific competition reduces niche width in experimental populations. *Ecology and Evolution*, *4*, 3978–3990.

Poisot, T., Bever, J.D., Nemri, A., Thrall, P.H. & Hochberg, M.E. (2011) A conceptual framework for the evolution of ecological specialisation. *Ecology Letters*, *14*, 841–851.

Post, S. & Tatar, M. (2016) Nutritional geometric profiles of insulin/IGF expression in *Drosophila melanogaster*. *PLoS ONE*, *11*, e0155628.

Quinlan, A.R. & Hall, I.M. (2010) BEDTools: a flexible suite of utilities for comparing genomic features. *Bioinformatics*, *26*, 841–842.

R Core Team (2019) R: a language and environment for statistical computing. *R Foundation for Statistical Computing*. Available at: https://www.r-project.org/

Remold, S. (2012) Understanding specialism when the jack of all trades can be the master of all. *Proceedings of the Royal Society B: Biological Sciences*, 279(1749), 4861–4869.

Ruaud, A.F., Lam, G. & Thummel, C.S. (2011) The *Drosophila* NR4A nuclear receptor DHR38 regulates carbohydrate metabolism and glycogen storage. *Molecular endocrinology*, *25*, 83–91.

Schmid-Hempel, P. (2003) Variation in immune defence as a question of evolutionary ecology. *Proceedings of the Royal Society of London. Series B: Biological Sciences*, 270(1513), 357–366.

Shakarad, M., Prasad, N.G., Gokhale, K., Gadagkar, V., Rajamani, M. & Joshi, A. (2005) Faster development does not lead to correlated evolution of greater pre-adult competitive ability in *Drosophila melanogaster*. *Biology Letters*, *1*, 91–94.

Shannon, P., Markiel, A., Ozier, O., Baliga, N.S., Wang, J.T., Ramage, D., et al. (2003) Cytoscape: a software environment for integrated models of biomolecular interaction networks. *Genome Research*, *13*, 2498–2504.

Shenoi, V.N., Ali, S.Z. & Prasad, N.G. (2016) Evolution of increased adult longevity in *Drosophila melanogaster* populations selected for adaptation to larval crowding. *Journal of Evolutionary Biology*, *29*, 407–417.

Siva-Jothy, M.T., Moret, Y. & Rolff, J. (2005) Insect immunity: an evolutionary ecology perspective. *Advances in Insect Physiology*, *32*, 1–48.

Skorupa, D.A., Dervisefendic, A., Zwiener, J. & Pletcher, S.D. (2008) Dietary composition specifies consumption, obesity, and lifespan in *Drosophila melanogaster*. *Aging Cell*, *7*, 478–490.
Slepian, Z., Sundby, K., Glier, S., McDaniels, J., Nystrom, T., Mukherjee, S., *et al.* (2015) Visual attraction in *Drosophila* larvae develops during a critical period and is modulated by crowding conditions. *Journal of Comparative Physiology A*, 201(10), 1019–1027.

Sørensen, J.G. & Loeschcke, V. (2001) Larval crowding in *Drosophila melanogaster* induces Hsp70 expression, and leads to increased adult longevity and adult thermal stress resistance. *Journal of Insect Physiology*, 47(11), 1301–1307.

Svanbäck, R. & Bolnick, D. (2005) Intraspecific competition affects the strength of individual specialization: an optimal diet theory method. *Evolutionary Ecology Research*, 7, 993–1012.

Svanbäck, R. & Bolnick, D.I. (2007) Intraspecific competition drives increased resource use diversity within a natural population. *Proceedings of the Royal Society B: Biological Sciences*, 274, 839–844.

Than, A.T., Ponton, F. & Morimoto, J. (2020) Integrative developmental ecology: a review of density-dependent effects on life-history traits and host-microbe interactions in non-social holometabolous insects. *Evolutionary Ecology*, 34, 659–680.

Thompson, J.N. (1988) Evolutionary ecology of the relationship between oviposition preference and performance of offspring in phytophagous insects. *Entomologia Experimentalis et Applicata*, 47, 3–14.

Vishalakshi, C. & Singh, B.N. (2008) Effect of environmental stress on fluctuating asymmetry in certain morphological traits in *Drosophila ananassae*: nutrition and larval crowding. *Canadian Journal of Zoology*, 86, 427–437.

Wang, J.Z., Du, Z., Payattakool, R., Yu, P.S. & Chen, C.F. (2007) A new method to measure the semantic similarity of GO terms. *Bioinformatics*, 23(10), 1274–1281.

Warnes, M.G.R., Bolker, B., Bonebakker, L., Gentleman, R. & Huber, W. (2016) Package ‘gplots,’ Various R programming tools for plotting data.

Werner, T.K. & Sherry, T.W. (1987) Behavioral feeding specialization in *Pinaroloxias inornata*, the ‘Darwin’s finch’ of Coscos Island, Costa Rica. *Proceedings of the National Academy of Sciences USA*, 84(15), 5506–5510.

Wigby, S., Perry, J.C., Kim, Y. & Sirot, L.K. (2016) Developmental environment mediates male seminal protein investment in *Drosophila melanogaster*. *Functional Ecology*, 30, 410–419.

Willoughby, L., Chung, H., Lumb, C., Robin, C., Batterham, P. & Daborn, P.J. (2006) A comparison of *Drosophila melanogaster* detoxification gene induction responses for six insecticides, caffeine and phenobarbital. *Insect Biochemistry and Molecular Biology*, 36, 934–942.

Wilson, D.S. & Turelli, M. (1986) Stable underdominance and the evolutionary invasion of empty niches. *The American Naturalist*, 127(6), 835–850.

Wong, A.C.N., Wang, Q.P., Morimoto, J., Senior, A.M., Lihoreau, M., Neely, G.G., *et al.* (2017) Gut microbiota modifies olfactory-guided microbial preferences and foraging decisions in *Drosophila*. *Current Biology*, 27(15), 2397–2404.e4.

Yu, G., Wang, L.G., Han, Y. & He, Q.Y. (2012) clusterProfiler: an R package for comparing biological themes among gene clusters. *Omics: A Journal of Integrative Biology*, 16, 284–287.

Zhu, A., Ibrahim, J.G. & Love, M.I. (2019) Heavy-tailed prior distributions for sequence count data: removing the noise and preserving large differences. *Bioinformatics*, 35, 2084–2092.

Zinke, I., Schütz, C.S., Katzenberger, J.D., Bauer, M. & Pankratz, M.J. (2002) Nutrient control of gene expression in *Drosophila*: microarray analysis of starvation and sugar-dependent response. *The EMBO Journal*, 21, 6162–6173.

Zwaan, B.J., Bijlsma, R. & Hoekstra, R.F. (1991) On the developmental theory of ageing. I. Starvation resistance and longevity in *Drosophila melanogaster* in relation to pre-adult breeding conditions. *Heredity*, 66, 29–39.

Manuscript received June 22, 2022

Final version received August 22, 2022

Accepted August 27, 2022

**Supporting Information**

Additional supporting information may be found online in the Supporting Information section at the end of the article.

**Fig. S1** RNA electropherograms from Eukaryote Total RNA Pico assay.

**Fig. S2** Overlaps of differentially expressed genes (DEGs) in three density contrasts.

**Fig. S3** GeneOntology (biological process) enrichment in DEGs unique to individual density contrasts (idiosyncratic responses) or common in high/low and high/medium contrasts (core crowding response).

**Table S1** Methods and Results of qPCR experiments to corroborate RNAseq data (separate Excel).

**Table S2** RNA-Seq QC and alignment statistics (separate Excel).

**Table S3** Full DGE results and intersections (separate Excel).

**Table S4** KEGG enrichment results (separate Excel).
Slepian, Z., Sundby, K., Glier, S., McDaniels, J., Nystrom, T., Mukherjee, S., *et al.* (2015) Visual attraction in *Drosophila* larvae develops during a critical period and is modulated by crowding conditions. *Journal of Comparative Physiology A*, 201(10), 1019–1027.

Sørensen, J.G. & Loeschcke, V. (2001) Larval crowding in *Drosophila melanogaster* induces Hsp70 expression, and leads to increased adult longevity and adult thermal stress resistance. *Journal of Insect Physiology*, 47(11), 1301–1307.

Svanbäck, R. & Bolnick, D. (2005) Intraspecific competition affects the strength of individual specialization: an optimal diet theory method. *Evolutionary Ecology Research*, 7, 993–1012.

Svanbäck, R. & Bolnick, D.I. (2007) Intraspecific competition drives increased resource use diversity within a natural population. *Proceedings of the Royal Society B: Biological Sciences*, 274, 839–844.

Than, A.T., Ponton, F. & Morimoto, J. (2020) Integrative developmental ecology: a review of density-dependent effects on life-history traits and host-microbe interactions in non-social holometabolous insects. *Evolutionary Ecology*, 34, 659–680.

Thompson, J.N. (1988) Evolutionary ecology of the relationship between oviposition preference and performance of offspring in phytophagous insects. *Entomologia Experimentalis et Applicata*, 47, 3–14.

Vishalakshi, C. & Singh, B.N. (2008) Effect of environmental stress on fluctuating asymmetry in certain morphological traits in *Drosophila ananassae*: nutrition and larval crowding. *Canadian Journal of Zoology*, 86, 427–437.

Wang, J.Z., Du, Z., Payattakool, R., Yu, P.S. & Chen, C.F. (2007) A new method to measure the semantic similarity of GO terms. *Bioinformatics*, 23(10), 1274–1281.

Warnes, M.G.R., Bolker, B., Bonebakker, L., Gentleman, R. & Huber, W. (2016) Package ‘gplots,’ Various R programming tools for plotting data.

Werner, T.K. & Sherry, T.W. (1987) Behavioral feeding specialization in *Pinaroloxias inornata*, the ‘Darwin’s finch’ of Coscos Island, Costa Rica. *Proceedings of the National Academy of Sciences USA*, 84(15), 5506–5510.

Wigby, S., Perry, J.C., Kim, Y. & Sirot, L.K. (2016) Developmental environment mediates male seminal protein investment in *Drosophila melanogaster*. *Functional Ecology*, 30, 410–419.

Willoughby, L., Chung, H., Lumb, C., Robin, C., Batterham, P. & Daborn, P.J. (2006) A comparison of *Drosophila melanogaster* detoxification gene induction responses for six insecticides, caffeine and phenobarbital. *Insect Biochemistry and Molecular Biology*, 36, 934–942.

Wilson, D.S. & Turelli, M. (1986) Stable underdominance and the evolutionary invasion of empty niches. *The American Naturalist*, 127(6), 835–850.

Wong, A.C.N., Wang, Q.P., Morimoto, J., Senior, A.M., Lihoreau, M., Neely, G.G., *et al.* (2017) Gut microbiota modifies olfactory-guided microbial preferences and foraging decisions in *Drosophila*. *Current Biology*, 27(15), 2397–2404.e4.

Yu, G., Wang, L.G., Han, Y. & He, Q.Y. (2012) clusterProfiler: an R package for comparing biological themes among gene clusters. *Omics: A Journal of Integrative Biology*, 16, 284–287.

Zhu, A., Ibrahim, J.G. & Love, M.I. (2019) Heavy-tailed prior distributions for sequence count data: removing the noise and preserving large differences. *Bioinformatics*, 35, 2084–2092.

Zinke, I., Schütz, C.S., Katzenberger, J.D., Bauer, M. & Pankratz, M.J. (2002) Nutrient control of gene expression in *Drosophila*: microarray analysis of starvation and sugar-dependent response. *The EMBO Journal*, 21, 6162–6173.

Zwaan, B.J., Bijlsma, R. & Hoekstra, R.F. (1991) On the developmental theory of ageing. I. Starvation resistance and longevity in *Drosophila melanogaster* in relation to pre-adult breeding conditions. *Heredity*, 66, 29–39.

Manuscript received June 22, 2022

Final version received August 22, 2022

Accepted August 27, 2022

**Supporting Information**

Additional supporting information may be found online in the Supporting Information section at the end of the article.

**Fig. S1** RNA electropherograms from Eukaryote Total RNA Pico assay.

**Fig. S2** Overlaps of differentially expressed genes (DEGs) in three density contrasts.

**Fig. S3** GeneOntology (biological process) enrichment in DEGs unique to individual density contrasts (idiosyncratic responses) or common in high/low and high/medium contrasts (core crowding response).

**Table S1** Methods and Results of qPCR experiments to corroborate RNAseq data (separate Excel).

**Table S2** RNA-Seq QC and alignment statistics (separate Excel).

**Table S3** Full DGE results and intersections (separate Excel).

**Table S4** KEGG enrichment results (separate Excel).