Introduction

Parasites are ubiquitous, and parasite-mediated selection can represent a strong evolutionary pressure that influences many host phenotypic traits and ecological processes1,2,3,4. Defensive adaptations against parasites are common in plant, animal, and microbial host populations, where genetic variation in resistance is an essential component of host capacity to respond evolutionarily to parasite pressure5,6,7,8,9. Drosophila and the many parasites that attack species within this genus represent excellent systems to examine mechanisms of resistance and the factors that promote and constrain their evolution10,11,12,13,14. Specifically, associations between Drosophila and ectoparasitic mites15,16,17,18,19 are exceptional models for studies of ectoparasitism, as many such systems that are naturally occurring are also experimentally tractable, and the behavioral traits flies deploy against mites parallel those seen in other animal hosts20. The benefits ectoparasitic mites may derive from attaching to flies include increased nutrient intake and reproductive output, and improved dispersal to new habitats21. The host is harmed through damage to the cuticle and resource extraction along with costly immune and repair responses5,15,18,22. The combined effects of mite-derived damage negatively influence the function of male and female reproductive tissues, mating success, and lifespan5,15,22. Other host behavioral and physiological changes that occur in response to parasitism or parasite exposure include adaptive shifts in male reproductive effort23, anti-mite defensive behaviors24, oviposition site preference25, and rates of respiration26.

Drosophila melanogaster and other fruit fly species are parasitized by Gamasodes mites in Asia (Taiwan and Thailand), and Australia17,19,22. The extended geographic distribution and host range of Gamasodes mites indicate that they are likely to be a pervasive selective force affecting many aspects of fly biology. The behaviors that flies use to avoid infestation by ectoparasitic mites include bursts of flight from the substrate, locomotor responses, and vigorous grooming once the mite has made contact with the fly24,27. Whereas strong selection is likely to act on these first-line forms of defense27,28, the molecular and physiological bases of these defensive traits are yet to be established.

In the present study of D. melanogaster, RNA-seq and functional studies revealed that metabolic activity increased in response to artificial selection for increased behavioral resistance to Gamasodes mites27. The increased metabolism was associated with reductions in nutrient reserves and starvation resistance and was correlated with increased activity and reduced sleep during the night. These results identify metabolic and activity changes as a potential causal factor underlying ectoparasite resistance. Resistance assays of an independent panel of Drosophila genetic lines with variable sleep supported a link between decreased sleep and enhanced parasite avoidance. The results suggest that increased activity and reduced sleep could be critical factors in preventing ectoparasite attachment and that this energetically costly behavioral immunity trades off with nutrient reserves and starvation resistance. This study enhances our understanding of fundamental mechanisms that maintain genetic variation mediating a naturally occurring host-parasite symbiosis.

Results

Increased resistance coincided with transcriptional changes associated with metabolism

Previously we performed artificial selection for increasing resistance to Gamasodes queenslandicus mites in male D. melanogaster for 16 generations27, which we continued in the present study for a total of 22 generations. The selection program resulted in significant evolutionary responses, yielding three replicate selection lines that were significantly more behaviorally resistant to ectoparasitic mites than their unselected counterparts (Fig. 1A). At the terminus of the 16 generations of selection, transcriptional analyses revealed that 108 genes were significantly differentially expressed in selection lines (68 genes up-regulated and 40 down-regulated) relative to control lines (there were three biological replicates of each of the three replicate lines per selection treatment) (Table S1). Gene ontology enrichment analyses revealed increased oxidoreductase activity in selection lines relative to controls along with increases in other factors, such as three genes involved in glycolysis (aldolase, acetyl-CoA synthetase, and phosphoglycerate kinase) (Fig. 1B, Table S1). These results suggest that potential differences in metabolism occur in flies as a result of selection for mite resistance.

Fig. 1: Selection increases resistance to mites and RNA-seq studies reveal altered metabolism-associated factors following selection for ectoparasite resistance.
figure 1

A Artificial selection for mite resistance resulted in significantly reduced susceptibility to mites in selected (S) versus control (C) lines after 21 generations. * denotes significance at P < 0.05 between control and selected lines (F = 16.24, d.f. = 2,5, P = 0.001). Error bars represent the 95% confidence intervals. B Gene ontology categories enriched in differentially expressed genes between S and C from a full analysis of all samples (nested within the replicate, revealing factors generally associated with metabolism, FDR, P < 0.05). There were three biological replicates of RNA-Seq data for each treatment (S and C) of the three artificial selection replicates.

Starvation resistance decreased with increased metabolism during the night

The observed upregulation of metabolism-associated factors in resistant lines relative to controls suggests that a trade-off exists between resistance and host nutrient reserve management. Consistent with this hypothesis, starvation resistance in ectoparasite-resistant lines was reduced compared to control lines (Fig. 2A). This apparent trade-off was corroborated by the observation of greater reductions in body lipid and protein reserves after 36 h of starvation in resistant lines relative to controls (Fig. 2B, C). This difference in levels of nutrient stores suggests relatively increased lipolysis and proteolysis in the resistant lines. Thus, there are discernible metabolic phenotypes that co-evolved with ectoparasite resistance under artificial selection, identifying a potential cost of ectoparasite resistance as a reduction in host survival resulting from accelerated reduction in body condition under nutrient deprivation.

Fig. 2: Flies with increased resistance have higher metabolism during the night.
figure 2

A Death due to starvation was increased following selection in all three lines. Kaplan-Meier survival analysis, generalized Wilcoxon test, Chi-square = 18.234, P < 0.001 for control compared to selected for each line, N = 150 individuals per line. No differences were noted between the control and base populations (P > 0.05). B, C Lipolysis (F = 11.84, d.f. = 2,5, P = 0.031) and protein (F = 11.08, d.f. = 2,5, P = 0.001) breakdown was increased following selection in all lines. N = 3 groups of three flies examined per line. D Oxygen consumption was increased in the selected flies under scotophase compared to photophase conditions (F = 10.47, d.f. = 1,4, P = 0.009). N = 15 flies measured per line when selected and control lines are compared without light.

To further probe this potential metabolic trade-off, we analyzed oxygen consumption of flies during a daily cycle. Surprisingly, oxygen consumption was not different between control and selected lines during the photophase (Fig. 2D). However, when oxygen consumption was assessed in scotophase, it was significantly higher in the resistant lines compared to controls (Fig. 2D). This result indicates that the metabolic costs of ectoparasite resistance may primarily manifested during the scotophase.

Activity during the night was greater in ectoparasite-resistant lines

As oxygen consumption was increased under night conditions, we tested whether fly activity and sleep profiles were altered following selection throughout a daily cycle of day and night conditions (Fig. 3A). As with oxygen consumption, activity and sleep levels were not significantly different during the day. However, resistant lines did show a significant increase in activity and a decrease in the duration of sleep bouts during the scotophase relative to controls (Fig. 3B, C)—two traits that are certainly related but not necessarily one in the same. To help establish if reduced sleep and increased activity profiles were associated with resistance to ectoparasitism, we exposed an independent panel of inbred fly lines that differed in activity and sleep levels to ectoparasitic mites29. There was a significant relationship between the level of sleep during the night and the proportion of flies parasitized by mites (Fig. 3D). This result supports the possibility that sleep and activity levels are causal factors affecting ectoparasite resistance in flies. Notably, the mites showed increasing activity during the scotophase, suggesting that the frequency of fly-mite interactions may normally increase during this time (Fig. S1).

Fig. 3: Sleep and activity profiles are altered in selected lines.
figure 3

A Daily activity profile for control and selected fly lines, all lines combined. Shaded areas represent the 95% confidence intervals. N = 40–45 individuals per line. B Sleep duration decreased during the dark cycle for lines selected for resistance (F = 19.291, d.f. = 1,4, P < 0.001). The line within the data points represents the mean. Other aspects of sleep, such as bouts or duration of bouts, are not significantly different between selected and control lines (P > 0.05 in all cases). C Activity is increased during the night for lines selected for resistance (F = 15.98, d.f. = 1,4, P = 0.002). Each point represents the activity of a single fly. The line in the middle represents the mean. D A significant interaction occurs between an independent panel of eight inbred lines with different sleep levels29 and susceptibility to mites (F = 3.021, d.f. = 7,40, P = 0.012). N = 6 for each line was assayed for parasitism.

Movement restriction of flies and assay under photophase conditions reduced ectoparasite resistance

To confirm in another way the causal role of activity and sleep-like behavior in mediating ectoparasite resistance, we manipulated activity by restraining flies. We found that selected lines no longer showed improved mite resistance during the night relative to controls when restrained (Fig. 4A), matching a previous study showing that flight restriction erodes mite resistance in Drosophila27. Secondly, we performed mite parasitism assays under light and dark conditions during the photophase and showed that resistance divergence between selected and control lines was reduced in light relative to dark conditions (Fig. 4B). These results support the conclusion that increased activity and reduced sleep-like behavior during the night are important factors mediating host response to selection for improved mite resistance.

Fig. 4: Factors that alter sleep status shift ectoparasite resistance.
figure 4

A Restraining flies reduces the resistance of selected lines compared to controls, (F = 28.66, d.f. = 1,4, P < 0.002). B The effect of selection on mite resistance is more profound when flies are exposed to mites under dark conditions. N = 4 parasitism assays per line (F = 11.839, d.f. = 1,3, P = 0.016). C Summary of dynamics between sleep and activity in relation to resistance to ectoparasitic mites. Created in BioRender. Benoit, J. (2025) https://BioRender.com/g03v547. This highlights that altered sleep and activity patterns are associated with resistance to parasitism.

Discussion

This study indicates that declining sleep and increased activity are significant mechanisms for preventing ectoparasitism in fruit flies. Following artificial selection for resistance27, specific metabolic transcriptional pathways associated with increased monooxygenase activity along with a multitude of other factors such as specific genes underlying glycolysis (e.g. aldolase, acetyl-CoA synthetase, and phosphoglycerate kinase) were up-regulated. Metabolic activity increased at the expense of starvation resistance in flies behaviorally resistant to mite parasitism. This finding matched increased activity and reduced sleep during the night in selected versus control flies, which is one likely factor governing the evolution resistance to ectoparasitic mites. We provided experimental confirmation that altered sleep and activity profiles are important for ectoparasite resistance in experiments where fly activity was prevented and by using fly lines expressing variable sleep levels.

Sleep and host-parasite dynamics have been studied in multiple systems, but these have predominantly involved endoparasites such as malaria30,31. In general, the response to internal parasites involves a robust immune response, where increased sleep may support optimal expression of immune factors30,31. In contrast, host sleep (or lack thereof) could influence ectoparasite resistance differently, as behavioral resistance, rather than immune response, is of greater importance to avoid infestation. Here, we confirmed that among resistant lines, sleep decreased and activity increased during the scotophase, which is when sleep predominantly occurs in D. melanogaster32,33. The pattern of reduced sleep likely allows the flies to be more responsive during encounters with mites during the night There could be differences in sleep occurring during the day, but these differences may be less important as D. melanogaster sleeps much less during the day32,33. Interestingly, as the artificial selection was conducted spanning the diurnal transition27, this raises the possibility that a small change in sleep patterns or activity in the night could have been a direct target of selection that yielded the increased resistance to mite infestation. The altered sleep and activity profiles during the night are likely to be a general phenomenon that occurs among animals in the presence of ectoparasites. Parasitism has been noted in birds and bats to be associated with shifts in sleep and rest behavior during nest cleaning and grooming34,35. Changes in sleeping patterns in primates have also been suggested to reduce exposure to ectoparasites36. The present study is unique in revealing potential causal links between reduced host sleep, increased activity, and improved resistance to ectoparasites. Recently, phototaxis effects have been noted during fly-mite interactions37, where Drosophila nigrospiracula exposed to parasitic mites under light conditions had lower mite parasitism than those held in the dark with mites. Furthermore, flies will reside more in lighted areas after exposure to mites37. As light exposure increases fruit fly activity and reduces sleep32,33, the studies on D. nigrospiracula provide additional support for our observations in D. melanogaster that activity and sleep influence fly-mite interactions.

Whereas parasite resistance confers fitness benefits in terms of avoiding or countering the effects of parasitism per se, parasite resistance may be associated with fitness reductions in the absence of parasites. Such costs include reduced stress tolerance and damaged fecundity identified in multiple animal systems2,3,4 including other fly-mite systems5,27. Costs of resistance to a given parasite also may occur as increased susceptibility to other parasites, as suggested in the present study by the finding that two prophenoloxidae genes (ppo1 and ppo2, TableS1) were significantly down regulated in selection lines relative to controls. Prophenoloxidase catalyzes early steps of melanin production and is activated by signals associated with endo-parasite invasion and tissue damage11. The increased expression of metabolism-associated genes and altered starvation resistance in artificial selection lines suggest that mite resistance is likely to be metabolically costly, which we demonstrated through the assessment of host lipid reserves during starvation, and altered oxygen consumption. Our artificial selection experiment succeeded to drive the evolution of mite resistance despite these metabolic costs likely because the ad libitum food conditions provided to flies during culturing reduced the strength of antagonistic selection stemming from nutrient management issues. On the other hand, when behavioral defenses of the flies fail, parasitism by mites induces a prominent immune response5,22, and significantly reduces host egg production and lifespan23,38. Thus, the optimal degree of metabolically demanding mite resistance behaviors in nature is likely determined by the balance of parasite pressure versus resource limitation and nutrient management, which could vary temporally, geographically and taxonomically.

The finding that altered sleep patterns impact ectoparasite resistance represents a novel form of host resistance, similar to those involved in predator-prey dynamics. Indeed, many ectoparasites such as blood-feeding flies and mites have been classified as micropredators39,40, and differences in sleep have been associated with predation levels41,42,43 such that animals with increased exposure to predators have reduced or lighter sleep42,44. Here, we showed that reduced sleep-like behavior in D. melanogaster was a target of selection for parasite resistance, providing evidence that sleep behavior can evolve as a result of interactions with an ectoparasite. In this system, behavioral phenotypes confer ectoparasite resistance with a direct metabolic cost that could act to constrain the evolution of behavioral immunity to mites in natural populations, especially when parasitism rates are low and nutrients limited.

Materials and methods

Flies, mites, and selection for resistance

The flies (Drosophila melanogaster Meigen) and mites (Gamasodes queenslandicus Halliday and Walter) were collected at Cape Tribulation, Queensland, Australia27. The artificial selection protocol for increasing resistance to mites, which is described in detail elsewhere24,27, significantly increased resistance in response to 16 generations of sustained selection. At generation 16, a significant and consistent divergence in mite resistance occurred between selected lines and their unselected control lines27,45. Even though selection was only conducted on males, both sexes showed increase resistance27. Furthermore, increased cross-resistance to another mite species (Macrocheles subbadius Berlese) was shown27, indicating that the defensive mechanisms that were selected are likely general to ectoparasitic mites. Lines of D. melanogaster with varying levels of sleep were acquired from the Bloomington Stock Center29. Male flies were used in these analyses.

Mite infestation experiments

Mite infestation experiments were conducted according to previously developed methods5,22,24,38 that allow for determining infestation differences between fly lines. These were assays similar to those used for selection, where flies were exposed to mites in a jar containing media used to rear G. queenslandicus22,24,38. Each assay measured ectoparasitism in each fly line relative to its paired control line across a set of replicate infestation chambers. Groups of flies (i.e., selected and control) equal in size were aspirated into a given chamber (total flies per chamber ranged between 40 and 50 flies). Minute wing clips at the tip of each wing were used to distinguish groups (≤ 3% of the wing). Clips have been previously shown to have no impact on fly susceptibility to mites22,24, and clipping was alternated between groups across chambers. A recovery period of 24 h was used after clipping the wing under CO2. Flies were extracted from chambers after 6–8 h and examined under a strereomicroscope, and the presence of mites, scars and wing clips were recorded. These assays were conducted on the selected and control lines after 21 generations and for flies from the sleep inbred panel. For the sleep inbred panel, vials with fly lines from the panel were intermixed among the positions in the activity monitors during the assays to allow for random comparisons between each line.

For susceptibility tests under restraint, flies were transferred to shortened 200-µl micropipette tips, a confined space that severely limits fly movement45,46, and exposed to two mites, effectively mimicking periods of sharply reduced activity. After two hours in the dark, the flies were removed and examined for attached mites or mite-induced scars. This assay was conducted on the selected and control lines after 20 generations of artificial selection. Lastly, light and dark conditions were manipulated to assess if the reduction in light and lower activity impacted mite-fly interactions. To do so, flies were moved to scotophase conditions (dark) or allowed to remain under photophase conditions for 1 h before being exposed to mites in jars with media used to rear G. queenslandicus22,24,38 under light or dark conditions. These light and dark assays were conducted 6 h into the photophase.

RNA-seq analysis following selection

Flies were collected after 16 generations of selection for the RNA-seq studies. RNA was extracted from whole flies as previously described22 in three biological replicates per line. The flies were collected at the day-to-night transition periods (dusk). Illumina sequencing was conducted at Novogene on an Illumina NovaSeq Hiseq platform. Illumina datasets are available at the National Center for Biotechnology Information’s Sequence Read Archive: Bioproject PRJNA999910. Differential expression of genes was determined based on methods previously described22,47,48. Briefly, the quality and presence of adapters were determined with FASTQC49, followed by a filtering/trimming procedure with Trimmomatic v.0.36 using default settings50. At least 30 million reads were available for each sample following trimming. Reads were mapped to the transcript assembly release 6.10 from Flybase51 using Kallisto v0.48.0 with recommended settings52 summarized to the gene level using tximport v1.12.353. Differential gene expression analysis was performed with DESeq254 with the read counts generated from Kallisto. Filtering in DESeq2 was conducted to remove predicted transcripts with fewer two mapped reads. Selection-specific effects to identify overlapping differences among lines were determined by a nested analysis that included each line and replicates. An adjusted p-value of ≤ 0.01 was used to identify genes as differentially expressed. Specific enriched gene ontology (GO) categories were determined using g:Profiler with gene sets increased and decreased during selection analyzed separately55 and treemaps to visualize the GO was generated with REVIGO56.

Starvation assay, nutritional reserve levels, oxygen consumption

Flies were collected following 18–22 generations of selection for these different assays. Flies were transferred to 1% agar vials to provide water without nutrients (1 or 3 males per vial, no difference was noted in the duration of starvation between the two groups, and the results were combined), and the number of dead flies was noted every eight hours until all flies were dead. Nutrient reserve levels were measured during starvation based on previously used methods22,57, which use spectrophotometric assays to establish the lipid and protein levels in relation to the dry mass of flies and relative to a protein or lipid standard. Differences in oxygen consumption between selected and control lines were determined using a microrespirometer57,58,59. In brief, individual flies were placed in microrespirometers were positioned in a water bath (25 °C) and were allowed 15 min to equilibrate before measurements. CO2 production, measured through the movement of KOH, was measured every hour for 6 h. Assuming that one mole of O2 is consumed for every mole of CO2 released, oxygen consumption was calculated using the distance traveled by the KOH and expressed as μl O2 mg dry mass−1 h−1.

Sleep and activity assessment

The rest-activity rhythms of the flies (control, selected, and sleep lines) were quantified with the aid of a Locomotor Activity Monitor 25 (LAM25) system (TriKinetics Inc., Waltham, MA, USA) and the DAMSystem3 Data Collection Software (TriKinetics). Flies were collected after 19–31 generations of selection and those from the sleep inbred panel29 were used for these assays. Individuals were loaded into 25 × 150 mm clear glass tubes with access to fly media provided ad libitum. The glass tubes were then positioned horizontally in the LAM25 system, allowing the simultaneous recording of 32 individuals in an “8 × 4” horizontal by vertical matrix. For measuring a single Drosophila, the area of movement for each fly was reduced to only 1 cm on each side of the IR beam by adjusting the cotton plug distance to yield a smaller area between the plus and fly media. Replicates were intermixed between trials to allow for randomization. The entire set-up was placed in a light-proof incubator supplied with its own lighting system at 24 °C, 70–75% RH, under a 12 h:12 h L/D cycle. Following the acclimation of individuals for 48 h, activity level was measured in 1 min bins (as the number of times an individual crosses an infrared beam), and sleep was defined as 5 min of continuous inactivity29,32. This allows for the determination of sleep bouts, duration of bouts (how long each of the sleep bouts lasted past the five minute period), and total sleep. Data collected with the DAMSystem3 was processed using the Rethomics platform in R with its associated packages including behavr, ggetho, damr and sleepr60. No differences were noted in the sleep bouts or total sleep, but the duration of bouts were significantly different between control and selected lines. Although sleep is related to activity, there are distinct differences in the quantification of activity and sleep, and sleep levels are not directly an inverse of general activity levels.

Mite activity assays were performed by filling half of 25 × 150 mm clear glass vials with mite media22 and placing the vials vertically in a LAM25 system. During visual observation, mites were observed moving out of the media into the open space during the day and night. The infrared beams from the LAM25 system were placed 3 mm above the media to track mites as they moved out of the media. The system was placed under the same light, temperature, and humidity conditions as used in the fly assay. These assays serve as a proxy for mite emergence from the media to interact with the fruit flies.

Statistical analyses

For all analyses, we used the R software61 and plots were generated with ggplot. Survival analyses were determined with a Kaplan-Meier test and compared with a general Wilcoxon test. General linear models were used to examine the interactions between selection status and response variables where replicates for each selection and control lines are nested as a random effect within the selection and control treatments to establish that effects are significant among control and selected groups. Statistical outputs and replicate numbers are provided within the figure legends.