Heat stress has immediate and persistent effects on immunity and development of Tenebrio molitor

The yellow mealworm ( Tenebrio molitor ) is a promising insect species for mass-rearing for the production of feed and food. In mass-production systems, insects may be exposed to abiotic stressors such as heat stress as well as potentially lethal pathogens. To ensure mass-reared T. molitor populations are healthy and productive there is a need to understand both the risks, and potential benefits of heat stress, on the fitness of insects and their susceptibility to pathogens. In this study, we investigated the effects of a short (2 h) or a long (14 h) heat stress (38 °C) exposure on the susceptibility and the immune responses of T. molitor larvae exposed to a fungal pathogen ( Metarhizium brunneum ). Larvae were exposed to the pathogen either immediately or five days after the heat stress treatments. The development of heat stressed larvae and their offspring was also assessed. A short heat stress immediately before exposure to M. brunneum increased the survival probability of T. molitor larvae, which correlated with increased antibacterial activity in the hemolymph. The exposure of larvae to short, or long heat stresses five days before pathogen exposure did not affect their survival, despite a temporary lowered body mass gain of heat stressed larvae. However, heat stressed larvae showed decreased hemocyte concentrations when exposed to M. brunneum . We also found an increased body weight in larval offspring of females that had been exposed to a short heat stress as larvae themselves. These findings demonstrate the importance of understanding the effects of heat stress in the long-term. The beneficial effects of heat stress on pathogen susceptibility in T. molitor and the negative effects on body mass gain are only transient, whereas negative effects on immune response (hemocyte concentrations) persist over an extended period.


Introduction
The mass-rearing of insects for human consumption and livestock feed is a growing sector as insects are a promising sustainable source of protein (Van Huis, 2021).Insects generally are more efficient than conventional livestock in converting their feed substrate into body mass and they require less water to produce an equivalent mass of protein (van Huis, 2013).Moreover, insects produce less greenhouse gases than for example pigs and chickens, and they are able to convert organic materials from waste streams into proteins (Sogari et al., 2019;Van Huis, 2021).
The yellow mealworm, Tenebrio molitor (Coleoptera: Tenebrionidae), is one of the most important species currently mass-produced for food and feed purposes.In addition, it is an important model organism (Grau et al., 2017), a pest of stored grains (Vigneron et al., 2019), and it has been shown to be useful for biodegradation of plastics (Brandon et al., 2018;Bulak et al., 2021).
A major challenge when mass-rearing T. molitor is the risk of infections by entomopathogens (Eilenberg et al., 2015;Slowik et al., 2023).Such infections may be lethal or sublethal for the insects, and can lead to significant and severe economic losses when insects are being mass-reared for food and feed (Eilenberg et al., 2015).High prevalence and spread of entomopathogens are more likely in cultured insects than in the wild, due to high rearing densities which facilitate transmission between infected and non-infected hosts (Eilenberg and Jensen, 2018;Shapiro-Ilan et al., 2012).
In addition to biotic stressors [we use the term 'stressor' to describe a "variable that causes a quantifiable change, irrespective of its direction (increase or decrease), in a biological response" (Orr et al., 2020)], mass-reared insects are also exposed to environmental stressors (Herren et al., 2023).Temperature is one of the most important environmental factors determining insect growth (Cossins and Bowler, 1987), metabolic rate, and body composition (Bjorge et al., 2018).Massreared insects are kept at high densities and they can therefore be exposed to elevated temperatures due to accumulated metabolic heat (Deruytter et al., 2022;Morales-Ramos and Rojas, 2015).Furthermore, T. molitor can absorb water vapour from the environment (Hansen et al., 2004), which is an energy-consuming process that also produces metabolic heat (Hansen et al., 2006).The highest growth rates in T. molitor larvae were recorded at a temperature of 31 °C (Bjorge et al., 2018).However, it has been reported that at high densities T. molitor larvae elevate the temperature inside rearing containers by 5-10 °C (Morales-Ramos and Rojas, 2015) or even 14 °C above the set rearing temperature (Deruytter et al., 2022).Such hotspots of temperature may be present in a rearing crate for a short amount of time (e.g. when detected quickly and the densities in the rearing crates are adjusted) or the conditions can occur for a prolonged period (e.g. when remaining undetected overnight).
Besides affecting the growth and metabolism, temperature has also been shown to affect both immune response and susceptibility to pathogens in insects (Browne et al., 2014;Kryukov et al., 2018;Sheehan et al., 2020;Vogel et al., 2022).Insect immunity can be broadly divided into cellular and humoral immune responses.Hemocytes are the main component of the cellular response to infection in insects.These cells can kill pathogens through encapsulation or phagocytosis (Lundgren and Jurat-Fuentes, 2012).Oenocytes (a type of hemocyte) produce prophenoloxidase (Vigneron et al., 2019), which is the zymogen of phenoloxidase, an important enzyme in the melanisation process, which begins when prophenoloxidase turns into phenoloxidase, only minutes after infection (Royet, 2004).Thereafter, plasmatocytes (a type of hemocyte) are recruited to the pathogen.Through lysis of the plasmatocytes, melanin is released and encapsulates the pathogen (Castrillo, 2018).Another important part of insect immunity is the humoral immune response, which involves the production of AMPs (antimicrobial peptides) that are active against bacteria and fungi (Castrillo, 2018).Tenebrio molitor larvae kept at 30 °C were found to have increased phenoloxidase activity and antibacterial responses compared to larvae kept at 10 or 20 °C (Catalán et al., 2012).Moreover, increasing temperature (18, 23 and 28 °C) led to an increased cuticle darkness (an index of melanisation of the cuticle) of adult T. molitor (Prokkola et al., 2013), which previously has been linked to increased resistance to the entomopathogenic fungus Metarhizium anisopliae (Barnes and Siva-Jothy, 2000).Increased cuticular melanisation also correlated with increased phenoloxidase activity and increased hemocyte concentrations in the hemolymph (Armitage and Siva-Jothy, 2005).The effects of temperatures above 30 °C on immune response and host-pathogen interactions in T. molitor are currently not known.However, the effect of heat stress has been studied in the lepidopteran species Galleria mellonella, which has a similar optimal temperature for larval development (29-33 °C) as T. molitor (Wojda et al., 2020).In G. mellonella, heat stress generally leads to an increased immune response and decreased susceptibility to different fungal and bacterial pathogens (Browne et al., 2014;Mowlds and Kavanagh, 2008;Wojda and Taszłow, 2013).
Because of the potential beneficial impacts of temperature stress on the immune response of insects, some authors have suggested using temperature stress to increase the immunity of mass-reared insects (Grau et al., 2017;Maciel-Vergara et al., 2021).However, it remains unclear the time for which any beneficial effects of heat stress on immunity persist.Moreover, temperature can affect host-pathogen interactions indirectly by affecting the development of insects and thereby influencing their susceptibility to pathogens.In G. mellonella, for example, the susceptibility to pathogens decreases with increasing body mass and length of the larvae (Hesketh-Best et al., 2021).Hence, insects that have a slower body mass gain due to temperature stress might be at risk over a longer period to acquire a lethal infection.Furthermore, temperature can affect the timing, as well as the number of moults in the larval development of T. molitor (Ribeiro et al., 2018).Moulting may reduce the risk of infection following exposure to fungal pathogens, because conidia are removed with the moulted exoskeleton before they can penetrate the cuticle (Kim and Roberts, 2012;Vandenberg et al., 1998;Vestergaard et al., 1995).However, after moulting the new cuticle might be more susceptible to fungal penetration until it is completely sclerotized and melanised (Kanyile et al., 2022).
We hypothesized that heat stress will have immediate beneficial effects on immunity and pathogen susceptibility of T. molitor larvae, as shown in other insect species.Furthermore, we hypothesized that the increased energy investment in immunity after heat stress will have persistent negative effects on fitness, pathogen susceptibility, and immunity of the larvae.In this study, the generalist fungal entomopathogen Metarhizium brunneum was used to test pathogen susceptibility of T. molitor larvae.Tenebrio molitor larvae can be naturally infected by fungi of the genus Metarhizium (Steinwender et al., 2014).Wakil et al. (2014) found that these fungi can be present in stored grains (Wakil et al., 2014), which makes them important pathogens in the production process of T. molitor, because stored grains are commonly utilised for feed in mass-rearing facilities of T. molitor (Cortes Ortiz et al., 2016).
The research reported here documents the susceptibility (i.e.survival) of T. molitor larvae when exposed to a fungal pathogen immediately after the exposure to either of two heat stresses (short 2 h or long 14 h) or exposed to the pathogen five days following exposure to the heat stresses.Secondly, the immune responses (phenoloxidase activity, hemocyte concentration and antibacterial activity of the hemolymph) and moulting of larvae exposed to the same combination of fungal pathogen and heat stresses are measured.Finally, the development (i.e.weight gain, pupal weight, time until pupation, and number of exuviae) of heat stressed larvae and their offspring (i.e.number of offspring and weight of larval offspring) are assessed.

Experimental design overview
The larvae of T. molitor were exposed to M. brunneum immediately, or five days after exposure to a short (2 h), or a long (14 h) heat stress (38 °C) (Figure 1).All insects were constantly kept at 28 °C (except during the heat stress treatments) for the remaining duration of the experiment.One group of larvae was exposed to a lethal dose (LD50, previously established in pre-experimental bioassays) of M. brunneum immediately after the heat stress treatments.A control group of larvae was not exposed to M. brunneum.Similarly, two other groups of larvae were exposed to either M. brunneum (LD50) or no M. brunneum five days after the heat stress treatments.Subsequently, survival was assessed in all groups daily for 12 days.To compare the immune responses in the different treatment groups, measurements of hemocyte concentration, phenoloxidase activity, and antibacterial activity were made two days after M. brunneum or control exposure in all four groups.Similarly, shed exuviae were counted two days after exposure to M. brunneum or control treatments.
To compare the development and reproduction of larvae exposed to heat stress (without M. brunneum treatment), larval mass (one day before, and five and 10 days after heat stresses), moulting frequency, development duration until pupation, pupal weight, number, and weight of offspring were recorded.

Insect culture
Tenebrio molitor larvae were initially sourced from the company Ÿnsect (Evry, France).The insects were kept in continual laboratory culture over more than five generations before the start of the experiments.Adult T. molitor (40 females and 40 males) were kept in 750 ml plastic containers (15 cm × 9.5 cm = 142.5 cm2) containing 100 g diet for one week.The diet was provided by Ÿnsect and consisted of wheat bran (35.9%), corn dried distillers grains (30%), wheat (23.7%), and beer yeast (10.4%).The adults were fed with 5 g bacteriological water agar (1% w/v) twice a week.The containers containing eggs and hatching larvae received 10 g bacteriological water agar (1% w/v) twice a week starting one week after removal of the adults.Three weeks after removal of adults, 50 g of diet was added to each container.All breeding and rearing took place at 28 °C (±0.5 °C) in complete darkness.Open containers with water (560 cm2 surface) were placed in the top of the incubator to maintain a relative humidity of approximately 65% (±5%) and filled with fresh water once a (2 h), or a long (14 h) heat stress (38 °C) and all groups then remained at 28 °C.Two groups of larvae were either exposed to a lethal dose of M. brunneum or a control treatment immediately after the heat stress treatments.Similarly, two other groups were exposed to the lethal M. brunneum dose or control treatment five days after the heat stress treatments.The subsequent survival was assessed daily for 12 days in all groups and immune responses (IR) in the different treatments were measured two days after the M. brunneum exposure together with the measurement of moulting.Additionally, development and fitness were measured in a group of larvae exposed to the different heat stress treatments but not exposed to M. brunneum.
week.The temperature and relative air humidity in the incubators were monitored every 15 min using EasyLog™ EL-SIE-2 dataloggers (Lascar Electronics Ltd., Wiltshire, UK) throughout the breeding, rearing, and during experiments.

Exposure to Metarhizium brunneum
Metarhizium brunneum isolate KVL12-30 (culture collection of the Department of Plant and Environmental Sciences, University of Copenhagen, Copenhagen, Denmark) was grown on Petri dishes (9 cm diameter, triple vented, Thermo Fisher Scientific, Waltham, MA, USA) containing Sabouraud Dextrose Agar (SDA) media (65 g/l) at 23 °C (±0.2 °C) in complete darkness for 21 days and sealed with Parafilm™ (Merck, Rahway, NJ, USA).These were considered the first subcultures (one transfer since stock culture).To harvest conidia, 10 ml of Triton-X (0.05% v/v, Merck, Rahway, NJ, USA) was added to each of five Petri dishes, and conidia were harvested using a Drigalski spatula (Heathrow Scientific, Vernon Hills, IL, USA).The subsequent suspension containing the conidia was then poured into a 50 ml Falcon tube and centrifuged at 3,000 rpm (1,872 g, centrifuge 5810 R, Eppendorf, Stevenage, UK) for 3 min.Afterwards, the supernatant was discarded and 20 ml of Triton-X (0.05% v/v) was added to the Falcon tube and the centrifuging step was repeated with the settings as above.The supernatant was again discarded and another 20 ml of Triton-X (0.05% v/v) was added to the tube.The obtained stock suspensions were then diluted ten times by adding 0.1 ml of each stock suspension to 0.9 ml Triton-X (0.05% v/v).This was repeated twice to obtain a 1000-times diluted suspension.From this suspension, 20 μl was added to a 0.2 mm Fuchs-Rosenthal hemocytometer (Thermo Fisher Scientific, Waltham, MA, USA) and the conidia were counted under a light microscope, at 400 times magnification.
Conidial viability was assessed by spreading 100 μl of 106 conidia/ml on each of three Petri dishes with SDA, which were incubated at 28 °C (±0.5 °C) for 18 h.Thereafter, 300 conidia were counted on each Petri dish and the numbers of germinated and un-germinated conidia were noted.A conidium was considered as germinated when it had a germ tube at least as long as the smallest diameter of the conidium.
The cups containing larvae were checked for shed exuviae before putting the larvae in new cups (5.2 cm diameter) in groups of 10 (same groups as before) containing a filter paper in the bottom (3 × 3 cm) moistened with 0.15 ml sterile water and a soaked filter paper (2 × 5 cm) on the inner side of the cup.The larvae that were exposed to M. brunneum immediately after the heat stress received 2 μl of 3.5 × 105 conidia/ml suspension (7 × 102 conidia per larva), directly applied on the metathorax of each larva using a pipette.The larvae in the control treatments were exposed in the same way to 2 μl Triton-X (0.05% v/v).The cups were closed with ventilated lids to ensure high air humidity.After 24 h, the larvae (same groups as before) were moved to new cups containing 6 g diet and 1 g bacteriological water agar (1% w/v) without lids.The cups were checked daily for shed exuviae during the first two days.Twice a week, 1 g bacteriological water agar (1% w/v) was added to each cup.
The larvae that were exposed to M. brunneum five days after the heat stress were treated in the same way as the larvae that were exposed to M. brunneum immediately after the heat stress, except that they received 2 μl of 106 conidia/ml suspension (2 × 103 conidia per larva) instead of 3.5 × 105 conidia/ml.These different M. brunneum doses, at different time points, were chosen based on data from previous pre-experimental bioassays to achieve similar survival rates in the M. brunneum groups not exposed to heat stress treatments.

Survival of larvae
The survival of the larvae was checked daily for 12 days and dead larvae were removed from cups.To check the infection status of the larvae, cadavers were surface sterilized by dipping them in a Sodium Hypochlorite (NaClO) solution (2-3% v/v) for 20 s.They were then rinsed two times in sterile water and put individually in Petri dishes (3 cm diameter) for 24 h.Next, wet filter papers were added inside the lids of the Petri dishes and they were sealed with Parafilm™.The cadavers were checked visually for fungal outgrowth and sporulation every second day.

Immune response measurements
Extraction of hemolymph from larvae Hemolymph samples were taken from larvae two days after exposure to M. brunneum, which is long enough to allow the fungus to germinate, penetrate the cuticle, and cause an immune response, but before any mortality occurs in the larvae.The hemolymph samples were used to measure antibacterial activity, phenoloxidase activity, and hemocyte concentration.Three Eppendorf tubes (0.5 ml, Merck, Rahway, NJ, USA) were prepared for each hemolymph sample.In the first Eppendorf tube 22 μl PBS (phosphate-buffered saline; 0.01 M) (A), in the second Eppendorf tube 21 μl PBS (B), and in the third Eppendorf tube 16 μl PBS (C) was added (Supplementary Figure S1).All Eppendorf tubes were kept on ice during hemolymph extraction.
The larvae were held using forceps so that they could not move, and the tibia of the posterior left leg was severed using forceps so that a droplet of clear hemolymph formed.Immediately afterwards, 2 μl of hemolymph was extracted and added to Eppendorf tube (A) using a pipette.The Eppendorf tube (A) was vortexed and afterwards 14 μl of this sample was added to Eppendorf tube (B), which was put immediately in liquid nitrogen to analyse phenoloxidase activity later.Another 4 μl from Eppendorf tube (A) was added to Eppendorf tube (C).Eppendorf tube (A) was then put in liquid nitrogen to analyse antibacterial activity and the sample in Eppendorf tube (C) was used for counting hemocytes (Supplementary Figure S1).Once all the samples were collected, the Eppendorf tubes (A) and (B) were transferred from liquid nitrogen to a freezer at −80 °C.
A total of 20 hemolymph samples were extracted in each treatment originating from larvae from four different cups (five larvae per cup).If samples contained additional tissue fragments smaller than hemocytes, they were considered most likely not pure and they were therefore excluded from analysis resulting in variable sample sizes (hemolymph from 16-20 larvae per treatment was analysed).

Antibacterial activity
The antibacterial activity of hemolymph is an indication of the content of AMPs in a sample (Haine et al., 2008;Hultmark et al., 1982).The method was adapted from Haine et al. (2008).This method is used to measure relative antibacterial activity in hemolymph, expressed as the diameter of inhibited growth of the bacterium Arthrobacter globiformis.The squared diameter of the inhibited zone is linear to the log of AMP concentration in the hemolymph (Hultmark et al., 1982).However, Haine et al. (2008) suggested measuring antibacterial activity as the diameter of the inhibited zone "to avoid compounding marginal measurement errors by multiplying them" (Haine et al., 2008).
One colony of A. globiformis isolate 20124 previously grown on solid P1 media (15 g bacteriological agar, 10 g peptone, 5 g yeast extract, 5 g glucose, and 5 g NaCl in 1 l dH2O) at 30 °C was added to a 250 ml Erlenmeyer flask containing 25 ml liquid P1 media (10 g peptone, 5 g yeast extract, 5 g glucose and 5 g NaCl in 1 l dH2O).The Erlenmeyer flask was incubated on a platform shaker at 200 rpm at 30 °C in complete darkness.After 24 h, the bacterial suspension was poured into a 50 ml Falcon tube and centrifuged for 10 min at 3,000 rpm (1,872 g, centrifuge 5810 R) at 4 °C.The supernatant was discarded and 20 ml sterile dH2O was added.The centrifuging step was repeated with the settings mentioned above.The supernatant was again discarded and another 20 ml sterile dH2O was added to the Falcon tube.The obtained stock suspension was serially diluted ten times by adding 0.1 ml of the stock suspension to 0.9 ml sterile dH2O to obtain 10, 102, 103, 104, 105, 106, 107, 108, and 109 times dilutions.Subsequently, 10 μl of each of the six latter dilutions were pipetted on solid P1 media (three dilutions per Petri dish).By tilting the Petri dish (9 cm diameter, triple vented) on one side, the suspensions ran down on the media forming straight lines.Three replicates per dilution were prepared.The Petri dishes were incubated at 30 °C and the stock suspension was kept in the fridge in the meantime.After 48 h, the colony forming units (cfu) from at least three different dilutions were counted and the concentrations in the different dilutions were calculated using the formula: Thereafter, the average of at least three concentrations was calculated.Solid P1 medium was autoclaved and afterwards put in a water bath at 45 °C.A bacterial suspension of A. globiformis containing 107 cfu/ml was prepared in dH2O from the stock suspension.Once the P1 medium reached 45 °C, 10 μl of the prepared bacterial suspension was added per ml of medium.Thereafter, the medium containing the bacterial suspension was put on a magnetic stirrer and Petri dishes (9 cm diameter, triple vented) with 5 ml medium were prepared.In the meantime, the samples from Eppendorf (A) were thawed on ice.Once the Petri dishes were dry, a pipette with a 2 ml tip was used to form eight holes (2.5 mm diameter) in the medium within each Petri dish.Thereafter, the holes were labelled on the outside and 2 μl of the hemolymph samples was added to each hole (2 μl of PBS was added to a hole of each Petri dish as a control; seven hemolymph samples and one PBS control per Petri dish).Two technical replicates (originating from the same biological replicate, in this case the same larva) were prepared on two different Petri dishes and the Petri dishes were sealed with Parafilm™.After incubation at 30 °C for 48 h, two perpendicular diameters of the inhibited zones were measured using a digital calliper.The inhibited zone was calculated as the average of the two diameters minus the average of the two diameters of the well of the control of the same plate.The average of the two technical replicates was used as one data point.

Measurement of phenoloxidase activity
The samples in Eppendorf tubes (B) were stored at −80 °C for at least 24 h.L-DOPA (l-3,4-dihydroxyphenylalanine; 20 mM; 4 mg/ml) was prepared in dH2O and put on a magnetic stirrer until it dissolved completely.Thereafter, frozen samples were thawed on ice for 30 min.Each sample was vortexed and afterwards centrifuged for 10 min at 6,500 rpm (3,873 g, Microfuge 20R, Beckman Coulter Ltd., High Wycombe, UK) at 4 °C.This step disposed of cell debris in the samples, which potentially could inhibit the reaction between phenoloxidase and L-DOPA.Afterwards, two technical replicates per sample were prepared on the same 96well plate by pipetting 10 μl of the sample per well.Next, 10 μl of PBS was added in each of five control wells per 96-well plate.A volume of 90 μl of L-DOPA was added to each well of the hemolymph sample and PBS controls.The 96-well plate was read using a Synergy™ HT Mul-tiDetection Microplate Reader (BioTek®, Winooski, VT, USA) with Gen5 software (BioTek®, Winooski, VT, USA).The OD (optical density) was measured every minute for 90 min using a wavelength of 490 nm at 30 °C.The Vmax (maximal velocity of the reaction) was measured as the slope during 15 min of the linear phase.Vmax was expressed as ΔOD490 = milliunit/min.The average of the two technical replicates was used as one data point.

Counting of hemocytes
The samples from Eppendorf tubes (C) were vortexed and 14 μl of the sample was immediately pipetted on a Fast-read102 counting slide (Immune Systems Ltd., Devon, UK).The hemocytes were left to settle for 1 min and afterwards, the hemocytes from all ten squares (one square containing 16 grids) were counted on the counting slide.The resultant hemocyte concentration was calculated using the formula: Average number of hemocytes per square 0.1 μl ⁎ 60 The volume above each square is 0.1 μl and the sample was 60 times diluted.The average of the counts from the ten squares was used as one data point.Even though there are multiple types of hemocytes present in the hemolymph of T. molitor, we decided to focus on the total number rather than distinguishing between the different types.

Development and fitness measurements
Larvae from each of the heat treatments were weighed per cup (10 larvae together) one day before then five and 10 days after exposure to the heat stress treatments.
The weight gain per 10 larvae was calculated as the weight of the larvae five, or 10 days after the heat stress minus the weight one day before the heat stress.During the larval development, 1 g bacteriological water agar (1% w/v) was added twice a week.The shed exuviae were counted and removed every second day and larvae were also checked for pupation every second day.Newly emerged pupae were weighed and the sex of each pupa was noted.Males and females were distinguished by examination of the developing genital structures on the ventral side of the eighth abdominal segment.The male has only a small swelling on the seventh visible sternite, whereas the female has a pair of clearly separated papillae on the sternite (Bhattacharya et al., 1970) (Supplementary Figure S2).The first 25 male and female pupae in each heat stress treatment were put individually in separate 50 ml Falcon tubes, each containing 1 g of diet.These pupae were checked every second day for adult emergence after which they remained in their tubes for four to eight days.Thereafter, one male and one female beetle of the same heat treatment (n = 25) were put together in a 50 ml Falcon tube containing 7 g of diet.The pairs were moved to new Falcon tubes with 7 g diet every week for three weeks and they were provided with 0.5 g bacteriological water agar (1% w/v) twice a week.After three weeks, the adult beetles were removed.The larvae in each Falcon tube were counted and weighed in groups, 23 days after the adult beetles were removed.

Statistical analysis
The experimental investigation of survival, immune responses, and moulting of larvae after exposure to M. brunneum and heat stresses were performed on two independent occasions (included as random effects in all statistical models), whereas development and fitness measurements of larvae only exposed to heat stresses were performed once.Differences were considered significant at P < 0.05.Data was only subjected to one-or two-way ANOVAs (analysis of variances) when normality (QQ-plots) and homogeneity of variances (Levene test, P > 0.05) assumptions were satisfied.All statistical analyses were performed with R v. 4.1.0(R Core Team, 2021), Figure 1 was prepared with Biorender (Anonymous, 2022a), and Figures 2-6 were prepared with GraphPad Prism version 9.3.1 (Anonymous, 2022b).

Survival analysis
Survival analyses of larvae exposed to M. brunneum immediately and five days after heat stress were performed separately using the survival (Therneau, 2021), and the coxme (Therneau, 2020) packages in R.Only the treatment groups that showed any mortality were analysed using the Cox model, because in the groups with no mortality (treatments without M. brunneum exposure) the Cox model resulted in degenerate estimates.A mixed effects Cox model was used to analyse the survival data.The cups, initially containing 10 larvae per cup, as well as the experiments (repetition on two independent occasions) were included as random effects.Pairwise comparisons of the heat stress treatments were carried out using Tukey contrasts with single step adjustment for multiple testing in the multcomp package (Hothorn et al., 2008).To confirm that M. brunneum exposure resulted in different survival to no exposure to M. brunneum, the survival was additionally analysed using a log-rank test in the survival package (Therneau, 2021).In addition, a mixed effects Cox model (with cup and experimental repetition as random effects) was used to analyse the effect of using different pathogen doses at 0 or five days after heat stress (analysis only done on larvae that were not exposed to heat Immune responses, moulting during two days, and mycosis Immune response and moulting data assessed two or seven days after heat stress were analysed independently.To compare hemocyte concentrations across heat treatments and exposure to M. brunneum, a generalized linear mixed model with a negative binomial error distribution (used for overdispersed count data) was implemented.To compare antibacterial and phenoloxidase activity across heat treatments and exposure to M. brunneum, generalized linear mixed models with gamma error distributions (used for right-skewed data) were implemented.To compare the number of shed exuviae two days after M. brunneum exposure across heat treatments, a generalized linear mixed model with a Poisson error distribution was implemented.To compare the proportion of M. brunneum exposed larvae showing mycosis across heat treatments, a generalized linear mixed model with a Binomial error distribution was implemented.All above models were implemented using the lme4 package (Bates et al., 2015).Experiment (repetition on two independent occasions) and cups were included as random effects in all models.Models were selected using the drop1 function and removing non-significant terms, and pairwise comparisons were performed using the emmeans package (Lenth, 2022).Statistics for terms that were excluded in the final models were extracted from the analysis prior to their elimination.

Development analysis
Data on weight gain five and 10 days after the heat stress, number of exuviae until pupation, and number of offspring over three weeks were subjected to oneway ANOVAs using Tukey's HSD (Honestly Significant Difference) tests to separate the means.Pupal weights were analysed using a two-way ANOVA with sex and heat treatments as fixed effects and cup as random effect.Data on duration of development from heat stress until pupation were analysed using a mixed effects Cox model with sex, heat stress treatment, and their interaction as fixed effects.Moreover, the cups were added as a random effect.The analysis was performed using the coxme package (Therneau, 2020).The data on the average larval weight of each mated pair per week were subjected to one-way ANOVA using Tukey's HSD tests to separate the means.Data from one mated pair in the group that received a long heat stress was excluded because the female beetle died in the first week of egg laying.

Short-term effect of heat stress on pathogen susceptibility
To test the short-term effect of heat stress on pathogen susceptibility of T. molitor, larvae were exposed to a lethal dose of M. brunneum immediately after a short (2 h), long (14 h), or no heat stress.There was no difference in survival probabilities of control larvae exposed to M. brunneum 0 or 5 days after the heat stress, indicating that the two tested pathogen doses achieved comparable mortality rates (Table 1).The germination rates of M. brunneum conidia in all experiments were >99%.Metarhizium brunneum exposure had a significant effect on survival (log-rank test: χ2 = 84.4; 1, 718; P < 0.001).A short and a long heat stress treatment had a significant effect on the survival probabilities of larvae exposed to M. brunneum (Table 1).After post-hoc tests the survival probability of larvae exposed to M. brunneum was still significantly increased when they received a short heat stress compared to larvae that were constantly kept at 28 °C (P < 0.001; Figure 2) but not compared to larvae that received a long heat stress (P = 0.279; Figure 2).The survival probability of larvae exposed to a long heat stress was not significantly different compared to larvae that were kept constantly at 28 °C (P = 0.057; Figure 2).There was no effect of heat stress on mortality in larvae that were not exposed to M. brunneum (Figure 2), indicating that all the mortality observed in the pathogen treatments can be attributed to exposure to M. brunneum.Of all the cadavers, 76, 100, and 84% showed mycosis (visible fungal outgrowth) in no, short, and long heat stress treatments, respectively, without a significant effect of heat stress (Table 2).Subsequently, all of these cadavers sporulated, producing typical green conidia of the Metarhizium genus.
To measure the short-term effect of heat and pathogen stress on immune responses, hemolymph samples of larvae were extracted two days after a short, long or no heat stress with either exposure to a lethal dose of M. brunneum or no pathogen exposure.Exposure to M. brunneum had no significant effect on antibacterial activity (Figure 3A, Table 2) and there was no significant pathogen exposure ⁎ heat stress interaction (Figure 3A, Table 2).The heat stress treatment alone had a significant effect on antibacterial activity (Figure 3A, Figure 2 Cumulative survival probabilities of T. molitor larvae exposed to M. brunneum (7 × 102 conidia per larva) immediately after a short (2 h), long (14 h) or no heat stress (HS).The results for each treatment are reported as the median values of two independent experiments.Each group in each experiment consisted of seven cups with 10 individuals per cup resulting in n = 140.Letters at the end of the curves designate significant differences between the three treatment groups exposed to M. brunneum (pairwise comparisons of means, P < 0.05).Larvae only exposed to no, short, and long heat stresses without exposure to M. brunneum were included in both experiments and showed 100% survival in all treatments.Each of these control groups in each experiment consisted of five cups with 10 individuals per cup resulting in total n = 100.
and a long heat stress increased antibacterial activity in the hemolymph significantly compared to no heat stress (both P < 0.001; Figure 3A).Hemocyte concentration was significantly affected by exposure to M. brunneum (Figure 3B, Table 2), although no significant differences could be identified when treatment combinations were compared with each other individually in the post-hoc tests.Furthermore, heat stress treatments had a significant effect on hemocyte concentration (Figure 3B  long heat stress increased hemocyte concentration in the hemolymph compared to the short heat stress (P < 0.001; Figure 3B) and no heat stress (P = 0.003; Figure 3B).There was no significant pathogen exposure ⁎ heat stress interaction on hemocyte concentration (Figure 3B, Table 2).The phenoloxidase activity was not affected by exposure to M. brunneum, heat stress, or pathogen ⁎ heat stress interaction (Figure 3C, Table 2).
The number of exuviae shed per 10 larvae over the two days after heat and pathogen exposure was significantly affected by heat stress treatments (Figure 3D, Table 2) but not by exposure to M. brunneum (Figure 3D, Table 2) or by the pathogen exposure ⁎ heat stress interaction (Table 2).The number of exuviae per replicate was significantly lower in larvae that received a long heat stress compared to larvae that did not receive a heat stress (P = 0.006; Figure 3D) or a short heat stress (P < 0.001; Figure 3D).There was no significant difference in the number of exuviae between short and no heat stress (P = 0.071; Figure 3D).The number of exuviae shed during the first day (during which larvae were exposed to the heat treatments and before exposure to M. brunneum) were <0.1 exuviae per replicate on average in each treatment.Moulting during the heat treatments was therefore disregarded.

Persistent effects of heat stress on pathogen susceptibility
To test the persistent effects of heat stress on pathogen susceptibility of T. molitor, larvae were exposed to a lethal dose of M. brunneum five days after a short, long or no heat stress.The germination rates of M. brunneum conidia in all experiments were >99%.Metarhizium brunneum exposure had a significant effect on survival (log-rank test: χ2 = 157.0; 1, 718; P < 0.001).Of all the cadavers from the pathogen exposed treatment, 93, (2 h), long (14 h) or no heat stress (HS).The results for each treatment are reported as the median values of two experiments.Each group in each experiment consisted of seven cups with 10 individuals per cup resulting in n = 140.Pairwise comparisons of means showed no significant differences between the treatment groups (P < 0.05).Larvae only exposed to no, short, and long heat stresses without exposure to M. brunneum were included in both experiments and showed 100% survival in all treatments.
Each of these control groups in each experiment consisted of five cups with 10 individuals per cup resulting in total n = 100.
84, and 94% showed mycosis in no, short, and long heat stress treatments, respectively (Table 2), with all these cadavers also showing sporulation.A short or a long heat stress treatment had no significant effect on the survival probability of larvae exposed to M. brunneum (Table 1 and Figure 4).Larvae that were not exposed to M. brunneum but only the short, long or no heat stress treatments did not show mortality.
To measure the persistent effects of heat and pathogen stress on immune responses, hemolymph samples of larvae were extracted seven days after a short (2 h), long (14 h) or no heat stress with either exposure to a lethal dose of M. brunneum or no pathogen exposure (two days before).The exposure to M. brunneum, heat stress or their interaction did not have a statistically significant effect on antibacterial activity (Figure 5A, Table 2).The interaction between M. brunneum exposure and heat stress had a significant effect on hemocyte concentration in the hemolymph (Figure 5B, Table 2) and was therefore retained in the model (consequently treatments were compared with each other individually).In the larvae exposed to M. brunneum, increasing durations of heat stress treatments led to significantly decreasing hemocyte concentrations in the hemolymph (Figure 5B).
Phenoloxidase activity was significantly affected by heat stresses (Figure 5C, Table 2), although significant differences could not be identified when treatments were compared with each other individually in the posthoc test.There was no significant effect of exposure to M. brunneum on phenoloxidase activity (Figure 5C, Table 2) and there was no significant pathogen exposure ⁎ heat stress interaction (Figure 5C, Table 2).The number of exuviae shed during the two days after M. brunneum exposure was generally very low and there was no significant effect of exposure to pathogen, heat, or their interaction (Figure 5D, Table 2).

Effect of heat stress on development and fitness
To examine the effects of heat stress on development and reproduction, larval weight gain, development duration until pupation, pupal weight, and the number and weight of offspring of females that had been exposed to heat stress as larvae were measured.Heat stress treatments had a significant effect on larval weight gain in the first five days (Tables 3 and 4).Posthoc tests revealed that weight gain was highest in the control treatments, and lowest in the long-heat stress treatment (Tables 3 and 4).After 10 days, the larvae that had been exposed to either a short or long heat stress had both compensated the weight gain and there were no significant differences between treatments anymore (Tables 3 and 4).
Heat stress treatments had a significant effect on the total number of exuviae shed until pupation per replicate (Tables 3 and 4).Post-hoc tests revealed that a short heat stress increased the total number of exuviae shed in comparison to no heat stress (Tables 3 and 4) and long heat stress (Tables 3 and 4).The duration of the larval development until pupation was not affected by heat  1 and 4).Similarly, the heat stress treatments and sex did not affect the pupal weights (Tables 3 and 4).The number of offspring per female over a three week duration was not affected by the heat treatments (Tables 3 and 4).
The number and weight of offspring from heat stressed parents were measured to assess the effect of heat stress during the larval stage on reproductive success and offspring.Heat stress treatments experienced as larvae had a significant effect on the weight of their larval offspring (Table 3).A short heat stress increased the weight of their offspring compared to the offspring of larvae that were not exposed to a heat stress (in weeks 2 and 3) and compared to those exposed to a long heat stress (in weeks 1-3) (significant p-values are shown in Figure 6).

Discussion
In this study, we demonstrate that T. molitor larvae exposed to a short heat stress have a higher survival probability when exposed to M. brunneum as hypothesised.This result correlates well with our finding that short heat stressed larvae had an increased antibacterial activity in their hemolymph, indicating an increased concentration of AMPs in the hemolymph that can fight fungal cells.In contrast, we found that the survival probability of larvae receiving a heat stress treatment five days prior to pathogen exposure was no different to that of non-heat stressed larvae despite the reduced weight gain of the heat stressed larvae.
Figure 6 Mean (+SEM) weight (mg) per larva of parents that received no (white), a short (grey) or a long (black) heat stress (HS).The eggs were laid in three consecutive weeks by the same females.Larvae were weighed 23 days after removal of parents.Significant differences between heat stress treatments per week are denoted by P-values.
immune priming should not be used to describe the immediate effect of a stress on an infection as this does not involve any form of immune memory.Previous studies have only investigated larval susceptibility to pathogens immediately after the heat stress (Browne et al., 2014;Mowlds and Kavanagh, 2008;Wojda and Taszłow, 2013).In contrast, we exposed the larvae to the pathogen both immediately after and five days after the heat stress.Although we found an increase of survival probability and antibacterial activity immediately after the short heat stress, we could not detect withingeneration immune priming caused by heat stress, as larvae exposed to the pathogen five days after the heat stress were equally susceptible compared to larvae that were kept at constant temperatures.Moreover, heat stressed larvae did not show any increase in the measured immune responses after seven days.
In addition to key immune responses, we also measured the number of shed exuviae after heat and pathogen exposure.This is an important parameter to measure in experiments involving fungal pathogens and T. molitor larvae; T. molitor can have a variable number of moults (Ribeiro et al., 2018) and moulting might affect the ability of the fungus to penetrate the insect's cuticle (Kim and Roberts, 2012).Larvae exposed to a long heat stress moulted less during the first two days compared to larvae exposed to no or short heat stress.Larvae that received a long heat stress, therefore, may have had a higher probability of becoming infected by the fungus, which could be an additional explanation why their survival probability after pathogen exposure was not as high as that of the short heat stressed larvae.This is, however, only speculative because the direct relationship between moulting and fungal penetration through the cuticles was not measured in this study.
To understand the potential long-term benefits and risks related to heat stress in T. molitor production systems we also tested the effect on reproduction and body mass of the offspring.We found increased body mass in offspring of females that had been exposed to a short but not to a long heat stress as larvae.This indicates that heat stress duration on the parental generation might follow a hormetic response, with short heat stress having a beneficial impact on body mass of offspring.However, in other insect species, heat stress on the parental generation decreases body mass of offspring (Jeffs and Leather, 2014) and increases the developmental time of offspring (Eggert et al., 2015).To confirm the long-term implications of heat stress on the body mass of offspring, further studies should compare the pupal mass of offspring, adjusted for their developmental time.
Mass-reared T. molitor larvae can be exposed to elevated temperatures due to metabolic heat production Journal of Insects as Food and Feed 0 (2023) 1-19 Downloaded from Brill.com 12/11/2023 03:56:01PM via Open Access.This is an open access article distributed under the terms of the CC BY 4.0 license.https://creativecommons.org/licenses/by/4.0/(Deruytter et al., 2022;Morales-Ramos and Rojas, 2015).For the mass-rearing of these insects, it is therefore important to understand the impact of heat stress, to determine if short durations of heat stress should be avoided or even facilitated, for example, to increase resistance to diseases as previously suggested (Grau et al., 2017;Maciel-Vergara et al., 2021).The intensities of the tested heat stresses in this study did not result in a persistent increase of disease resistance.Only immediate exposure to the fungal pathogen after the heat stress led to increased survival probability.To use heat stress as a method to decrease mortality in cultured T. molitor populations, the exact timing of pathogen exposure would be needed, which does not seem feasible.It is, however, important to note that in the current study, insects were exposed to a single heat stress and repetitive or pulsed exposures to heat stresses might occur when T. molitor larvae are mass-reared, which would be relevant to investigate in future studies.
Future work should also investigate if there are transgenerational effects on immune responses such that T. molitor larvae from heat stressed parents express altered immune responses as shown in other insect species (Eggert et al., 2015).Furthermore, the infection outcome after heat stress might differ when testing other strains of T. molitor and different pathogen species.The infection outcome following heat stress could also be affected by symbionts with different thermal requirements.Gregarina spp., frequent commensals in the gut of T. molitor (Sumner, 1933;Valigurová, 2012), for example, do not survive temperatures over 36-37 °C (Clopton et al., 1992), hence temperature stress might be disadvantageous to these species.Therefore, more research is required to fully understand the effects of heat stress on immunity, insect health, and resistance to disease infections.
In conclusion, we show that heat stress has an impact on host-pathogen interactions in T. molitor.Not only the duration of the heat stress but also the timing of the exposure to the pathogen affects the outcome of infection and immune responses.The results in this study show that increased survival after heat stress comes with a cost (i.e.decreased hemocyte concentrations at a later stage of growth and slower body mass gain).The persistent effects are, however, not as severe as hypothesised (i.e.no difference in survival of larvae exposed to the pathogen five days after heat stress).Moreover, we show that heat stress can affect the body mass of the offspring, which demonstrates the importance of investigating effects of temperature in the long-term and not only in the short-term.Beneficial effects on pathogen susceptibility wane rapidly and the reduction in weight gain after heat stress is only temporary.However, there are negative prolonged effects of heat stress on immune responses, which, together with the impact of repeated exposures to heat stress, should be investigated in further studies.This understanding will help safeguard insect health in mass-reared populations, which is crucial for the rapidly growing industry of rearing insects for feed and food.

Figure 1
Figure 1 Schematic representation of the experimental design.Tenebrio molitor larvae were either exposed to a control (28 °C), a short(2 h), or a long (14 h) heat stress (38 °C) and all groups then remained at 28 °C.Two groups of larvae were either exposed to a lethal dose of M. brunneum or a control treatment immediately after the heat stress treatments.Similarly, two other groups were exposed to the lethal M. brunneum dose or control treatment five days after the heat stress treatments.The subsequent survival was assessed daily for 12 days in all groups and immune responses (IR) in the different treatments were measured two days after the M. brunneum exposure together with the measurement of moulting.Additionally, development and fitness were measured in a group of larvae exposed to the different heat stress treatments but not exposed to M. brunneum.

Figure 3 Figure 4
Figure 3 Immune responses and moulting of larvae two days after no, short or long heat stress (HS) either control (white) or exposed to M. brunneum (grey).The results are based on two independent experiments.(A) Mean (+SEM) antibacterial activity (diameter of inhibited zone in mm).(B) Mean (+SEM) hemocytes per μl hemolymph.(C) Mean (+SEM) phenoloxidase (PO) activity (milliunits/min).(D) Mean (+SEM) number of exuviae per replicate during two days after pathogen exposure.Different lowercase letters denote statistically significant differences between heat stress treatments (pairwise comparisons of means, P < 0.05).(A-C): number of samples (individuals) per treatment are given in each bar.(D): number of replicates (each containing 10 larvae) are given in each bar.
Journal of Insects as Food and Feed 0 (2023) 1-19 Downloaded from Brill.com 12/11/2023 03:56:01PM via Open Access.This is an open access article distributed under the terms of the CC BY 4.0 license.https://creativecommons.org/licenses/by/4.0/stress treatments or by sex (Tables

Figure 5
Figure 5 Immune responses and moulting of larvae seven days after no, short, or long heat stress (HS) either control (white) or exposed to M. brunneum (grey).The results are based on two independent experiments.(A) Mean (+SEM) antibacterial activity (diameter of inhibited zone in mm).(B) Mean (+SEM) hemocytes per μl hemolymph.(C) Mean (+SEM) phenoloxidase (PO) activity (milliunits/min).(D) Mean (+SEM) number of exuviae per replicate during two days after pathogen exposure.Different lowercase letters denote statistically significant differences between heat stress treatments or individual treatments used for hemocyte per μl hemolymph because interaction between M. brunneum and heat stress exposure was significant (pairwise comparisons of means, P < 0.05).(A-C): number of samples (individuals) per treatment are given in each bar.(D): number of replicates (each containing 10 larvae) are given above each bar.
stress but to M. brunneum) to understand if both doses achieved comparable mortality rates.

Table 2 )
and post-hoc tests revealed that both a short Results of the statistical analyses using mixed effects cox proportional hazards models to analyse survival and duration until pupation of T. molitor larvae (results of pairwise comparisons for survival analyses are given in the text) Journal of Insects as Food and Feed 0 (2023) 1-19 Downloaded from Brill.com 12/11/2023 03:56:01PM via Open Access.This is an open access article distributed under the terms of the CC BY 4.0 license.https://creativecommons.org/licenses/by/4.0/Table 1 , Table 2); a Journal of Insects as Food and Feed 0 (2023) 1-19 Downloaded from Brill.com 12/11/2023 03:56:01PM via Open Access.This is an open access article distributed under the terms of the CC BY 4.0 license.https://creativecommons.org/licenses/by/4.0/

Table 2
Results of statistical analyses using generalized linear mixed models and general linear models (results of pairwise comparisons are mentioned in the text).Bold terms were retained in the final models Journal of Insects as Food and Feed 0 (2023) 1-19 Downloaded from Brill.com 12/11/2023 03:56:01PM via Open Access.This is an open access article distributed under the terms of the CC BY 4.0 license.https://creativecommons.org/licenses/by/4.0/

Table 3
Results of statistical analyses using analysis of variances

Table 4
Larval weight gain, number of exuviae shed until pupation, development duration until pupation, pupal weight and number of offspring per female that were exposed to no, short (2 h), or long (14 h) heat stress (HS) as larvae1