# Host genetics and pathogen species modulate infection-induced changes in social aggregation behaviour

Valéria Romano, Amy Lussiana, Katy Monteith, Andrew Macintosh, Pedro Vale

► To cite this version:

Valéria Romano, Amy Lussiana, Katy Monteith, Andrew Macintosh, Pedro Vale. Host genetics and pathogen species modulate infection-induced changes in social aggregation behaviour. Biology Letters, 2022, 18 (8), pp.20220233. 10.1098/rsbl.2022.0233. hal-04059743

HAL Id: hal-04059743

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

Submitted on 14 Nov 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
Research

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

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

**Cite this article:** Romano V, Lussiana A, Monteith KM, MacIntosh AJJ, Vale PF. 2022 Host genetics and pathogen species modulate infection-induced changes in social aggregation behaviour. *Biol. Lett.* **18**: 20220233.

https://doi.org/10.1098/rsbl.2022.0233

Received: 17 May 2022

Accepted: 10 August 2022

**Subject Areas:**

behaviour, ecology, health and disease and epidemiology

**Keywords:**

social aggregation, infection avoidance,
sickness behaviour, genetic variation,
pathogen dose, bacterial infection

**Author for correspondence:**

Pedro F. Vale

e-mail: pedro.vale@ed.ac.uk

Electronic supplementary material is available online at https://doi.org/10.6084/m9 figshare. c.6158650.

# Host genetics and pathogen species modulate infection-induced changes in social aggregation behaviour

Valéria Romano<fnref n="1" />,<fnref n="3" />, Amy Lussiana<fnref n="2" />, Katy M. Monteith<fnref n="2" />,
Andrew J. J. MacIntosh<fnref n="3" /> and Pedro F. Vale<fnref n="2" />

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

VR, 0000-0002-4128-9205; PFV, 0000-0003-4558-9202

Identifying how infection modifies host behaviours that determine social contact networks is important for understanding heterogeneity in infectious disease dynamics. Here, we investigate whether group social behaviour is modified during bacterial infection in fruit flies (*Drosophila melanogaster*) according to pathogen species, infectious dose, host genetic background and sex. In one experiment, we find that systemic infection with four different bacterial species results in a reduction in the mean pairwise distance within infected female flies, and that the extent of this change depends on pathogen species. However, susceptible flies did not show any evidence of avoidance in the presence of infected flies. In a separate experiment, we observed genetic- and sex-based variation in social aggregation within infected, same-sex groups, with infected female flies aggregating more closely than infected males. In general, our results confirm that bacterial infection induces changes in fruit fly behaviour across a range of pathogen species, but also highlight that these effects vary between fly genetic backgrounds and can be sex-specific. We discuss possible explanations for sex differences in social aggregation and their consequences for individual variation in pathogen transmission.

## 1. Background

Understanding how infection modifies group behaviour, thereby altering social connectivity and transmission dynamics, is a central focus of infectious disease research [1–5]. We can consider several types of behavioural responses to infection [6,7]. Infection avoidance is the first line of behavioural defence, where hosts modify their behaviour if they perceive an infection risk in their environment or from conspecifics [8–11]. This may include spatial or habitat avoidance [12,13], trophic avoidance [11,14,15] and social avoidance [11,16]. Nevertheless, it is rarely possible to completely avoid infection, as many common infection routes involve activities that are central to organismal physiology and fitness, including foraging and feeding. Once infected, as part of a generalized sickness response, individuals may actively self-isolate or due to their lethargic behaviour, engage in fewer social interactions [17–19], while uninfected individuals may also actively avoid those showing signals of infection [8,9,20]. Altogether, this variation in social behaviour drives the likelihood of pathogen transmission [2,21].

The extent to which hosts modify their behaviour during infection is likely to depend on their environmental and social contexts [22–24], as well as on host

<footnote n="1">¹IMBE, Aix Marseille Univ., Avignon Univ., CNRS, IRD, Marseille, France</footnote>

<footnote n="2">²Institute of Evolutionary Biology, School of Biological Sciences, University of Edinburgh, Edinburgh, UK</footnote>

<footnote n="3">³Kyoto University Wildlife Research Center, Japan</footnote>
and pathogen genetic factors [25–27]. For example, following an immune challenge, isolated zebra finches show reduced activity, but those kept in a colony setting do not [18], while in fruit flies, social aggregation and infection risk varies according to the sex ratio of the group [23]. It is therefore important to investigate the effect of different sources of variation in infection-induced changes in insect social behaviour. The fruit fly *Drosophila melanogaster* is particularly powerful model to address this question due to its genetic tractability and its extensive use as a model of host-pathogen interactions and behavioural ecology and genetics [22,27–29]. For example, social behaviour in *D. melanogaster* shows moderate heritability and responds to directional selection [22,27]. Here, we investigate how the behavioural response to infection in *Drosophila* is modified by pathogen species and infectious dose, or host genetic background and sex.

In one experiment, we focus on pathogen sources of variation and ask how social aggregation behaviour changes over time when flies are exposed to either low or high doses of different bacterial pathogens. We used social groups comprised of both infected and susceptible individuals, which allowed us to test how infection affects the behaviour of infected flies, how the presence of infected flies affects the behaviour of susceptible flies, and whether there is any evidence that healthy flies show avoidance behaviour towards infected conspecifics. In a separate experiment, we inquire how host genetic background generates differences in social aggregation following infection, and how these effects differ between males and females.

## 2. Material and methods

### (a) Fly lines

In experiment 1 (pathogen variation), we used female flies from a large outbred population, originally derived from DGRP (*Drosophila* Genetic Reference Panel). In experiment 2 (host variation), we used male and female flies from 10 DGRP lines (RAL-208, RAL-852, RAL-427, RAL-304, RAL-21, RAL-375, RAL-28, RAL-324, RAL-358, RAL-712) selected to include a range of sociality scores [30]. Detailed rearing conditions are provided in the electronic supplementary material.

### (b) Bacterial strains and culture

In experiment 1, we established systemic infections with one of four species of bacterial pathogen with well-described pathology in *D. melanogaster*: *Enterococcus faecalis*, *Pseudomonas entomophila*, *Serratia marcescens* DB11 and *Providencia rettgeri*. In experiment 2, we used a single bacterial fly pathogen, *P. entomophila*. Detailed culture conditions are provided in the electronic supplementary material.

### (c) Experiment 1 (pathogen variation)

Social interaction chambers consisted of 50 mm Petri dishes containing 8% sugar-agar medium. In total, we set up 24-replicate social groups for each pathogen and dose (N = 192), plus 24 control groups. Flies were anaesthetized using light CO₂ and infected in the mesopleuron with one of four bacterial pathogens at OD 0.1 or 0.01 using a 0.14 mm diameter stainless steel pin. Control flies received an equivalent inoculation with sterile LB. The experiment was blocked over 4 consecutive days (10.00–14.00), with chambers including all treatments spread across each block. Each Petri dish contained six uninfected, susceptible

<table><caption>**Table 1.** Outputs for ANOVA performed on social aggregation testing (A) intra-class pairwise distance within infected flies, (B) intra-class pairwise distance within susceptible flies, (C) inter-class pairwise distance between infected and susceptible flies.</caption><thead><tr><th></th><th>F</th><th>d.f.</th><th>p-value</th></tr></thead><tbody><tr><td colspan="4">(A) intra-class infected</td></tr><tr><td>pathogen</td><td>4.501</td><td>4</td><td>0.001</td></tr><tr><td>dose</td><td>0.782</td><td>1</td><td>0.377</td></tr><tr><td>time</td><td>0.276</td><td>1</td><td>0.6</td></tr><tr><td>pathogen × dose</td><td>2.568</td><td>3</td><td>0.053</td></tr><tr><td>pathogen × time</td><td>1.373</td><td>4</td><td>0.241</td></tr><tr><td>dose × time</td><td>0.597</td><td>1</td><td>0.44</td></tr><tr><td>pathogen × dose × time</td><td>0.123</td><td>3</td><td>0.947</td></tr><tr><td colspan="4">(B) intra-class susceptible</td></tr><tr><td>pathogen</td><td>0.959</td><td>4</td><td>0.429</td></tr><tr><td>dose</td><td>2.084</td><td>1</td><td>0.149</td></tr><tr><td>time</td><td>6.192</td><td>1</td><td>0.013</td></tr><tr><td>pathogen × dose</td><td>3.38</td><td>3</td><td>0.018</td></tr><tr><td>pathogen × time</td><td>1.757</td><td>4</td><td>0.135</td></tr><tr><td>dose × time</td><td>0.184</td><td>1</td><td>0.668</td></tr><tr><td>pathogen × dose × time</td><td>0.303</td><td>3</td><td>0.823</td></tr><tr><td colspan="4">(C) inter-class infected-susceptible</td></tr><tr><td>pathogen</td><td>1.345</td><td>4</td><td>0.251</td></tr><tr><td>dose</td><td>1.972</td><td>1</td><td>0.161</td></tr><tr><td>time</td><td>1.728</td><td>1</td><td>0.189</td></tr><tr><td>pathogen × dose</td><td>1.87</td><td>3</td><td>0.133</td></tr><tr><td>pathogen × time</td><td>1.463</td><td>4</td><td>0.211</td></tr><tr><td>dose × time</td><td>2.488</td><td>1</td><td>0.115</td></tr><tr><td>pathogen × dose × time</td><td>1.064</td><td>3</td><td>0.364</td></tr></tbody></table>

female flies and six female flies infected with a specific bacterial pathogen at a specific dose. Infected flies were marked with red fluorescent powder on the prothorax and the underside of the abdomen using a cotton bud (electronic supplementary material, figure S1). Control plates were also set up containing 12 uninfected individuals, with half marked as above. Flies were allowed an hour of recovery from the systemic infection and marking before being re-anaesthetized using light CO₂ and added to the social interaction chambers. Thirty minutes were allowed for habituation before photos of the groups were taken every 30 min until 4 h post-infection. Pictures were processed in **IMAGEJ**, to estimate coordinates of each individual. Social aggregation was then measured using the *pairdist* function in the *spatstat* package in R [31] (electronic supplementary material, figure S2). The pairwise distance between each pair of flies within a dish was used to calculate three sociality metrics per dish: (i) the mean pairwise distance between infected flies, which is relevant to evaluate changes in aggregation due to sickness behaviour; (ii) the mean pairwise distance between susceptible flies, and (iii) the mean pairwise distance between infected and susceptible flies, which enables testing whether susceptible flies tend to avoid infected flies, when compared to the control group. Therefore, each dish resulted in two intra-class measures (within infected and within susceptible) and one inter-class measures (between infected and susceptible).
<figure><img src="image_5.png" /></figure>

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

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

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

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

<figure><img src="image_10.png" /><figcaption>**Figure 1.** Mean pairwise distance in millimetres (mm) when considering (a,b) intra-class distance within infected flies, (c,d) intra-class distance within susceptible flies, (e,f) inter-class distance between infected and susceptible flies, of both low (O.D. 0.01) and high (O.D. 0.1) doses. (a,c,e) The mean pairwise distance (mm) ± s.e. (b,d,f) The mean pairwise distance (mm) for each pathogen and dose, averaged across all time points. Time points refer to the interval of data collection: nine pictures taken every 30 min post-infection. Intra-class infected flies aggregated significantly closer than control flies (b).</figcaption></figure>

### (d) Experiment 2 (host variation)

For each of the 10 fly lines, we set up single-sex groups of flies, divided into infected and control, and each fly line-sex-treatment was replicated 11–12 times, for a total of 466 social aggregation assays. Each group consisted of 12 flies systemically infected with *P. entomophila* (or sterile LB medium for uninfected control groups) using a stainless pin. Following infection, flies were lightly anaesthetized with CO₂ and transferred to 55 mm Petri dishes containing agar. After a 30-min habituation period, one set of photographs were taken. Here we used the median nearest neighbour distance (NND) of each group as a measure of social aggregation [25,30]. Individual fly positions in each image were marked in the middle of the fly thorax using Fiji (Fiji Is Just ImageJ), and the nearest neighbour distances between each pair of flies was calculated using the ‘NND’ plugin within the software Fiji [32].

### (e) Statistical analysis

All raw data and analysis R code are available at https://doi.org/10.5281/zenodo.6554320 [33]. Data from experiment 1 were analysed using linear mixed effects models, separately for each social class (i.e. within infected, within susceptible, between infected and susceptible). We used the mean pairwise distance as

the response factor, pathogen, dose and time as predictor variables, and day of assay as a random effect. For experiment 2, we used a linear mixed effects model with the $log_{10}$ of median NND as the response variable, line, sex and infection status as predictors, and day of the assay as a random effect. All possible interactions between line, sex and infection status were included. A more detailed description of the analysis can be found in the electronic supplementary material.

## 3. Results

### (a) Pathogen drivers of social aggregation

#### (i) Intra-class infected

Our analysis showed a significant effect of pathogen species on the mean pairwise distance within infected flies, with a non-significant trend for an interaction between dose and pathogen (table 1 and figure 1a,b). This trend is likely driven by flies infected with low dose (OD = 0.01) of *P. entomophila* (electronic supplementary material, table S1; *p* = 0.0005) and high dose (OD = 0.1) of *E. faecalis* (*p* = 0.005) and *S. marcescens* (*p* = 0.04) aggregating closer together when compared with control
<figure><img src="image_11.png" /><figcaption>**Figure 2.** (a) Box plots showing the NND in millimetres (mm) for males and females (uninfected and infected) among DGRP lines. Grey data points indicate outliers. (b) Plot of infection status and sex, based on median NND in millimetres (mm). Females, but not males, aggregate more closely following infection.</figcaption></figure>

uninfected flies. When comparing the overall rate of social aggregation within infected flies to uninfected control flies, we observed that infection with almost all tested pathogens resulted in a reduction in mean pairwise distance when compared to controls: low dose (OD = 0.01) = 1.25 mm for *E. faecalis* (post-hoc Dunnett's test, *p* ≤ 0.05), 2.61 mm for *P. entomophila* (*p* < 0.001), 1.05 mm for *P. rettgeri* (*p* = 0.11) and 1.78 mm for *S. marcescens* (*p* < 0.01). High dose (OD = 0.1) = 2.19 mm for *E. faecalis* (*p* < 0.001), 1.47 mm for *P. entomophila* (*p* ≤ 0.05), 1.63 mm for *P. rettgeri* (*p* ≤ 0.01) and 1.76 mm for *S. marcescens* (*p* < 0.01).

## (ii) Intra-class susceptible

Among the subgroup of susceptible flies, we observed a reduction in the pairwise distance over the course of the experiment (table 1, time effect, *p* = 0.013) and an interaction

between dose and pathogen (table 1, *p* = 0.018, figure 1c,d). We did not observe any difference between the overall aggregation pattern of susceptible flies when compared to control groups: *E. faecalis* (electronic supplementary material, table S1; post-hoc Dunnett's test, OD = 0.01: *p* = 0.98; OD = 0.1: *p* = 0.65), *P. entomophila* (OD = 0.01: *p* = 0.96; OD = 0.1: *p* = 1), *P. rettgeri* (OD = 0.01: *p* = 0.32, OD = 0.1: *p* = 0.97) and *S. marcescens* (OD = 0.01: *p* = 0.59, OD = 0.1: *p* = 0.42).

## (iii) Inter-class infected-susceptible

We did not find any effect of pathogen, dose and/or time when testing the inter-class distance between infected and susceptible flies (table 1 and figure 1e,f), providing no evidence of social avoidance between susceptible and infectious flies in our experiments.
<table><caption>**Table 2.** Output for ANOVA performed on social aggregation testing the influence of male and female flies of 10 DGRP lines.</caption><thead><tr><th></th><th>F</th><th>d.f.</th><th>p-value</th></tr></thead><tbody><tr><td>line</td><td>4.676</td><td>9</td><td>&lt;0.0001</td></tr><tr><td>sex</td><td>4.758</td><td>1</td><td>0.03</td></tr><tr><td>infection status</td><td>1.756</td><td>1</td><td>0.186</td></tr><tr><td>line × sex</td><td>1.05</td><td>9</td><td>0.399</td></tr><tr><td>line × infection status</td><td>1.448</td><td>9</td><td>0.166</td></tr><tr><td>sex × infection status</td><td>4.959</td><td>1</td><td>0.026</td></tr><tr><td>line × sex × infection status</td><td>0.626</td><td>9</td><td>0.775</td></tr></tbody></table>

## (b) Host drivers of social aggregation

In a second experiment, we tested whether social aggregation following systemic *P. entomophila* infection differs between flies of different genetic backgrounds and sex. We found that social aggregation is explained by host DGRP line (figure 2a and table 2, Line effect, *p* = 0.001) and that patterns of social aggregation differed between males and females (table 2, sex effect, *p* = 0.03). We also observed a significant interaction between sex and infection status (table 2, *p* = 0.026, figure 2b). While male and female flies have near identical NND aggregation in the absence of infection (*p* = 1, least-square means, *t* = 0.15), infected females aggregated more closely than infected males by 1.15 mm (electronic supplementary material, table S2; *p* = 0.01, *t* = -3.04, figure 2b). This sex difference in post-infection aggregation was observed regardless of DGRP line (there was no significant line × sex × infection interaction, table 2).

## 4. Discussion

Social avoidance of infection is a widespread mechanism of defence in the animal kingdom [9,34]. Sick individuals may decrease social connectivity due to lethargic behaviour or actively self-isolate [16,35], but they can also be avoided by healthy individuals to avoid direct routes of infection [9,20,36]. This social behavioural flexibility leads to detectable changes in the group social structure, which affects the risk of contagion among individuals [2,37]. In this study, we observed increased aggregation (shorter distances) within female infected flies—which may be due to a sickness response—but we did not find evidence that infected and susceptible flies tend to avoid each other. Given males have a body length of 1.5–2.5 mm, while females are slightly larger (1.7–3 mm) [25], the largest effects we found mean flies would be nearly a full body length closer to each group member.

Distinct ways of modifying social aggregation have been described in different social insects and may occur due to host's social context (e.g. sex ratio, [23], alteration of feeding patterns [15], or changes in oviposition site choice [11]). An additional source of changes in infected host behaviour, which we did not explore in the current study, is that pathogens can often manipulate the behaviour of their hosts to increase the likelihood of transmission [7,38,39]. One relevant example relates to the increased production of attraction pheromones in flies infected with *P. entomophila*,

resulting in increased aggregation between healthy and infected flies [40]. It is unclear if the increased aggregation in females we observed could have been mediated by similar pathogen-derived effects.

Regarding sex-specific aggregation during infection, these appear to be pathogen specific. While this study found increased aggregation of female flies infected with pathogenic bacteria (relative to no change in males), other work identified sex differences in the opposite direction during virus infection, where males infected with *Drosophila* C virus aggregated further apart, with no apparent change in female social behaviour following DCV infection [25]. A recent analysis of 59 F₁-hybrids derived from the DGRP panel (the same panel of flies used here) also reported little correlation between the sociability of male and female flies [27].

One possible explanation is that sex differences are a consequence of sex-based costs of social aggregation [41–43]. Given that males usually display costly aggressive behaviours [44], avoiding aggregating closely when infected may also avoid the costs of aggressive encounters, while saving resources for immune deployment [45]. Female flies, however, employ generally less costly aggressive behaviours [46,47]. Differences in social aggregation costs could therefore explain why infected females aggregate more closely than males, and maintaining or augmenting sociality during infection has been suggested to reduce the impact of infection in some systems [4].

We also found that genetic background strongly influences social aggregation in fruit flies. This result confirms previous findings [25,27,30], where sociality in *D. melanogaster* exhibits moderate broad sense heritability (*H*² = 0.21–0.24) [27], and responds readily to directional selection [48]. This large variation is to be expected for a polygenic trait such as sociality [27], and is not just characteristic of insects, as genetic background has been also found to influence social behaviours in humans and other mammalian species [9,49].

In summary, we find that flies modify their social behaviour following bacterial infection. These differences were pathogen and dose dependent, and for at least one pathogen species, this response was sexually dimorphic, with infected females aggregating more closely than infected males. Our work therefore contributes to further our understanding of this important driver of infection dynamics and of the ecology and evolution of both hosts and pathogens [2,4,36].

**Data accessibility.** All raw data and analysis R code are available at https://doi.org/10.5281/zenodo.6554320 [33].

Electronic supplementary material is available online [50].

**Authors' contributions.** V.R.: conceptualization, data curation, formal analysis, investigation, methodology, visualization, writing—review and editing; A.L.: formal analysis, visualization, writing—original draft, writing—review and editing; K.M.M.: conceptualization, investigation, methodology, writing—review and editing; A.J.J.M.: conceptualization, supervision, writing—review and editing; P.F.V.: conceptualization, formal analysis, funding acquisition, investigation, project administration, resources, supervision, visualization, writing—original draft, writing—review and editing.

All authors gave final approval for publication and agreed to be held accountable for the work performed therein.

**Conflict of interest declaration.** We declare we have no competing interests.

**Funding.** This work was partially funded by a Society in Science Branco Weiss Fellowship, and a Chancellor's Fellowship, both awarded to P.F.V. V.R. was an International Research Fellow from the Japan Society for the Promotion of Science (JSPS), grant no. P17803.
References

1. Barron D, Gervasi S, Pruitt J, Martin L. 2015 Behavioral competence: how host behaviors can interact to influence parasite transmission risk. *Curr. Opin. Behav. Sci.* **6**, 35–40. (doi:10.1016/j.cobeha. 2015.08.002)

2. Romano V, MacIntosh AJJ, Sueur C. 2020 Stemming the flow: information, infection, and social evolution. *Trends Ecol. Evol.* **35**, 849–853. (doi:10. 1016/j.tree.2020.07.004)

3. White LA, Siva-Jothy JA, Craft ME, Vale PF. 2020 Genotype and sex-based host variation in behaviour and susceptibility drives population disease dynamics. *Proc. R. Soc. B* **287**, 20201653. (doi:10. 1098/rspb.2020.1653)

4. Hawley DM, Gibson AK, Townsend AK, Craft ME, Stephenson JF. 2021 Bidirectional interactions between host social behaviour and parasites arise through ecological and evolutionary processes. *Parasitology* **148**, 274–288. (doi:10.1017/ S0031182020002048)

5. Craft ME. 2015 Infectious disease transmission and contact networks in wildlife and livestock. *Phil. Trans. R. Soc. B* **370**, 20140107. (doi:10.1098/rstb. 2014.0107)

6. de Roode JC, Lefèvre T. 2012 Behavioral immunity in insects. *Insects* **3**, 789–820. (doi:10.3390/ insects3030789)

7. Vale PF, Siva-Jothy JA, Morrill A, Forbes MR. 2018 The influence of parasites on insect behavior. In *Insect behavior: from mechanisms to ecological and evolutionary consequences* (eds A Córdoba-Aguilar, D González-Tokman, I González-Santoyo), pp. 274–291. Oxford, UK: Oxford University Press.

8. Behringer DC, Butler MJ, Shields JD. 2006 Ecology: avoidance of disease by social lobsters. *Nature* **441**, 421. (doi:10.1038/441421a)

9. Curtis VA. 2014 Infection-avoidance behaviour in humans and other animals. *Trends Immunol.* **35**, 457–464. (doi:10.1016/j.it.2014.08.006)

10. Eakin L, Wang M, Dwyer G. 2015 The effects of the avoidance of infectious hosts on infection risk in an insect–pathogen interaction. *Am. Nat.* **185**, 100–112. (doi:10.1086/678989)

11. Siva-Jothy JA, Monteith KM, Vale PF. 2018 Navigating infection risk during oviposition and cannibalistic foraging in a holometabolous insect. *Behav. Ecol. Off. J. Int. Soc. Behav. Ecol.* **29**, 1426–1435. (doi:10.1093/beheco/ary106)

12. Amano H, Hayashi K, Kasuya E. 2008 Avoidance of egg parasitism through submerged oviposition by tandem pairs in the water strider, *Aquarius paludum insularis* (Heteroptera: Gerridae). *Ecol. Entomol.* **33**, 560–563. (doi:10.1111/j.1365-2311. 2008.00988.x)

13. Mierzejewski MK, Horn CJ, Luong LT. 2019 Ecology of fear: environment-dependent parasite avoidance among ovipositing *Drosophila*. *Parasitology* **146**, 1564–1570. (doi:10.1017/S0031182019000854)

14. Parker BJ, Elderd BD, Dwyer G. 2010 Host behaviour and exposure risk in an insect–pathogen

interaction. *J. Anim. Ecol.* **79**, 863–870. (doi:10. 1111/j.1365-2656.2010.01690.x)

15. Kobler JM, Rodriguez Jimenez FJ, Petcu I, Grunwald Kadow IC. 2020 Immune receptor signaling and the mushroom body mediate post-ingestion pathogen avoidance. *Curr. Biol.* **30**, 4693–4709.e3. (doi:10.1016/j.cub.2020. 09.022)

16. Bos N, Lefèvre T, Jensen AB, D'ettorre P. 2012 Sick ants become unsociable. *J. Evol. Biol.* **25**, 342–351. (doi:10.1111/j.1420-9101.2011. 02425.x)

17. Hart BL. 1988 Biological basis of the behavior of sick animals. *Neurosci. Biobehav. Rev.* **12**, 123–137. (doi:10.1016/s0149-7634(88)80004-6)

18. Lopes PC, French SS, Woodhams DC, Binning SA. 2021 Sickness behaviors across vertebrate taxa: proximate and ultimate mechanisms. *J. Exp. Biol.* **224**, jeb225847. (doi:10.1242/jeb. 225847)

19. Kazlauskas N, Klappenbach M, Depino AM, Locatelli FF. 2016 Sickness behavior in honey bees. *Front. Physiol.* **7**, 261. (doi:10.3389/fphys.2016. 00261)

20. Meisel JD, Kim DH. 2014 Behavioral avoidance of pathogenic bacteria by *Caenorhabditis elegans*. *Trends Immunol.* **35**, 465–470. (doi:10.1016/j.it. 2014.08.008)

21. Stockmaier S, Stroeymeyt N, Shattuck EC, Hawley DM, Meyers LA, Bolnick DI. 2021 Infectious diseases and social distancing in nature. *Science* **371**, eabc8881. (doi:10.1126/science. abc8881)

22. Dukas R. 2020 Natural history of social and sexual behavior in fruit flies. *Sci. Rep.* **10**, 21932. (doi:10. 1038/s41598-020-79075-7)

23. Keiser CN, Rudolf VHW, Sartain E, Every ER, Saltz JB. 2018 Social context alters host behavior and infection risk. *Behav. Ecol.* **29**, 869–875. (doi:10. 1093/beheco/ary060)

24. Lopes PC, Adelman J, Wingfield JC, Bentley GE, Wingfield JC, Lopes PC, Adelman J. 2012 Social context modulates sickness behavior. *Behav. Ecol. Sociobiol.* **66**, 1421–1428. (doi:10.1007/s00265-012- 1397-1)

25. Siva-Jothy JA, Vale PF. 2019 Viral infection causes sex-specific changes in fruit fly social aggregation behaviour. *Biol. Lett.* **15**, 20190344. (doi:10.1098/ rsbl.2019.0344)

26. Keiser CN, Rudolf VHW, Luksik MC, Saltz JB. 2020 Sex differences in disease avoidance behavior vary across modes of pathogen exposure. *Ethology* **126**, 304–312. (doi:10.1111/eth.12969)

27. Scott AM, Dworkin I, Dukas R. 2018 Sociability in fruit flies: genetic variation, heritability and plasticity. *Behav. Genet.* **48**, 247–258. (doi:10.1007/ s10519-018-9901-7)

28. Dubnau J. 2014 *Behavioral genetics of the fly* (*Drosophila melanogaster*). Cambridge, UK: Cambridge University Press.

29. Buchon N, Silverman N, Cherry S. 2014 Immunity in *Drosophila melanogaster* — from microbial recognition to whole-organism physiology. *Nat. Rev. Immunol.* **14**, 796–810. (doi:10.1038/ nri3763)

30. Anderson BB, Scott A, Dukas R. 2016 Social behavior and activity are decoupled in larval and adult fruit flies. *Behav. Ecol.* **27**, 820–828. (doi:10.1093/ beheco/arv225)

31. R Core Team. 2018 R: a language and environment for statistical computing. Vienna, Austria: R Foundation for Statistical Computing. See http:// www.R-project.org/.

32. Schindelin et al. 2012 Fiji: an open-source platform for biological-image analysis. *Nature methods* **9**, 676–682.

33. Romano V, Lussiana A, Monteith KM, Macintosh AJJ, Vale PF. 2022 Host genetics and pathogen species modulate infection-induced changes in social aggregation behaviour. Zenodo. (doi:10.5281/zenodo.6554320)

34. Curtis V, de Barra M, Aunger R. 2011 Disgust as an adaptive system for disease avoidance behaviour. *Phil. Trans. R. Soc. B* **366**, 389–401. (doi:10.1098/ rstb.2010.0117)

35. Cremer S, Armitage SAO, Schmid-Hempel P. 2007 Social immunity. *Curr. Biol.* **17**, R693–R702. (doi:10. 1016/j.cub.2007.06.008)

36. Buck JC, Weinstein SB, Young HS. 2018 Ecological and evolutionary consequences of parasite avoidance. *Trends Ecol. Evol.* **33**, 619–632. (doi:10. 1016/j.tree.2018.05.001)

37. Lopes PC, Block P, König B. 2016 Infection-induced behavioural changes reduce connectivity and the potential for disease spread in wild mice contact networks. *Sci. Rep.* **6**, 31790. (doi:10.1038/ srep31790)

38. Poulin R, Brodeur J, Moore J. 1994 Parasite manipulation of host behaviour: should hosts always lose? *Oikos* **70**, 479–484. (doi:10.2307/ 3545788)

39. van Houte S, Ros VID, van Oers MM. 2013 Walking with insects: molecular mechanisms behind parasitic manipulation of host behaviour. *Mol. Ecol.* **22**, 3458–3475. (doi:10.1111/mec.12307)

40. Keesey IW, Koerte S, Khallaf MA, Retzke T, Guillou A, Grosse-Wilde E, Buchon N, Knaden M, Hansson BS. 2017 Pathogenic bacteria enhance dispersal through alteration of *Drosophila* social communication. *Nat. Commun.* **8**, 265. (doi:10.1038/ s41467-017-00334-9)

41. Yanagawa A, Guigue AMA, Marion-Poll F. 2014 Hygienic grooming is induced by contact chemicals in *Drosophila melanogaster*. *Front. Behav. Neurosci.* **8**, 254.

42. Vale PF, Jardine MD. 2015 Sex-specific behavioural symptoms of viral gut infection and *Wolbachia* in *Drosophila melanogaster*. *J. Insect Physiol.* **82**, 28–32. (doi:10.1016/j.jinsphys.2015.08.005)

43. Kelly CD, Stoehr AM, Nunn C, Smyth KN, Prokop ZM. 2018 Sexual dimorphism in immunity across
animals: a meta-analysis. *Ecol. Lett.* **21**, 1885–1894.
(doi:10.1111/ele.13164)

44. Chen S, Lee AY, Bowens NM, Huber R, Kravitz EA. 2002 Fighting fruit flies: a model system for the study of aggression. *Proc. Natl. Acad. Sci. USA* **99**, 5664–5668. (doi:10.1073/pnas. 082102599)

45. Adamo SA, Gomez-Juliano A, LeDue EE, Little SN, Sullivan K. 2015 Effect of immune challenge on aggressive behaviour: how to fight two battles at once. *Anim. Behav.* **105**, 153–161. (doi:10.1016/j.anbehav.2015.04.018)

46. Ueda A, Kidokoro Y. 2002 Aggressive behaviours of female *Drosophila melanogaster* are influenced by their social experience and food resources. *Physiol. Entomol.* **27**, 21–28. (doi:10.1046/j.1365-3032.2002.00262.x)

47. Nilsen SP, Chan Y-B, Huber R, Kravitz EA. 2004 Gender-selective patterns of aggressive behavior in *Drosophila melanogaster*. *Proc. Natl. Acad. Sci. USA* **101**, 12342–12347. (doi:10.1073/pnas.0404693101)

48. Scott AM, Dworkin I, Dukas R. 2022 Evolution of sociability by artificial selection.

*Evolution* **76**, 541–553. (doi:10.1111/evo.14370)

49. Anacker AMJ, Beery AK. 2013 Life in groups: the roles of oxytocin in mammalian sociality. *Front. Behav. Neurosci.* **7**, 185. (doi:10.3389/fnbeh.2013.00185)

50. Romano V, Lussiana A, Monteith KM, Macintosh AJJ, Vale PF. 2022 Host genetics and pathogen species modulate infection-induced changes in social aggregation behaviour. *Figshare*. (doi:10.6084/m9 figshare.c.6158650)