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

# Non-lethal fungal infection could reduce aggression towards strangers in ants

Enikő Csata ID 1,2,6✉️, Luca Pietro Casacci ID 3,6✉️, Joachim Ruther<fnref n="1" />, Abel Bernadou ID 1,4, Jürgen Heinze ID 1 & Bálint Markó ID 2,5

Many parasites interfere with the behaviour of their hosts. In social animals, such as ants, parasitic interference can cause changes on the level of the individual and also on the level of the society. The ant-parasitic fungus *Rickia wasmannii* influences the behaviour of *Myrmica* ants by expanding the host's nestmate recognition template, thereby increasing the chance of the colony accepting infected non-nestmates. Infected ants consistently show an increase of the alkane tricosane (*n*-C23) in their cuticular hydrocarbon profiles. Although experimental application of single compounds often elicits aggression towards manipulated ants, we hypothesized that the increase of *n*-C23 might underlie the facilitated acceptance of infected non-nestmates. To test this, we mimicked fungal infection in *M. scabrinodis* by applying synthetic *n*-C23 to fresh ant corpses and observed the reaction of infected and uninfected workers to control and manipulated corpses. Infected ants appeared to be more peaceful towards infected but not uninfected non-nestmates. Adding *n*-C23 to uninfected corpses resulted in reduced aggression in uninfected ants. This supports the hypothesis that *n*-C23 acts as a 'pacifying' signal. Our study indicates that parasitic interference with the nestmate discrimination of host ants might eventually change colony structure by increasing genetic heterogeneity in infected colonies.

<footnote n="1">¹Institute for Zoology, University of Regensburg, Universitätsstraße 31, D-93040 Regensburg, Germany. ²Hungarian Department of Biology and Ecology, Babeş-Bolyai University, Clinicilor 5-7, 400006 Cluj-Napoca, Romania. ³Department of Life Sciences and Systems Biology, University of Turin, via Accademia Albertina 13, 10123 Torino, Italy. ⁴Centre de Recherches sur la Cognition Animale (CRCA), Centre de Biologie Intégrative (CBI), Université de Toulouse, CNRS, UPS, 31062 Toulouse, France. ⁵3B Centre for Systems Biology, Biodiversity and Bioresources, Faculty of Biology and Geology, Babeş-Bolyai University, Clinicilor 5-7, 400006 Cluj-Napoca, Romania. ⁶These authors contributed equally: Enikő Csata, Luca Pietro Casacci. ✉email: Eniko.Csata@biologie.uni-regensburg.de; luca.casacci@unito.it</footnote>
Parasites often affect the behaviour, morphology and/or physiology of their hosts in various degrees¹⁻⁶. Parasite-induced modifications are generally quite well-defined in the case of individuals²,⁷,⁸. In social organisms, though, substantial changes can also occur on the level of the society but are less obvious unless the social context is considered⁹. For example, such modifications might impair the capability of social animals to discriminate between related and unrelated individuals¹⁰. Sociality is typically founded on this capability to prevent non-relatives from benefiting from within-group altruistic actions without reciprocating¹¹.

In social insects, the main recognition cues and signals are chemical substances¹²⁻¹⁴, although other signalling modes may also be of importance (vibroacoustic e.g.,¹²,¹⁵,¹⁶; visual¹⁷,¹⁸, tactile¹⁹). The discrimination between strangers (both con- and allospecific) and nestmates is largely based on complex mixtures of long-chain cuticular hydrocarbons (CHC), which cover the surface of individuals. Cuticular profiles can consist of more than 100 different hydrocarbons, mostly linear alkanes, methyl-branched alkanes, and alkenes²⁰. Both qualitative and quantitative differences in these profiles are used by social insects to recognize outsiders²¹⁻²⁴. According to the 'Gestalt' model, the chemical profiles of the nestmates contribute to the formation of a colony-specific odour²⁵ and recognition signals are usually exchanged and homogenised among colony members via passive contact, allogrooming, or trophallaxis, but each individual retains its own chemical profile. Besides colony identity, this profile may encode additional information such as age, task, and sex²⁶⁻³¹. It serves as a template during the recognition process and helps social insects to prevent potential freeloaders and parasites from entering their colonies³².

Many parasites evolved mechanisms to infiltrate insect societies, including passive or active mimicry of host CHC profiles³³,³⁴. For example, larvae of *Maculinea* butterflies are known to synthesize CHCs specific to their host ants³⁵,³⁶, while queens of the slave-making genus *Polyergus* almost instantly acquire CHCs through physical contact with their hosts³⁷. Several fungi, viruses, mites, or tapeworms may elicit changes in the CHC profiles of their hosts within a few hours after infection³⁸⁻⁴². Usually, these changes are restricted to a few infected individuals.

In contrast, the ectoparasitic, non-lethal laboulbenian fungus *Rickia wasmannii* can infect the entire colony without killing it⁴³,⁴⁴ but changing the phenotype of infected individuals⁴³,⁴⁵⁻⁴⁸. Besides behavioural and morphological alterations, *R. wasmannii* interferes with the CHC profile of its *Myrmica scabrinodis* host ants⁴⁶. It increases the variation of CHC profiles among infected colony members and opens the infected society towards strangers, such as infected non-nestmates, foreign queens, and parasitic *Maculinea* larvae. This could cause substantial modifications on the social level, as revealed by our previous study⁴⁶. In addition to the higher variability in their CHC profiles, compared to uninfected workers, infected individuals show a consistent, significant increase in the relative abundance of two linear alkanes, *n*-C23 and *n*-C24, with the most pronounced changes in *n*-C23. While *n*-C24 represents only 1–2% of the overall proportion of cuticular hydrocarbons, *n*-C23 contributes about 14% in uninfected workers and 19% in infected ones, suggesting its potential importance in shaping behaviour⁴⁶.

Previous studies in social Hymenoptera have shown that adding single components to the CHC profile elicits higher aggression⁴⁹⁻⁵². In contrast, *Myrmica* ants reacted less aggressively to ants infected with *R. wasmannii*, despite the increased percentage of *n*-C23, making it a strong candidate for a pacifying compound. Here, we examine by experimental manipulation of the CHC profiles whether (a) the surplus *n*-C23 linked to infection makes the infected host less aggressive towards others, or (b)

it acts on the opponent by pacifying it irrespective of the opponent's health status (Fig. 1).

## Results

The results of the barcoding analyses allowed us to state that the study population undoubtedly belonged to *M. scabrinodis* and fell into a single lineage indicated as *M. scabrinodis* type A⁵³,⁵⁴ (see DNA barcoding in Supplementary Results; Supplementary Fig. 2).

**Baseline aggression.** Almost no aggressive interactions occurred in the control experiments (GLM, *p* = 0.99, *N* = 66, Supplementary Table 2, Supplementary Figs. 3 and 4). Neither uninfected, nor infected *M. scabrinodis* workers showed any aggression towards dummies with removed CHC (*N* = 36). This confirmed the role of CHC profiles in the discrimination process and demonstrated the suitability of the applied CHC-removal procedure in producing ‘odourless’ dummies for further experimental manipulations.

The application of CHC extracts originating from either infected or uninfected workers to CHC-removed dummies resulted in responses by live individuals comparable to corresponding unmanipulated assays in almost all cases, confirming the accuracy of the CHC-transfer method (Fig. 2; Supplementary Table 4): U-I corpse vs U-I extract GLM *p* = 0.54 (Fig. 2b, e); U-U corpse vs U-U extract GLM *p* = 0.36 (Fig. 2a, d); I-U corpse vs I-U extract GLMM *z* = -0.85, *p* = 0.39 (Fig. 2g, j). In a single case we detected significant difference (I-I corpse vs I-I extract, GLM *p* = 0.03; Fig. 2h, k) showing that the application of extracts might not always produce identical effects to natural situation. However, the comparison of U-U extract vs I-I extract (see Supplementary Table 4; Fig. 2d, k) did result in significant effects in line with unmanipulated observations (see below).

In unmanipulated assays, the level of aggression was significantly lower when both ants were infected compared to uninfected counterparts (I-I corpse vs U-U corpse GLM, *p* = 0.0001; Fig. 2a, h; Supplementary Table 4). Generally, infected ants were less aggressive towards both infected (GLM, *p* = 0.002; Fig. 2b, h; Supplementary Table 4), and uninfected corpses (GLM, *p* = 0.05; Fig. 2a, g; Supplementary Table 4) than healthy ones. Infected ants treated infected corpses less aggressively compared to uninfected ones (GLM, *p* = 0.01; Fig. 2g, h; Supplementary Table 4), while healthy workers did not differentiate between cadavers of different health status (GLM, *p* = 0.15; Fig. 2a, b; Supplementary Table 4).

**Manipulation of the CHC profiles.** The aggression of infected workers was significantly lower towards dummies supplemented with cuticular extract from infected individuals in comparison to assays where both were uninfected (GLM, U-U extract vs I-I extract, *p* = 0.01; Fig. 2d, k; Supplementary Table 4), confirming the pattern observed in unmanipulated situation.

Manipulation of CHC profiles in any further combinations resulted in significant changes in the reaction of live ants, especially of uninfected ones, yielding very similar results.

Thus, contrary to what was observed in unmanipulated assays, uninfected ants responded with a significantly reduced aggression towards hexane-washed dummies treated with cuticular extract from infected individuals than to uninfected dummies (GLM, U-I extract vs U-U extract, *p* = 0.008, Fig. 2d, e; Supplementary Table 4). No significant differences were detected in any other comparisons (I-I extract vs I-U extract; I-U extract vs U-U extract; I-I extract vs U-I extract; see Supplementary Table 5). Also the addition of *n*-C23 to uninfected dummies decreased significantly the level of aggression displayed by healthy ants (GLM, U-U + *n*-C23 vs U-U, *p* = 0.001; Fig. 2a, c
<figure><img src="image_2.png" /><figcaption>2. Uninfected and infected corpses</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>3. Hexane-washed corpses treated with CHC extract</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>4. Uninfected corpses treated with *n*-C23</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>5. Hexane-washed corpses treated with CHC extract + *n*-C23</figcaption></figure>

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

**Fig. 1 Schematic representation of the overall experimental design.** The graph shows the five different behavioural experiments which were performed during our study. (1) Corpses were washed five times and the response of ants to hexane-washed dummies was observed. (2) The reactions of live workers were observed towards infected and uninfected dummies. (3) Corpses were washed (see 1 herein), and cuticular extracts from uninfected or infected workers were applied to them. The behavioural responses of live workers were observed towards these dummies, which were obtained from uninfected colonies. (4) The reaction of workers towards uninfected dummies treated with synthetic *n*-C23. (5) The reactions of workers to hexane-washed dummies onto which we had applied cuticular extracts from uninfected workers supplemented with synthetic *n*-C23. I CHC = cuticular hydrocarbon extracts from infected individuals. U CHC = cuticular hydrocarbon extracts from uninfected individuals. Hexane washed corpses (uninfected) are marked with an asterisk (*). Rel Ab = Relative Abundance. The majority of the elements (vial, Petri-dish, syringe) were created by the authors, using freely available elements on the internet (Petri-dish, syringe, vial). The *Myrmica* ant icon was created by Ms. Natalia Timuş, our previous co-author, who gave her consent to the free use of the icon within the manuscript.

Supplementary Table 4). In contrast, no differences were observed between the assays when the live counterpart was already infected (GLMM, I-U vs I-U + *n*-C23 z = 1.49, *p* = 0.13; Fig. 2g, i; Supplementary Table 4).

Similar results were obtained when CHC-stripped dummies which were treated with CHC extracts from untreated ants and additional *n*-C23 were used (see Fig. 2). The supplementation with *n*-C23 of hexane-washed dummies treated with CHC extract from healthy ants also changed the outcome of interactions both in uninfected and infected ants by significantly lowering the aggression (GLM, U-U extract vs U-U extract + *n*-C23,

*p* = 0.001, Col ID *p* = 0.79, *N* = 21, Fig. 2d, f; I-U extract vs I-U extract + *n*-C23 GLM, *p* = 0.01, Col ID *p* = 0.02, *N* = 15, Fig. 2j, l), underlining again the importance of *n*-C23.

**Chemical analyses of treatment efficiency.** In total, 37 hydrocarbons were identified in *M. scabrinodis* reported in Csata et al.⁴⁶ (see Supplementary Table 3). Control extracts from dummies that had been washed five times with hexane contained only traces of four to five CHCs out of 37 being present in non-washed workers (Supplementary Fig. 1). These residues were
<figure><img src="image_7.png" /><figcaption>**Fig. 2** Aggression indices resulting from interaction assays between live uninfected and infected *M. scabrinodis* workers and different types of dummies. The upper part of the graph shows the reactions of uninfected ants towards (a) Uninfected corpse; (b) Infected corpse; (c) Uninfected corpse + *n*-C23; (d) Dummy + uninfected CHC; (e) Dummy + infected CHC; (f) Dummy + Uninfected CHC + *n*-C23. The lower part of the graph shows the reactions of infected ants towards (g) Uninfected corpse; (h) Infected corpse; (i) Uninfected corpse + *n*-C23; (j) Dummy + uninfected CHC; (k) Dummy + infected CHC; (l) Dummy + Uninfected CHC + *n*-C23. Dummies are coloured in grey, while corpses are coloured in dark brown. Box-and-whisker plots with median, 25-75% quartiles, maximum/minimum range and outliers. The *Myrmica* ant icon was created by Ms. Natalia Timuș.</figcaption></figure>

from those compounds with the highest abundance in non-washed ants⁴⁶. The abundance of these major compounds, however, was 10-15 times lower than in the unwashed ants. Therefore, we concluded that the applied method was suitable for obtaining dummies without relevant amounts of cuticular compounds.

The relative abundance of *n*-C23 in uninfected ants treated with the synthetic alkane was on average 22.4 ± 6.0% (mean ± SD) and did not differ from the relative abundance of *n*-C23 in untreated infected ants (LM *t* = 1.87, *p* = 0.11, *N* = 21), thus confirming that the topical application of *n*-C23 on uninfected ant corpses was successful to achieve the relative abundance of this linear alkane present on infected ants. In untreated, uninfected ants, the relative abundance of *n*-C23 was only 13.8 ± 1.3% and differed significantly from the relative abundance present on uninfected *n*-C23-treated ants (LM *t* = 4.46, *p* < 0.001, *N* = 23).

## Discussion

The current study reveals in social insects the 'pacifying' role of a simple component of the cuticular hydrocarbon profile linked to a fungal pathogen. Appeasement effect of certain compounds (e.g., crematoenones) has already been reported in ants⁵⁵, however, it involves two mutualistic ant species that regularly share a common nest. In our case, it is the parasite that induces behavioural changes through modification of the CHC profile.

Our first hypothesis according to which *n*-C23 supplemented (infected) individuals become peaceful toward everyone can be dismissed, since the almost complete lack of aggression occurred towards infected counterparts. However, the surplus of *n*-C23 does seem to elicit less aggression from the interacting partner, thus the second hypothesis is to be confirmed.

There is a variation in the response of ants when it comes to compare reaction to corpses supplemented with *n*-C23 with reaction to dummies supplemented with CHC extracts, however
these all show the same tendency even if the magnitudes differ. Methodological limitations as e.g. differences between the applied experimental amounts of CHC extracts vs natural quantity, or minor differences in the age of corpses⁵⁶ might play a role in this. Within-colony genetic heterogeneity might also influence the response of colony members to non-nestmates to a certain degree contributing to the variability observed, even if the overall pattern stays the same.

The increased variation of CHC profile in infected colonies⁴⁶ makes them in general more tolerant towards strangers than uninfected ones as proven by current assays as well. These all can contribute to a higher degree of heterogeneity of infected colonies as already addressed by Csata et al.⁴⁶ which could be advantageous for the fungal parasite. There is a fair chance that *R. wasmannii* tapped into its host nestmate recognition system tampering with a relatively simple security code. There is also a chance that *n*-C23 could have a wider effect in the genus *Myrmica* since *R. wasmannii* is present in many species belonging to this genus. Whether the effect of the compound goes beyond this parasite-host system needs to be addressed in further studies.

In insect societies, recognition of relatives and intruders is crucially important since altruistic actions need to be directed towards relatives. Some hydrocarbon classes seem to be more informative than others for nestmate recognition. In particular, methyl-branched alkanes and linear alkenes seem to provide more information than linear alkanes [e.g., 49,57,58], which are thought to be structurally more effective in preventing dehydration⁵⁹,⁶⁰. The role of alkanes is currently ambiguous and appears to differ between species. In honeybees (*Apis mellifera*), they do not seem to have any effect⁶¹,⁶². However, in the ants *Formica japonica*⁶³ and *Linepithema humile*⁶⁴, workers were unable to distinguish between non-nestmates and nestmates when only the respective alkane or alkene fraction of the cuticular profile was presented to them. When the chemical profiles of *L. humile* nestmates were supplemented with linear alkanes (from *n*-C23 to *n*-C30 and *n*-C33), the tested workers responded aggressively. A similar behaviour occurred in the workers of the European hornet, *Vespa crabro*⁵¹.

In the light of the examples given above, the results of the present study are highly remarkable, as they show that *n*-C23 represents a 'pacification' cue that, when exceeding normal levels, attenuates aggressive responses in conspecifics. The mentioned changes and effect on the nestmate recognition system may also have an impact on the spread of pathogens through increased tolerance towards non-nestmates and young queens that seek to infiltrate in established colonies⁴⁶. The reduced discrimination accuracy of infected ants might also compromise their ability to detect and remove other social parasites. For instance, a high degree of chemical mimicry has been shown recently in parasitic queens of the workerless inquiline species *Myrmica karavajevi*, which parasitizes *M. scabrinodis* colonies⁶⁵. Interestingly, high percentages of *n*-C23 were detected in the CHC profiles of queens and newly eclosed males of *M. karavajevi* which are almost twice the level found in the CHC profiles of host queens. This high relative abundance of *n*-C23 might thus facilitate the parasite usurpation of host colonies and the safe eclosion of parasite males by reducing the aggressiveness of host workers⁶⁵.

Although the number of investigated colonies is relatively low, the results are straightforward, showing that the pathogen-related relative increase of *n*-C23 could play a crucial role in the nestmate vs non-nestmate discrimination accuracy in *M. scabrinodis*. The reduced aggressiveness caused by *n*-C23 could come along in infected colonies with a hampered ability to discriminate against non-related conspecifics that may facilitate the propagation of *R. wasmannii* and may be exploited by other pathogens and social parasites to sneak into *M. scabrinodis* colonies.

Our work paves the way for future studies investigating whether this phenomenon is conserved across other eu social insect species and exploring the physiological mechanisms underlying the increased tolerance towards pathogen-infected conspecifics.

## Materials and methods

**Study species and site.** Colonies of the ant *Myrmica scabrinodis*, both infected (I, *N* = 6) and uninfected (U, *N* = 6), were collected from the same population near Cluj-Napoca, Romania (46.92 N, 23.73E, 410–460 m a.s.l.) as in the previous study⁴⁶. The collected colonies were kept together with their brood in plastic boxes (16 × 10 × 5 cm) with wet foam bricks under controlled lab conditions in a climate chamber (20 °C, 12 L:12D cycles) with a food mixture of sugar and proteins⁶⁶ provided ad libitum on daily basis.

Infected colonies were parasitized by the ectoparasitic fungus *Rickia wasmannii*, which obligatorily exploits *Myrmica* ants⁶⁷⁻⁶⁹. This fungus does not have a mycelium, and its thallus develops from a bicellular ascospore attached to the outer layer of the host cuticle⁴⁷,⁷⁰. In our study population, the colony-level prevalence of the fungus was more than 50%, while the within-colony prevalence reached 100% in certain colonies⁴⁴. Both infected and uninfected colonies are highly variable with regards to worker number and queen number in the study population⁴⁶.

The species identity of ants and their fungal infection status was assessed in the field and later confirmed in the lab using an Olympus SZ51 stereomicroscope. In the case of the ants, we used the keys of Czekes et al.⁷¹ for morphological confirmation. As there are two separate lineages within *M. scabrinodis*⁵³ that might be good candidates for cryptic species, DNA barcoding was applied to elucidate whether these two lineages exist in the study population. DNA was obtained from adult specimens from infected and uninfected colonies (see DNA barcoding).

Voucher specimen from some studied infected and uninfected colonies along with the list of codes are deposited in the Myrmecological collection of the Babeș-Bolyai University in Cluj-Napoca, Romania.

**General experimental setup.** Dyadic behavioural tests⁴⁶,⁷² were performed after four days of acclimatisation under laboratory conditions with worker ants from infected and uninfected colonies (Fig. 1). The selected individuals were isolated in test tubes for one minute before each test. Individuals showing impaired locomotion or any other behavioural disorder were discarded and replaced with another individual.

Since in dyadic tests with live workers it is hard to tell apart the reactions of the two individuals, we used one live worker and one freshly killed non-nestmate conspecific corpse (dummy) in each assay. This allowed us to precisely characterize the response of the live worker. Fresh dummies, obtained by freeze-killing workers (−20 °C for 1 h), are still perceived by ants as live ones due to the integrity of their CHC profile and the low amounts of linoleic and oleic acids. These two acids are used by the ants to detect dead colony members, but they reach the threshold levels for corpse removal only a few hours after an individual's death as specifically proven in *Myrmica*⁷³. In each test, new workers and dummies were used.

To prove the role of CHC profile in nestmate/non-nestmate discrimination in *M. scabrinodis*, we initially tested (1) the response of ants to hexane-washed dummies (see below for further details; *N* = 36). Then we performed unmanipulated assays (2) in which the reactions of live workers were tested to infected (I) and uninfected (U) dummies (*N* = 54) to assess the baseline aggression towards non-nestmates for both cases (Fig. 1).

In the next step (3), uninfected washed dummies were used for the application of extracts to exclude any tactile and visual cues that might arise from the presence of fungal thalli. We manipulated hexane-washed dummies obtained from workers from uninfected colonies by applying cuticular extracts from uninfected or infected workers (see below for further details) to them, and then we recorded the behavioural responses of live workers (*N* = 90; Fig. 1). Thus, we could reveal whether adding CHC extracts to hexane-washed dummies elicits responses from workers matching responses to untreated dummies of similar infection status.

To elucidate the potential role of *n*-C23 (4), we recorded the reaction of workers towards uninfected dummies treated with synthetic *n*-C23 (*N* = 45; Fig. 1). Finally (5), we also tested the reactions of workers to hexane-washed dummies onto which we had applied cuticular extracts from uninfected workers supplemented with synthetic *n*-C23 (*N* = 45; Fig. 1). As a control, workers from six infected (I) and six uninfected (U) colonies were used to test the aggressiveness at the intracolonial level in each manipulation assay (*N* = 66 tests).

**Behavioural assays.** Only old workers (more than 20 days old) were used since they are the most infected individuals in a colony, thus the most affected ones⁷⁴. They also constitute the foraging workforce having an increased chance of meeting rivals and potential intruders and constitute the first line of colony defence. Therefore, their nestmate discrimination ability should be more pronounced than those of younger nurse workers. Old workers were randomly selected based on their location in the nest arena, outside the larval chamber, and their darker cuticular pigmentation (brown), as traditionally used for age class estimation in *Myrmica*⁷⁴,⁷⁵.

The assays were carried out using two connected transparent plastic tubes (3 cm long), which were initially separated by a small piece of red plastic foil. A single *M*.
*scabrinodis* worker was placed in one tube, while the dummy was placed in the other tube. The worker was allowed to acclimatisate for one minute before the red plastic foil was removed. After each assay, the plastic tubes were rinsed with ethanol (98%) and water, then wiped out and left to dry for at least 30 min. Assays were carried out with both infected and uninfected workers with several replicates per combination, and new individuals were used for each test (for the exact test number per combination see Supplementary Tables 1 and 2). The observations started after the first contact of the live individual with the presented dummy and ended after three minutes. All interactions were recorded and categorised as: (1) grooming, (2) antennation, (3) carrying, (4) fleeing/retreating, (5) mandible gaping, (6) biting, (7) dragging, and (8) stinging. Grooming was considered a socio-positive behaviour, antennation and carrying were considered neutral, and the last five behaviours were considered aggressive. We considered dragging when a worker bit on the corpse with its mandibles and pulled or pushed it on the ground. The act could be preceded by aggressive biting and then could be continued in stinging. Unlike dragging, in the case of carrying the worker did not charge the corpse but lifted it above the ground and maintained it in a more or less upright position in a peaceful manner⁷⁶. An aggression index (AI) for each encounter was calculated as follows: $AI = \frac{\text{total number of aggressive responses}}{\text{total number of interactions}}$. To eliminate or to reduce observational biases, the observer did not know the infection status of the live worker.

**Preparation of corpses (untreated).** Old uninfected and infected ants were selected randomly from their colonies. After selection, the individuals were freeze killed for 10 min. After thawing the freeze-killed corpses for 20 min at room temperature, they were used for the behavioural assays. The corpses were prepared in identical manner for testing the aggressivity of the infected and uninfected individuals toward nestmate corpses (within colony aggression) and towards non-nestmate corpses (between colony aggression).

**Preparation of hexane-washed dummies.** Only uninfected ants from uninfected colonies were used to prepare washed dummies used in behavioural assays. After thawing the freeze-killed corpses for 20 min at room temperature, they were placed in clean glass vials and submerged in 300 µl of hexane and manually shaken. After 5 min the ants were transferred to new clean glass vials and washed again with 300 µl of hexane. This procedure was repeated 5 times. The hexane residues were left to evaporate for 10 min before the dummy was used for the behavioural assays.

**Preparation of hexane-washed dummies supplemented with cuticular extracts.** Both infected and uninfected workers were used as dummies. After freeze-killing them, two workers from the same colony were submerged in 200 µl of hexane and manually shaken. The extracts were transferred to clean glass inserts (0.2 ml) after 20 min. The hexane was evaporated under a stream of nitrogen and then the content of each glass insert was resuspended in 15 µl of hexane by rinsing the walls of the insert repeatedly using a glass syringe (25 µl, Hamilton, Bonaduz, Switzerland). The resuspended cuticular extract was then taken with another glass syringe (10 µl, Hamilton, Bonaduz, Switzerland). The tip of the syringe needle was then carefully attached to a hexane-washed dummy, and it was carefully raised in the air with the needle, which allowed the formation of an intact and uniform droplet around the dummy in the air. The hexane was allowed to evaporate for 10 min before the dummy was used for the behavioural assays.

**Preparation of uninfected ant dummies supplemented with n-C23.** Only uninfected workers were used as dummies. We prepared a hexane solution of n-C23 (8 ng/µl, Supelco, Bellefonte, Pennsylvania, Sigma Aldrich), and 10 µl (representing a dose of 80 ng) were then taken with a glass syringe (10 µl, Hamilton, Bonaduz, Switzerland). The tip of the syringe needle was then carefully attached to the uninfected corpse, and it was carefully raised in the air with the needle, which allowed the formation of an intact and uniform droplet around the dummy in the air. The hexane was allowed to evaporate for 10 min before the behavioural assays. The dose of n-C23 applied to uninfected dummies (80 ng) was adjusted to shift its relative abundance to the levels found on the cuticle of ants infected by *R. wasmannii* (18.72 ± 5.25%;⁴⁶).

**Hexane-washed corpses treated with cuticular extracts from uninfected ants and n-C23.** Hexane-washed uninfected corpses were treated with cuticular extracts from uninfected ants as described previously. After drying, they were treated additionally with 10 µl (representing 80 ng) of the *n*-C23 solution. Ants were carefully raised in the air with the needle, which allowed the formation of an intact and uniform droplet around the corpse in the air. The hexane was allowed to evaporate for 10 min under a stream of nitrogen before the behavioural assays.

**Posterior verifications of CHC profiles.** Previously 37 hydrocarbons were identified in *M. scabrinodis*⁴⁶ (see Supplementary Table 3). Cuticular extracts from ant corpses that had been washed five times with hexane (dummies) were analysed to verify that the treatment had successfully removed most of the CHC profile. We also analysed the relative abundance of *n*-C23 in the CHC profile of uninfected workers treated with *n*-C23 to check whether it was similar to the levels found in

infected ants (see Supplementary Fig. 1). We individually extracted the CHC profile of dummies (*N* = 4) and treated ants (*N* = 6) for 20 min in 200 µl of hexane. Subsequently, the extract was transferred to a clean glass insert (0.2 ml) and 8 µl of a hexane solution of *n*-eicosane (*n*-C20, Supelco, Bellefonte, Pennsylvania) (100 ng/µl, representing 800 ng) was added to each extract as an internal standard. Samples were then carefully dried under a stream of nitrogen before being re-suspended in a final volume of 20 µl of hexane. Two µl of each sample were analysed on a Shimadzu GC2010 gas chromatograph (GC) connected to a QP2010 plus mass spectrometer (MS; Shimadzu, Duisburg, Germany). The GC was equipped with a non-polar capillary column (BPX-5, 30 m length, 0.25 mm inner diameter, 0.25 µm film thickness; SGE Analytical Sciences, Milton Keynes, UK). Helium was used as carrier gas with a constant linear velocity of 50 cm s⁻¹. The initial oven temperature was 70 °C and ramped at 30 °C/min to 150 °C. It was then increased to 320 °C at a rate of 5 °C/min and held for 10 min at 320 °C. Splitless injection (2 min) was performed at 280 °C. Mass spectra were acquired in full scan mode every 0.3 s with a scan lapse of 0.1 s, the mass was m/z 40 to 600. Mass spectra were acquired in EI mode at 70 eV. The chromatograms were manually integrated to calculate the area of each peak of interest using the proportion of the sum over the area of all peaks.

**DNA barcoding.** DNA was obtained from 2 individuals/colony from 3 infected and 3 uninfected *Myrmica scabrinodis* colonies, respectively. The DNA barcoding region was amplified using the LCO1490/HC02198 primer pair based on a standard protocol. The sequences obtained were then analysed together with other sequences of *M. scabrinodis* (lineages A and B; see⁵³,⁵⁴), *M. sabuleti*, *M. vandeli*, and *M. aloba* obtained from Barcode of Life Database (BOLD⁷⁸.) and GeneBank. *Manica rubida* ant species was used as an outgroup. The phylogenetic analysis was carried out in *Geneious Prime®* 2022.0.1 by aligning the sequences and constructing the neighbor-joining tree with *Tamura-Nei* distances. The consensus tree was built using the bootstrap resampling method with 1000 replicates.

**Statistics and reproducibility.** Aggression indices were analysed at first using a generalised linear mixed model approach (GLMM, binomial error, maximum likelihood fit) with colony identifier (Col ID) of live ants as random factor, and with test combinations (eg. I–I, I–U, etc.) as fixed factors. In the vast majority of the cases, though, singularity issues hindered the application of the model (see Supplementary Tables 4–6). In these cases, we applied generalised linear model approach (GLM, binomial error, maximum likelihood fit) with test combinations and Col ID as fixed factors in order to address the issue of data dependence (see Supplementary Tables 4–6).

Relative abundances of *n*-C23 present on the cuticle of infected and uninfected old workers and experimental ants treated with *n*-C23 were compared using a linear model approach (LM, maximum likelihood fit). Chemical data of infected and uninfected old workers are derived from Csata et al.⁴⁶.

All statistics were performed using R 4.0.27⁹. GLMMs were applied using *glm* function, while GLMs were performed using *glm* functions in the *lme4* package⁸⁰. For GLMMs and GLMs, test outputs (z and Residual Deviation values, respectively) were obtained using the function *anova* in the *car* package⁸¹. Tukey's HSD test was used to calculate post-hoc comparisons on each factor in the model using the function *glht* from the R package *multcomp*⁸². LMs were applied using *lm* function, in the *lme4* package⁸⁰. The graphs were produced using the *ggplot2* R package⁸³.

**Reporting summary.** Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

## Data availability

All data were uploaded in the Dryad platform (https://datadryad.org/stash/share/DJrVniofT0ftWpYaoWxkUIuVj_WFuG-cm18DwcybPMU).

## Code availability

The R scripts for statistical analyses and for the graphs are featured in the Supplementary files (Supplementary Code 1).

Received: 28 January 2022; Accepted: 31 January 2023; Published online: 16 February 2023

## References

1. Schmid-Hempel P. *Parasites in social insects*. Princeton University Press (1998).

2. Lefèvre, T. et al. The ecological significance of manipulative parasites. *Trends Ecol. Evol.* **24**, 41–48 (2009).
3. Elya, C. et al. Robust manipulation of the behavior of *Drosophila melanogaster* by a fungal pathogen in the laboratory. *Elife* 7, e34414 (2018).

4. Herbison, R., Lagrue, C. & Poulin, R. The missing link in parasite manipulation of host behaviour. *Parasites Vectors* **11**, 1–6 (2018).

5. Csata, E., Billen, J., Barbu-Tudoran, L. & Markó, B. Inside Pandora's box: development of the lethal myrmecopathogenic fungus *Pandora formicae* within its ant host. *Fungal Ecol.* **50**, 101022 (2021).

6. Trinh, T., Ouellette, R. & de Bekker, C. Getting lost: the fungal hijacking of ant foraging behaviour in space and time. *Anim. Behav.* **181**, 165–184 (2021).

7. Moore J. *Parasites and the Behavior of Animals*. Oxford University Press, Oxford (2002).

8. Thomas, F., Fauchier, J. & Lafferty, K. D. Conflict of interest between a nematode and a trematode in an amphipod host: test of the “sabotage” hypothesis. *Behav. Ecol. Sociobiol.* **51**, 296–301 (2002).

9. Stroeymeyt, N. et al. Social network plasticity decreases disease transmission in a eusocial insect. *Science* **362**, 941–945 (2018).

10. Beros, S., Foitzik, S. & Menzel, F. What are the mechanisms behind a parasite-induced decline in nestmate recognition in ants? *J. Chem. Ecol.* **43**, 869–880 (2017).

11. Hamilton, W. D. Kinship, recognition, disease, and intelligence: constraints of social evolution. In: Ito Y., Brown J. L., Kikkawa J. (eds) *Animal societies: theories and facts*. Jpn Sci Soc Press, Tokyo, pp 81–102 (1987).

12. Hunt, J. H. & Richard, F. J. Intracolony vibroacoustic communication in social insects. *Insect Soc.* **60**, 403–417 (2013).

13. Wyatt, T. D. Proteins and peptides as pheromone signals and chemical signatures. *Anim. Behav.* **97**, 273–280 (2014).

14. Leonhardt, S. D., Menzel, F., Nehring, V. & Schmitt, T. Ecology and evolution of communication in social insects. *Cell* **164**, 1277–1287 (2016).

15. Casacci, L. P. et al. Ant pupae employ acoustics to communicate social status in their colony's hierarchy. *Curr. Biol.* **23**, 323–327 (2013).

16. Schönrogge, K., Barbero, F., Casacci, L. P., Settele, J. & Thomas, J. A. Acoustic communication within ant societies and its mimicry by mutualistic and socially parasitic myrmecophiles. *Anim. Behav.* **134**, 249–256 (2017).

17. Sheehan, M. J. & Tibbetts, E. A. Specialized face learning is associated with individual recognition in paper wasps. *Science* **334**, 1272–1275 (2011).

18. Chittka, L. & Dyer, A. Your face looks familiar. *Nature* **481**, 154–155 (2012).

19. Billen, J. Signal variety and communication in social insects. *Proc. Neht. Entomol. Soc. Meet.* **17**, 9 (2006).

20. Blomquist G. J. Biosynthesis of cuticular hydrocarbons: In: Blomquist, G. J., Bagnères, A.-G. (eds.): *Insect hydrocarbons: biology, biochemistry and chemical ecology*. Cambridge University Press (2010).

21. Hefetz, A. The evolution of hydrocarbon pheromone parsimony in ants (Hymenoptera: Formicidae) – interplay of colony odor uniformity and odor idiosyncrasy. *Myrmecol. N.* **10**, 59–68 (2007).

22. Bagnères A. G., Lorenzi M. C. Chemical deception/mimicry using cuticular hydrocarbons. *Insect hydrocarbons: Biology, biochemistry and chemical ecology. Chemical deception/mimicry using cuticular hydrocarbons*, 282–324 (2010).

23. van Zweden, J. S. & d'Ettorre, P. Nestmate recognition in social insects and the role of hydrocarbons. *Insect Hydrocarbons: Biol. Biochem. Chem. Ecol.* **11**, 222–243 (2010).

24. Esponda, F. & Gordon, D. M. Distributed nestmate recognition in ants. *Proc. R. Soc. B.* **282**, 20142838 (2015).

25. Crozier, R. & Dix, M. W. Analysis of two genetic models for the innate components of colony odor in social Hymenoptera. *Behav. Ecol. Sociobiol.* **4**, 217–224 (1979).

26. Wakonigg, G., Eveleigh, L., Arnold, G. & Crailsheim, K. Cuticular hydrocarbon profiles reveal age-related changes in honey bee drones (*Apis mellifera carnaica*). *J. Apic. Res.* **39**, 137–141 (2000).

27. Cuvillier-Hot, V., Cobb, M., Malosse, C. & Peeters, C. Sex, age and ovarian activity affect cuticular hydrocarbons in *Diacamma ceylonense*, a queenless ant. *J. Insect Physiol.* **47**, 485–493 (2001).

28. Greene, M. J. & Gordon, D. M. Cuticular hydrocarbons inform task decisions. *Nature* **423**, 32–32 (2003).

29. Kather, R., Drijfhout, F. P. & Martin, S. J. Task group differences in cuticular lipids in the honey bee *Apis mellifera*. *J. Chem. Ecol.* **37**, 205–212 (2011).

30. Kleeberg, I., Menzel, F. & Foitzik, S. The influence of slavemaking lifestyle, caste and sex on chemical profiles in *Temnothorax* ants: insights into the evolution of cuticular hydrocarbons. *Proc. R. Soc. B.* **284**, 20162249 (2017).

31. Sprenger, P. P. & Menzel, F. Cuticular hydrocarbons in ants (Hymenoptera: Formicidae) and other insects: how and why they differ among individuals, colonies, and species. *Myrmecol. N.* **30**, 1–26 (2020).

32. Reeve, H. K. The evolution of conspecific acceptance thresholds. *Am. Nat.* **133**, 407–435 (1989).

33. Lenoir, A., d'Ettoire, P. & Errard, C. Chemical ecology and social parasitism in ants. *Annu. Rev. Entomol.* **46**, 573–599 (2001).

34. Akino, T. Chemical strategies to deal with ants: a review of mimicry, camouflage, propaganda, and phytomimesis by ants (Hymenoptera: Formicidae) and other arthropods. *Myrmecol. N.* **11**, 173–181 (2008).

35. Akino, T., Knapp, J. J., Thomas, J. A. & Elmes, G. W. Chemical mimicry and host specificity in the butterfly *Maculinea rebeli*, a social parasite of *Myrmica* ant colonies. *Proc. Roy. Soc. B.* **266**, 1419–1426 (1999).

36. Nash, D. R., Als, T. D., Maile, R., Jones, G. R. & Boomsma, J. J. A mosaic of chemical coevolution in a large blue butterfly. *Science* **319**, 88–90 (2008).

37. Johnson, C. A., Vander Meer, R. K. & Lavine, B. Changes in the cuticular hydrocarbon profile of the slave-maker ant queen, *Polyergus breviceps* Emery, after killing a *Formica* host queen (Hymenoptera: Formicidae). *J. Chem. Ecol.* **27**, 1787–1804 (2001).

38. Lecuona, R., Riba, G., Cassier, P. & Clément, J. L. Alterations of insect epicuticular hydrocarbons during infection with *Beauveria bassiana* or *B. brongniartii*. *J. Invertebr. Pathol.* **58**, 10–18 (1991).

39. Trabalon, M., Plateaux, L., Péru, L., Bagnères, A. G. & Hartmann, B. Modification of morphological characters and cuticular compounds in worker ants *Leptothorax nylanderi* induced by endoparasites *Anomotaenia brevis*. *J. Insect Physiol.* **46**, 169–178 (2000).

40. Zurek, L., Watson, D. W., Krasnoff, S. B. & Schal, C. Effect of the entomopathogenic fungus, *Entomophthora muscae* (Zygomycetes: Entomophthoraceae), on sex pheromone and other cuticular hydrocarbons of the house fly. *Musca Domestica*. *J. Invertebr. Pathol.* **80**, 171–176 (2002).

41. Nielsen, M. L. & Holman, L. Terminal investment in multiple sexual signals: immune-challenged males produce more attractive pheromones. *Func. Ecol.* **26**, 20–28 (2012).

42. Beros, S., Jongepier, E., Hagemeyer, F. & Foitzik, S. The parasite's long arm: a tapeworm parasite induces behavioural changes in uninfected group members of its social host. *Proc. Roy. Soc. B.* **282**, 20151473 (2015).

43. Csata, E., Erős, K. & Markó, B. Effects of the ectoparasitic fungus *Rickia wasmannii* on its ant host *Myrmica scabrinodis*: changes in host mortality and behavior. *Insectes Soc.* **61**, 247–252 (2014).

44. Markó, B. et al. Distribution of the myrmecopathogenic fungus *Rickia wasmannii* (Ascomycota: Laboulbeniales) across colonies, individuals, and body parts of *Myrmica scabrinodis*. *J. Invertebr. Pathol.* **136**, 74–80 (2016).

45. Báthori, F., Csata, E. & Tartally, A. *Rickia wasmannii* increases the need for water in *Myrmica scabrinodis* (Ascomycota: Laboulbeniales; Hymenoptera: Formicidae). *J. Invertebr. Pathol.* **126**, 7–82 (2015).

46. Csata, E. et al. Lock-picks: fungal infection facilitates the intrusion of strangers into ant colonies. *Sci. Rep.* **7**, 46323 (2017).

47. Csata, E., Billen, J., Bernadou, A., Heinze, J. & Markó, B. Infection-related variation in cuticle thickness in the ant *Myrmica scabrinodis* (Hymenoptera: Formicidae). *Insectes Soc.* **65**, 503–506 (2018).

48. Csősz, S., Rádai, Z., Tartally, A., Ballai, L. E. & Báthori, F. Ectoparasitic fungi *Rickia wasmannii* infection is associated with smaller body size in *Myrmica* ants. *Sci. Rep.* **11**, 1–9 (2021).

49. Dani, F. R., Jones, G. R., Destri, S., Spencer, S. H. & Turillazzi, S. Deciphering the recognition signature within the cuticular chemical profile of paper wasps. *Anim. Behav.* **62**, 165–171 (2001).

50. Lorenzi, M. C., Bagneres, A. G., Clément, J. L. & Turillazzi, S. *Polistes biglumis* bimaculatus epicuticular hydrocarbons and nestmate recognition (Hymenoptera: Vespidae). *Insectes Soc.* **44**, 123–138 (1997).

51. Ruther, J., Sieben, S. & Schricker, B. Nestmate recognition in social wasps: manipulation of hydrocarbon profiles induces aggression in the European hornet. *Naturwissenschaften* **89**, 111–114 (2002).

52. Smith, A. A., Hölldobler, B. & Liebig, J. Cuticular hydrocarbons reliably identify cheaters and allow enforcement of altruism in a social insect. *Curr. Biol.* **19**, 78–81 (2009).

53. Ebsen, J. R., Boomsma, J. J. & Nash, D. R. Phylogeography and cryptic speciation in the *Myrmica scabrinodis* Nylander, 1846 species complex (Hymenoptera: Formicidae), and their conservation implications. *Insect Conserv. Divers* **12**, 467–480 (2019).

54. Ballinger, M. J., Moore, L. D. & Perlman, S. J. Evolution and diversity of inherited Spiroplasma symbionts in *Myrmica* ants. *Appl. Environ. Microbiol.* **84**, e02299–e17 (2018).

55. Menzel, F. et al. Crematoenones – a novel substance class exhibited by ants functions as appeasement signal. *Front. Zool.* **10**, 1–12 (2013).

56. Qiu, H.-L., Qin, C.-S., Fox, E. G. P., Wang, D.-S. & He, Y.-R. Differential behavioral responses of *Solenopsis invicta* (Hymenoptera: Formicidae) workers toward nestmate and non-nestmate corpses. *J. Ins. Sci.* **20**, 11 (2020).

57. Martin, S. J., Vitikainen, E., Helanterä, H. & Drijfhout, F. P. Chemical basis of nest-mate discrimination in the ant *Formica exsecta*. *Proc. R. Soc. B.* **275**, 1271–1278 (2008).

58. Guerrieri, F. J. et al. Ants recognize foes and not friends. *Proc. R. Soc. B.* **276**, 2461–2468 (2009).

59. Gibbs, A. & Pomonis, J. G. Physical properties of insect cuticular hydrocarbons: the effects of chain lengths, methyl branching and unsaturation. *Comp. Biochem. Physiol.* **112**, 243–249 (1995).

60. Menzel, F., Blaimer, B. B. & Schmitt, T. How do cuticular hydrocarbons evolve? Physiological constraints and climatic and biotic selection pressures act on a complex functional trait. *Proc. R. Soc. B.* **284**, 20161727 (2017).
61. Breed, M. D., Leger, E. A., Pearce, A. M. & Wang, Y. J. Comb wax effects on the ontogeny of honey bee nestmate recognition. *Anim. Behav.* **55**, 13–20 (1998).

62. Breed, M. D. & Stiller, T. M. Honey bee, *Apis mellifera*, nestmate discrimination: hydrocarbon effects and the evolutionary implications of comb choice. *Anim. Behav.* **43**, 875–883 (1992).

63. Akino, T., Yamamura, K., Wakamura, S. & Yamaoka, R. Direct behavioral evidence for hydrocarbons as nestmate recognition cues in *Formica japonica* (Hymenoptera: Formicidae). *Appl. Entomol. Zool.* **39**, 381–387 (2004).

64. Greene, M. J. & Gordon, D. M. Structural complexity of chemical recognition cues affects the perception of group membership in the ants *Linepithema humile* and *Aphaenogaster cockerelli*. *J. Exp. Biol.* **210**, 897–905 (2007).

65. Casacci, L. P., Barbero, F., Šlipiński, P. & Witek, M. The inquiline ant *Myrmica karavajevi* uses both chemical and vibroacoustic deception mechanisms to integrate into its host colonies. *Biology* **10**, 654 (2021).

66. Bhatkar, A. & Whitcomb, W. Artificial diet for rearing various species of ants. *Florid. Entomol.* **53**, 229–232 (1970).

67. Espadaler X., Santamaria S. Ecto- and endoparasitic fungi on ants from the Holarctic region. *Psychhe 168478*, 1–10 (2012).

68. Csata, E. et al. Comprehensive survey of Romanian myrmecoparasitic fungi: new species, biology and distribution. *North West J. Zool.* **9**, 23–29 (2013).

69. Witek, M., Barbero, F. & Markó, B. *Myrmica* ants host highly diverse parasitic communities: from social parasites to microbes. *Insectes Soc.* **61**, 307–323 (2014).

70. Tragust, S., Tartally, A., Espadaler, X. & Billen, J. Histopathology of Laboulbeniales (Ascomycota: Laboulbeniales): ectoparasitic fungi on ants (Hymenoptera: Formicidae). *Myrmecol. N.* **23**, 81–89 (2016).

71. Czekes, Z. et al. The genus *Myrmica* Latreille, 1804 (Hymenoptera: Formicidae) in Romania: distribution of species and key for their identification. *Entomol. Rom.* **17**, 29–50 (2012).

72. Buczkowski, G. & Silverman, J. Context-dependent nestmate discrimination and the effect of action thresholds on exogenous cue recognition in the Argentine ant. *Anim. Behav.* **69**, 741–749 (2005).

73. Diez, L., Moquet, L. & Detrain, C. Post-mortem changes in chemical profile and their influence on corpse removal in ants. *J. Chem. Ecol.* **39**, 1424–1432 (2013).

74. Csata, E., Bernadou, A., Rákosy-Tican, E., Heinze, J. & Markó, B. The effects of fungal infection and physiological condition on the locomotory behaviour of the ant *Myrmica scabrinodis*. *J. Insect Physiol.* **98**, 167–172 (2017).

75. Moroń, D., Witek, M. & Woyciechowski, M. Division of labour among workers with different life expectancy in the ant *Myrmica scabrinodis*. *Anim. Behav.* **75**, 345–350 (2008).

76. Bernadou, A., Felden, A., Moreau, M., Moretto, P. & Fourcassié, V. Ergonomics of load transport in the seed harvesting ant *Messor barbarus*: morphology influences transportation method and efficiency. *J. Exp. Biol.* **219**, 2920–2927 (2016).

77. Keresztes, K. K., Csata, E., Lunka-Tekla, A. & Markó, B. Friend or foe? Differential aggression towards neighbors and strangers in the ant *Liometopum microcephalum* (Hymenoptera: Formicidae). *Sci. Entomol.* **23**, 351–358 (2020).

78. Ratnasingham, S. & Hebert, P. D. BOLD: The Barcode of life data system. *Mol. Ecol.* **Notes** **7**, 355–364, http://www.barcodinglife.org (2007).

79. R Core Team. R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria (URL <http://www.R-project.org>) (2020).

80. Bates, D., Mächler, M., Bolker, B. & Walker, S. Fitting Linear Mixed-Effects Models Using lme4. *J. Stat. Soft.* **67**, 1–48 (2015).

81. Fox J., Weisberg S. Using car and effects Functions in Other Functions. *Using Car Eff. Funct. Other Funct.*, **3**, 1–5 (2020).

82. Hothorn, T., Bretz, F. & Westfall, P. Simultaneous inference in general parametric 312 models. *Biom. J.* **50**, 346–363 (2008).

83. Wickham H. *ggplot2: elegant graphics for data analysis*. (Springer Science & Business Media) (2009).

## Acknowledgements

We are grateful for the assistance of Kriszta Kincső Keresztes, Márta Osváth-Ferencz and Zsolt Fazakas during field collections. We thank Lehel Dénes-Avar for providing the mtDNA gene sequences. We are grateful for the comments of three independent reviewers which contributed essentially to the improvement of the manuscript. The current work was partially supported by a grant from the Romanian National Authority for Scientific Research and Innovation, CNCS – UEFISCDI, project number PN-II-RU-TE-2014-4-1930. E.C. was supported by a research grant from the DAAD and by a grant from the Alexander von Humboldt Foundation.

## Author contributions

E.C., L.P.C., J.R., J.H., B.M. contributed to the design of the experiments. E.C. and B.M. collected the materials. E.C., L.P.C. and B.M. conducted the behavioural experiments. L.P.C., E.C. and J.R. prepared the solutions and extracted the CHC compounds. L.P.C. analysed the chromatograms and carried out the statistical analysis of the CHC compounds. E.C. and A.B. performed the data analyses of behavioural assays. The manuscript was written by E.C., L.P.C., B.M., J.R., A.B., and J.H. Further on, all authors contributed to revisions of the manuscript.

## Funding

Open Access funding enabled and organized by Projekt DEAL.

## Competing interests

The authors declare no competing interests.

## Additional information

**Supplementary information** The online version contains supplementary material available at https://doi.org/10.1038/s42003-023-04541-7.

**Correspondence** and requests for materials should be addressed to Enikő. Csata or Luca Pietro Casacci.

**Peer review information** *Communications Biology* thanks Eduardo Goncalves Paterson Fox and the other anonymous, reviewer(s) for their contribution to the peer review of this work. Primary Handling Editors: Kevin Theis and Manuel Breuer.

**Reprints and permission information** is available at http://www.nature.com/reprints

**Publisher's note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

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

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

© The Author(s) 2023