Responses to a warming world: Integrating life history, immune investment, and pathogen resistance in a model insect species

Abstract Environmental temperature has important effects on the physiology and life history of ectothermic animals, including investment in the immune system and the infectious capacity of pathogens. Numerous studies have examined individual components of these complex systems, but little is known about how they integrate when animals are exposed to different temperatures. Here, we use the Indian meal moth (Plodia interpunctella) to understand how immune investment and disease resistance react and potentially trade‐off with other life‐history traits. We recorded life‐history (development time, survival, fecundity, and body size) and immunity (hemocyte counts, phenoloxidase activity) measures and tested resistance to bacterial (E. coli) and viral (Plodia interpunctella granulosis virus) infection at five temperatures (20–30°C). While development time, lifespan, and size decreased with temperature as expected, moths exhibited different reproductive strategies in response to small changes in temperature. At cooler temperatures, oviposition rates were low but tended to increase toward the end of life, whereas warmer temperatures promoted initially high oviposition rates that rapidly declined after the first few days of adult life. Although warmer temperatures were associated with strong investment in early reproduction, there was no evidence of an associated trade‐off with immune investment. Phenoloxidase activity increased most at cooler temperatures before plateauing, while hemocyte counts increased linearly with temperature. Resistance to bacterial challenge displayed a complex pattern, whereas survival after a viral challenge increased with rearing temperature. These results demonstrate that different immune system components and different pathogens can respond in distinct ways to changes in temperature. Overall, these data highlight the scope for significant changes in immunity, disease resistance, and host–parasite population dynamics to arise from small, biologically relevant changes to environmental temperature. In light of global warming, understanding these complex interactions is vital for predicting the potential impact of insect disease vectors and crop pests on public health and food security.

The immune system of insects comprises constitutive and induced responses (Schmid-Hempel, 2005). Induced components are pathogenspecific and take longer to produce, whereas constitutive immune responses are nonspecific and immediate in their action. Constitutive responses include the cellular actions of coagulation, encapsulation, and phagocytosis, which require the recruitment of hemocytes following recognition of an immune challenge (Hillyer, 2016), and the phenoloxidase activation system (PO-AS). Active phenoloxidase (PO) is required for initiating the production of melanin (Gillespie, Kanost, & Trenczek, 1997), which has multiple functions in immunity, being used for cuticle sclerotization, clotting, and encapsulation responses (Cerenius, Lee, & Söderhäll, 2008;Cerenius & Söderhäll, 2004).
Understanding how temperature affects the disparate components of the immune system and interactions therein is important for predicting the phenotypic outcome of the organism. While increasing temperature tends to increase the rate of biochemical processes, this does not necessarily extend to all aspects of physiology, and increasing temperature may not positively correlate with improved immune competence (Angilletta, Huey, & Frazier, 2010;Murdock et al., 2012;Suwanchaichinda & Paskewitz, 1998).
Maintaining an immune system is costly (Rolff & Siva-Jothy, 2003;Schmid-Hempel, 2005), and while interrelated immune parameters may impact each other, they are also in resource competition with other life-history traits. Trade-offs have been reported between immune measures and development rate, reproductive activity, and fecundity (see Schmid-Hempel, 2005;Schwenke, Lazzaro, & Wolfner, 2015; for reviews): all of which could be further influenced by the effects of temperature. These species-specific trade-offs are further compounded by the introduction of temperature as an external ecological stressor. For example, a short exposure to temperature stress in the butterfly Bicyclus anynana produced contrary responses between life-history and immune measures that became more pronounced when individuals were nutritionally depleted, indicating trade-offs in resource allocation (Karl, Stoks, De Block, Janowitz, & Fischer, 2011).
The ability to predict genotype-by-environment (GxE) interactions in determining host fitness becomes even more complex if hostpathogen interactions are considered (GxGxE). Pathogen exposure can also exacerbate preexisting trade-offs between the immune system and other life-history measures (Schwenke et al., 2015). Consequently, a combination of temperature and pathogen stressors acting on these interactions may provoke a more striking outcome.
Environmental temperature can have a significant impact on hostpathogen interactions, as it affects both immune system functioning, and consequently a host's ability to resist or tolerate infections, and pathogen virulence and population dynamics. The strongly nonlinear response of these factors to temperature changes makes predicting the outcomes of infection particularly challenging (Sternberg & Thomas, 2014). Relatively small and realistic changes in temperature have a significant effect on the virulence of a wide range of microbial pathogens in invertebrate hosts (see  for review), leading to potential conflicts over optimal operating temperatures for both parties. For example, the faster growth rate of Aspergillus fungus in the sea fan coral, Gorgonia ventalina, at higher temperatures is mirrored by an increase in the activity of host-derived antifungal compounds (Ward, Kim, & Harvell, 2007). However, temperatureassociated increases in pathogen replication rates may be so rapid as to overwhelm the capacity of the host immune system. Conversely, increasing temperature may reduce host lifespan, so perturbing pathogen transmission. Alternatively, hosts may be able to use temperature to their advantage, employing behavioral thermoregulation to induce a fever that restricts pathogen growth (Elliot, Blanford, & Thomas, 2002). Work has started to investigate the temperature effects on immune responses and life-history parameters following challenge with an immune elicitor (Catalán et al., 2012). However, temperature stress was only applied postchallenge. In mosquitoes, environmental temperature experienced during development was found to have significant effects on resistance to dengue virus (Alto & Bettinardi, 2013), highlighting the importance of host lifetime thermal experience in understanding these interactions.
Here, we use a biologically relevant temperature range (20-30°C) to assess how life-history traits (developmental time, body size, longevity, and fecundity) and immune measures (PO activity and hemocyte counts) vary in response to relatively small temperature increments. PO activity and hemocyte counts are commonly measured to establish immune capacity in insects (Schmid-Hempel, 2005), both being associated with resistance to a range of pathogens and parasites (e.g., Reeson, Wilson, Gunn, Hails, & Goulson, 1998;Prevost & Eslin, 1998  The outbred line was allowed to establish for at least 10 generations before being used for experiments.

| Temperature treatments
The effects of temperature were measured at 20, 22, 24, 27, and 30°C, with animals for each treatment group being maintained in separate incubators set at the appropriate temperature (±0.5°C), the incubators themselves being kept in a controlled temperature room set at 20°C. Humidity was not controlled but is generally low in this facility.

| Life-history measures
To determine the effect of a temperature gradient on life-history measures, eggs collected from the stock population over a 24-hr period were divided equally between containers in the five incubators with ad lib food. Larvae were allowed to hatch and grow to fourth instar (in all cases, developmental stage is determined by head capsule size, with the ratio of head capsule to larval body judged by eye to control for body size), then sexed (testicles are easily identified through the cuticle), and 60 females per temperature treatment put into individual Petri dishes with 1 g of food. The subsequent time to pupation and adult eclosion was recorded. On eclosion, 30 randomly chosen females from each temperature group were paired with virgin males retained from the same treatment group and allowed to mate for 24 hr, after which time the males were removed and discarded.
Mated females were transferred to a fresh pot every 48 hr, and eggs laid in the previous 48 hr were counted. This was continued until female death. Nonmated females were also maintained and time to death recorded.
To measure the effect of temperature on body size, eggs were set up as before, and animals allowed to develop to adult emergence. The wing lengths of twenty randomly selected females from each treatment group were then measured (using ImageJ software) as a proxy for body size.

| Immune measures
As above, stock eggs were split between five incubators at 20, 22, 24, 27, and 30°C and allowed to develop to fifth-instar larvae with ad lib food. Due to variation in the rate of development between the temperature treatment groups, samples were collected over a period of 17 days. Larval weight was recorded to control for variation in body size between the temperature treatments. Larvae were sexed, and the females selected for use in either hemocyte count and phenoloxidase (PO) sample collection or bacterial clearance assays. Collecting samples for the hemocyte count and PO assays from the same individual allowed for direct comparison of the influence of temperature on both immune assays in individual larvae.
Due to collection time constraints, assay samples were collected in two blocks, resulting in final sample sizes of 37-64 per immune assay per temperature treatment.

| Hemocyte counts
Hemocytes counts, both total and relative, have been found to correlate with an increased immune function, with higher hemocyte counts being associated with a stronger encapsulation response (Kraaijeveld & Godfray, 2001;Poyet et al., 2013;Prevost & Eslin, 1998;Wilson, Knell, Boots, & Koch-Osborne, 2003). Two microliters of hemolymph was collected from each fifth-instar larva. One microliter of this was immediately frozen at −80°C for use in determining PO activity. The remaining 1 μl was thoroughly mixed with 7 μl anticoagulant buffer (4:3 glycerol:EDTA anticoagulant [EDTA 2.9225 g + citric acid 1.9213 g + 80 ml PBS, pH 7.4]), and frozen (−80°C) for hemocyte counting. All cell counts were carried out within 3 weeks of collection to avoid the hemocyte deterioration seen in older frozen samples (A. M. Laughton, pers. obs.). To count, samples were defrosted on ice, mixed again by pipette to ensure even cell distribution, and 6 μl added to a hemocytometer (Neubauer chamber, 0.1 mm depth). Total hemocyte counts were recorded from five predetermined cells within the hemocytometer grid and averaged to give a total per sample (n = 37-43 per temperature treatment).
Plodia have six different types of hemocytes, some of which have functions in the immune system (Beeman, Wilson, Bulla, & Consigli, 1983;Ribeiro & Brehélin, 2006). These are only distinguishable in fresh preparations or using electron microscopy; however, and because we used frozen material with an anticoagulant buffer, we were unable to reliably separate cell types. Consequently, only total hemocyte counts (THC) were recorded, but we note that this approach has worked well in previous studies and THC is the measure that has been shown consistently to correlate with encapsulation (e.g., Eslin & Prevost, 1996;Kraaijeveld & Godfray, 2001;Wilson et al., 2003).

| Phenoloxidase activity
Phenoloxidase (PO) is present in the hemolymph as both the active enzyme and as inactive proPO. Most studies of insect immune reactivity focus on the active enzyme, although some have studied both total PO, with the proPO activated using chymotrypsin. Some of these have found that levels of active and total PO are very strongly correlated (e.g., Körner, Vogelweith, Foitzik, & Meunier, 2017), whereas others have found that the two measures respond differently to other aspects of the animal's biology (e.g., Busso, Blanckenhorn, & González-Tokman, 2017). Here, for logistic reasons and to make our results comparable with the majority of other work, we report on active PO activity only. PO activity was assayed by measuring its catalytic conversion of L-dopa (3,4-dihydroxy-L-phenylalanine, colorless) to dopachrome (red-brown color) photometrically (Barnes & Siva-Jothy, 2000;Horowitz & Shen, 1952). One microliter of hemolymph samples was defrosted on ice, 9 μl cold phosphate-buffered saline (PBS, Sigma) added, and the sample vortexed to mix. The 10 μl sample was added to the well of a chilled 96-well plate. L-dopa (100 μl, 4 mg/ml in dH 2 0) was added, and the reaction was allowed to proceed at 30°C in a spectrophotometer (Multiskan Ascent, Thermo Labsystems).
Readings were taken every 15 s for 1 hr at 490 nm and analyzed using Ascent v 2.6 software. Enzyme activity (Vmax) was measured as the maximum linear rate of substrate conversion. Final sample size was n = 37-43 per temperature treatment.
To assess the effect of temperature on the ability of Plodia larvae to clear a bacterial infection, female fifth-instar larvae were injected laterally with 8 μl tetracycline-resistant E. coli (strain BC-Gold, obtained from the Sullivan Lab [QMUL]) at OD 60 = 1 using a Hamilton syringe. A couple of drops of red food dye were added to the standardized bacterial broth to enable monitoring of successful injections. Injected larvae were allowed to recover in a Petri dish for 10 min before being placed into a treatment pot with ad lib food and returned to the appropriate incubator. Twenty-four hours postchallenge, surviving larvae from each treatment pot were collected, individually placed into 1.5-ml microtubes and homogenized with 200 μl PBS using sterile pestles to ensure the capture of all remaining bacteria. Samples were further diluted to 1:1,000 μl PBS, vortexed, and 50 μl subsample was plated onto LB plates with tetracycline using a sterile spreader. Plates were incubated at 37°C for 24 hr, and any resulting colonies (colony-forming units, CFUs) counted. Original samples were retained at 4°C for 24 hr if required for any necessary replating or further dilution. Retaining samples for this period was not found to significantly alter bacterial counts (A. M. Laughton, pers. obs.). Final sample sizes were n = 43-64 per temperature treatment.

| Virus resistance
Virus resistance was measured using the naturally occurring virus Plodia interpunctella granulosis virus (PiGV). Following the oral ingestion of occlusion bodies by larvae, virus particles infect the midgut epithelial cells and spread into secondary tissues, leading to cell lysis, tissue damage, and, ultimately, host death prior to pupation (Begon, Daud, Young, & Howells, 1993). Infected larvae turn a characteristic opaque white color, so are easily distinguished from healthy individuals. PiGV resistance was assayed using an LD 50 dose (predetermined from stock solution as 0.5 μl virus solution + 999.5 μl sucrose solution [50:50 sucrose:dH 2 O]). Stock virus solution was made by centrifuging a homogenate of infected individuals following Boots and Begon (1994). All virus applications were made using the same stock solution aliquoted into doses and stored at −20°C. Virus was administered orally to early third -instar larvae (mixed sex, 6-14 days old depending on rearing temperature, developmental stage determined by relative head capsule width to body size). Third-instar larvae were used for this assay because final (fifth) instar P. interpunctella are completely resistant to PiGV and fourth-instar larvae, while susceptible, require large doses to become infected (Sait, Begon, & Thompson, 1994). Finalinstar larvae, however, are much easier to handle because of their size and procedures such as injection or hemolymph extraction are considerably easier, and hence, they were used for the other experiments in this study. Larvae were removed from the diet medium and left to starve for 2 hr prior to dosing. Each larva was then presented with a 1 μl droplet of virus/sucrose solution. Red food dye was added to the sucrose solution, and larvae deemed to have been successfully dosed when dye could be seen filling at least half the length of their gut.
Due to the differences in larval growth rates between the temperature treatments, virus resistance was assayed in two ways. Eggs were collected from the stock line during a 24-hr period, and all treatment groups were established by placing ~40 eggs onto 12 g food in a small pot. For the first assay method, treatment pots were then divided equally between the five temperature treatment incubators.
Larvae were allowed to develop to third instar, at which point they were dosed with virus (as above). Virus administration was staggered over an 8-day period to allow for each temperature treatment group to reach the same developmental stage, with larvae judged by eye to determine size for infection. Postinoculation, larvae were individually placed into 25-well Petri dishes with ad lib food, returned to their respective incubators, and checked 2 weeks later for signs of infection.
In the second assay method, the larvae were all raised in treatment pots at 26°C (standard Plodia lab rearing conditions) until third instar, ensuring that larval development was synchronized. Larvae were inoculated with virus on the same day and after dosing were divided equally across the five temperature treatment incubators and allowed to continue development for 2 weeks (in 25-well Petri dishes with ad lib food) before checking for signs of disease. Sample sizes postinoculation ranged from 25 to 50, although due to some larval mortality, final sample sizes 2 weeks postinoculation were reduced to n = 18-30.

| Analysis
All data analyses and relevant R code are available in the supporting information, as are the data sets analyzed. All data were analyzed using R v3.2.3 (R Core Team, 2015). Linear mixed-effects models were fitted to the majority of response variables, with temperature as a continuous explanatory variable and incubator as a random factor.
Experimental block and larval weight were fitted as covariates when appropriate. When exploratory analysis and inspection of diagnostic plots indicated a curved relationship between temperature and a response variable, polynomial models were fitted. In a few cases, the response variable was transformed when diagnostic plots indicated deviation from model assumptions. Most models used normal errors, but virus infection was analyzed using binomial errors. The effects on survival were modeled using a mixed-effects Cox proportional hazards model fitted using the coxme package (Therneau, 2015) with no censoring (data conformed to model assumptions).
The effect of temperature on egg production was analyzed using a generalized additive mixed-effects model with quasi-Poisson errors (GAMM), fitted using the mgcv package (Wood, 2006;Zuur, Ieno, Walker, Saveliev, & Smith, 2009). Individual moth ID and incubator were included as random factors and separate smoothers were fitted for each level of temperature.
Mixed-effects models have to be used cautiously when the number of levels of a random factor is low (see, e.g., http://glmm.wikidot. com/faq). In this study, there were five incubators, a sufficiently small number to sometimes cause problems during model fitting. These problems usually manifest as failure to converge, unrealistically large coefficient estimates or estimates of zero for the variance component associated with a random factor, and during the model fitting process, we were alert to these potential issues. Only the model fitted to the hemocyte count data indicated any of these issues, returning an estimated variance of zero for the random factor. This model also displayed some positive skew in the distribution of residuals, and a square-root transformation of the response variable corrected both of these problems.

| Life-history measures
Increasing temperature significantly shortens the development time from egg to pupation and from pupation to eclosion, with a quadratic model giving the best fit to the data in both cases (Figure 1, likelihood ratio tests on fitted models, egg-to-pupa time, temperature LR = 8.00, 1df, p = .005, temperature 2 LR = 6.95, 1df, p = .008; pupation to eclosion time temperature LR = 6.95, 1df, p = .008, temperature 2 LR = 4.31, 1df, p = .038, Sections 2.1 & 2.2 in Appendix S1). The significant quadratic terms arise because in both cases, the effect is felt more strongly at cooler temperatures, resulting in a curved relationship between temperature and development. Increasing temperature also had the effect of reducing body size, with the relationship between temperature and body size being steeper at cooler temperatures, once again requiring that a quadratic term be retained in the final model (Figure 2, likelihood ratio test, temperature LR = 11.87, 1df, p = .0006, temperature 2 LR = 10.70, 1df p = .0010, Section 3 in Appendix S1).
Turning to the data for adult survival, both the act of mating and increasing temperature significantly reduced adult longevity in female Plodia. Mating costs became more pronounced at higher The complex and divergent shapes relating oviposition rate to time at different temperatures made it necessary to analyze these data using a GAMM, which indicated significant temperature-based differences in egg-laying strategy (Figure 4). Marginal tests for the significance of individual smoothers all gave p-values <.05 (Section 5.2 in Appendix S1), indicating significant differences between the shape of the relationship between temperature and oviposition for each treatment group. Moths reared in the two coldest temperatures had lower rates of egg production, but either maintained this rate of production or even increased it as they aged. The associated increase in longevity meant that these moths tended to produce a consistent number of eggs for a long period of time. Moths in warmer environments tended to have very high rates of egg production early in their lives, but as they aged, their egg production per unit time fell to values similar to those seen in the animals maintained in cooler environments.
Interestingly, although there is a suggestion that lifetime reproductive success varies with temperature such that animals from intermediate temperatures have the highest reproductive output, this was not statistically significant (likelihood ratio test, temperature LR = 2.54, 1df, p = .11, temperature 2 LR = 2.46, p = .12, 1df, Section 5.1 in Appendix S1), indicating that different strategies produce similar outcomes in terms of overall fecundity.
PO activity also increased linearly with increasing temperature up to 24°C but leveled out across the warmer temperature treatments, leading to a final model with a quadratic term included (Figure 6, likelihood ratio test, temperature LR = 6.49, 1df, p = .011, temperature 2 LR = 5.884, 1df, p = .015, Section 6.2 in Appendix S1). There was also a significant effect of larval weight (likelihood ratio test, LR = 12.435, 1df, p = .0004), with heavier larvae exhibiting lower levels of PO activity. There was no significant effect of experimental block (χ 2 = 0.681, p = .409, 1df).
Regression analysis showed a significant positive correlation between hemocyte counts and PO activity (Figure 7, F 1,198 = 17.01, p < .0001), meaning that, while not explaining all the variation seen, larvae with more hemocytes also tended to have higher levels of PO activity.

| Bacterial clearance
The relationship between bacterial clearance and temperature was complex and best described by a model that included a cubic term ( Figure 8, likelihood ratio test, temperature LR = 9.44, p = .002, temperature 2 LR = 9.31, p = .002, temperature 3 LR = 9.18, p = .002, all on 1df, Section 6.3 in Appendix S1). Larvae reared at 22°C and 24°C were better able to clear a bacterial infection than those reared at either the coldest (20°C) or hottest (27°C and 30°C) temperatures. There was no significant effect of block or larval weight.

| Virus resistance
There was a significant interaction between the pre-and postinfection temperatures (Figure 9, likelihood ratio test, LR = 14.00, p = .0002, 1df, Section 6.4 in Appendix S1), indicating that the relationship between temperature and virus resistance depends on the temperature experienced prior to infection, with larvae reared at cooler temperatures less able to resist infection. Of particular interest, larvae continuously reared at 30°C showed a 35% decrease in PiGV infection compared to larvae that were reared at 30°C only after infection.

| DISCUSSION
All life-history and immune measures and disease resistance assays were strongly influenced by environmental temperature. Rates of growth and development responded in a manner consistent with both previous studies (Johnson, Wofford, & Whitehand, 1992) and the temperature-size rule (TSR, commonly used to describe the growth response of insects: Atkinson, 1994; but see also Angilletta & Dunham, 2003; Aguilar-Alberola & Mesquita-Joanes, 2014), with both measures accelerating linearly with increasing environmental temperature, resulting in individuals maturing faster but with a smaller body size (Atkinson & Sibly, 1997) and reduced survival time.
As temperature increased, mated females changed their egglaying strategy dramatically. Whereas low-temperature females produced low numbers of eggs early in their lives, either maintaining or even increasing oviposition rate as they became older, females kept at 24°C and above produced most of their eggs in the first few days of adult life. The cost of this rapid oviposition appears to be a particularly strong effect of mating on lifespan, as shown by the significant interaction between mating status and temperature ( Figure 1c); hightemperature females follow a "live fast, die young" strategy whereas low-temperature females reproduce at a more consistent rate and experience less of a reduction in lifespan.
Although females at warmer temperatures seem to be investing heavily in short-term reproduction, there is no indication that they are trading off resources for this against immunity. On the contrary, both F I G U R E 4 Number of eggs laid per 48 hr plus the fitted smoothers from the GAMM for each temperature. At 20°, the moths live for a long time and produce a few eggs every day. The moths at 22° have a similarly low oviposition rate but toward the end of their lives some of them increase the number of eggs laid (NB some of the 20° moths did this as well but some did not). Once the temperature reaches 24° and up oviposition is mostly early on in the animals' lives, with large numbers of eggs laid in the first few days Temperature (°C) PO activity (square root of maximum slope) of our measures of the immune response increased with temperature, although in different ways. Hemocyte counts increased linearly, but PO activity exhibited a curved relationship such that there was little increase in activity above 24°C. These two components of the immune system therefore have different thermal sensitivity profiles , and consequently, the thermal sensitivity of parasite resistance in Plodia is likely to vary depending on which specific components of the immune response are most important in determining resistance to a specific pathogen. This is consistent with our results from bacterial and viral challenge: Whereas the mortality from viral infection declined with increasing rearing temperature, bacterial clearance showed a complex relationship with temperature, with the fewest bacteria remaining in animals reared at 22 and 24°C, but relatively low numbers of bacteria at 30°C as well.
Phenoloxidase plays a role in many physiological functions, including those involved in development (Bai, Xie, Shen, Wei, & Wang, 2014). As such, despite controlling for larval instar and body mass, the variation in developmental rates between the temperature treatments may be associated with intrinsic changes in active PO levels that have nothing to do with immune function (Lu et al., 2014). Interestingly, we found that heavier larvae had lower levels of PO activity regardless of rearing temperature, suggesting an inherent trade-off between enzyme activity and growth and development. However, these data were recorded in unchallenged larvae. A positive correlation between PO activity and body size has been shown in vine moth larvae following a wounding challenge (Vogelweith, Thiéry, Moret, & Moreau, 2013), suggesting that larger individuals may have more resources to invest in immunity when a response is required.
Based on previous studies (Bauerfeind & Fischer, 2014;Murdock et al., 2012;Triggs & Knell, 2012), hemocyte density was expected to decrease at the higher temperature treatments. Instead, we saw numbers increase linearly with increasing temperature, something that has previously only been shown in Plodia when larvae are under additional environmental stressors (Triggs & Knell, 2012). This increase is unlikely to be due to dehydration effects, as we recorded no noticeable decrease in the total hemolymph volume available for collection from individuals raised at warmer temperatures. Higher temperatures might increase the rate of hemocyte production or multiplication or cause hemocytes to detach from tissue surfaces, so increasing the number in circulation (Pandey, Mishra, Kumar, Singh, & Prasad, 2010). Higher temperatures might also alter the relative abundance of cell types within the total hemocyte count (Pandey et al., 2010), with potential consequences for immune capacity.
Working on the assumption that higher levels of PO activity and hemocyte numbers correspond to increased immune capacity (Contreras-Garduño et al., 2007;Pauwels et al., 2010;Poyet et al., 2013;Prevost & Eslin, 1998;Reeson et al., 1998;Valadez-Lira et al., 2012) in Plodia, and that the potential immune response correlates with the realized immune response (Ferguson et al., 2016), we expected to see a decrease in bacterial populations with increasing temperature. We found no direct correlation between temperature and bacterial resistance, however, with larvae raised at 22-24°C being the most effective at clearing bacterial infections, despite these temperatures corresponding to the medium potential immune capacity in unchallenged larvae. One possible explanation for this is that bacterial clearance was assessed 24 hr after challenge, by which time the induced immune system should also be activated (Haine, Moret, Siva-Jothy, & Rolff, 2008) and production of antimicrobial peptides upregulated. These components of the induced immune system could trade-off with constitutive measures (Cotter, Kruuk, & Wilson, 2004;Cotter et al., 2008) or have very different thermal sensitivities to the innate components that we measured (Muturi, 2013;Muturi, Nyakeriga, & Blackshear, 2012), resulting in a reduction in the effectiveness of larval resistance. The impact of temperature on pathogen population dynamics is also likely to be important in determining the thermal sensitivity of infection. E. coli is usually cultured at 37°C in the laboratory, and growth rate should increase linearly with temperature within the range tested here (Ratkowsky et al., 1982). Faster rates of bacterial growth at the higher temperatures may therefore overwhelm the host immune response, resulting in a degree of unchecked bacterial proliferation.
Resistance to orally transmitted granulosis virus infection begins with a suite of protective mechanisms in the gut (Saejeng, Siva-Jothy, & Boots, 2011). Once PiGV has breached gut defenses, however, hemocytes play an important role in removing virus particles from the hemocoel (Begon et al., 1993), and consequently, hemocyte abundance may positively correlate with PiGV resistance. Conversely, there is no evidence that PO activity plays a role in resistance to PiGV infections in Plodia (Saejeng, Tidbury, Siva-Jothy, & Boots, 2010).
Temperature effects on hemocyte densities in third-instar larvae were not measured, but a linear increase with temperature similar to that seen in fifth-instar larvae would equip hosts with a greater potential to phagocytose virus particles at higher temperatures (Begon et al., 1993), consistent with the increase in virus resistance in larvae kept at higher temperatures prior to infection.
In contrast to the larvae that were maintained at a constant temperature throughout the experiment, we saw no effect of postinfection temperature on virus resistance in those larvae kept at 26°C prior to infection. This could indicate that the changes in immune response leading to higher virus resistance only develop when an animal has experienced a particular temperature for several days. Alternatively, the increased rate of larval development associated with higher preinfection temperatures may lead to physiological changes such as faster rates of food passage through the gut (Yang & Joern, 1994) or increased rates of gut cell sloughing (Cory & Myers, 2003), both of which could prevent the establishment of a viral infection. In this case, postinfection temperature might have very little impact on viral population dynamics as the trajectory of the infection has already been established.
Overall, our results show that the effects of temperature change on life history and on disease resistance are complex and, in the case of disease resistance, pathogen-specific (Adamo & Lovett, 2011).
Difficulties in predicting outcomes lie not only in the need to understand the direct impact of temperature on individual components, but to also review the system as a whole, taking into account the dynamic nature of the selective pressures acting on life-history trade-offs across time (Alto & Bettinardi, 2013;Blanford, Thomas, Pugh, & Pell, 2003;Holland & Bourke, 2015;Laughton, Boots, & Siva-Jothy, 2011).
For example, higher temperatures may increase voltinism, potentially enabling host populations to rapidly adapt to thermal changes and infecting pathogens (Overgaard & Sørensen, 2008), but this may be tempered by reduced survival under temperature stress.
As a key component of terrestrial ecosystems, the sensitivity of insects to temperature likely has massive consequences for future ecosystem functioning. The potential alterations to the ecology of global pests such as Plodia by climate change effects are of major ecological and commercial importance. Likewise, the potential alterations to insect host-pathogen relationships have important implications for public health, biopesticide development, and conservation. Given the capacity for temperature to drive host-pathogen population dynamics and disease resistance, in-depth consideration of these complex interactions is necessary to successfully predict ecological outcomes.

ACKNOWLEDGMENTS
The research was funded by NERC, Grant No. NE/J023787/1. We also thank Nina Wedell for providing some of the moths used to form our outbred stock line, Jim Sullivan for providing the E. coli, and Mike Boots for initial PiGV stock. We would also like to thank two anonymous reviewers for comments on a previous version.

CONFLICT OF INTEREST
None declared.

DATA ACCESSIBILITY
Data files have been included with this submission to be published as supporting information.

AUTHOR CONTRIBUTIONS
AL and RK conceived the ideas and designed the methodology; AL and CO collected the data; AL and RK analyzed the data; AL and RK led the writing of the manuscript. All authors contributed critically to the drafts and gave final approval for publication.