Introduction

Owing to its contribution to fitness and ease with which it can be measured, melanism in insects is an excellent model trait for the study of the interactions between physiological, morphological and life-history components (True, 2003). As a consequence, melanism and its links with immune defense and other fitness-related traits have been studied in insect evolutionary ecology for decades (reviewed in True (2003). Besides phenotypic associations, interest has focused on the potential genetic correlations, caused by pleiotropic effects of genes, between melanism and other traits (True, 2003). Such genetic correlations could constrain the evolution of fitness-related traits in insects.

Melanin is a pigment molecule associated with important fitness components in insects, including body size, development time (Cotter et al., 2004), cuticle strength (Wilson et al., 2001), protection against ultraviolet radiation (Nappi and Vass, 1993) and immunity (Rantala et al., 2000, Wilson et al., 2001). Melanin has a dual role in insect pathogen resistance: first, it acts as physicochemical barrier in the cuticle, efficiently blocking the invasion of pathogens, and second, it is deposited around intruders that have entered the insect’s body to prevent their movement (Gillespie et al., 1997, Barnes and Siva-Jothy, 2000, Rolff et al., 2005).

Melanin production in insects requires a balancing between the benefits it brings about to parasite resistance and the costs and negative consequences to the host. The early steps of melanin production are regulated by phenoloxidase enzyme (PO; Nappi and Vass, 1993, Cerenius and Söderhäll, 2004). Activation of PO also leads to the production of highly toxic quinone intermediates that are efficient in defense against pathogens, but that also have deleterious consequences for the insect if produced in excess (Cerenius and Söderhäll, 2004). An essential substrate for PO, tyrosine, is a derivative of amino-acid phenylalanine that must be acquired from food, and is therefore a potential limiting factor for the use of PO (Siva-Jothy, 2000). Likewise, cuticle melanization is resource demanding for insects, as suggested, for example, by the observation that Spodoptera littoralis caterpillars fed on a low-quality diet had less melanized cuticles than caterpillars grown on a high-quality protein diet (Lee et al., 2008).

Encapsulation ability, the ability of the insect to form a capsule around foreign particles, such as parasites entering its body, is a central feature of the invertebrate immune response (Gillespie et al., 1997, Rantala et al., 2000, Smilanich et al., 2009, Mikkola and Rantala, 2010). When a parasite that is too large to be phagocytosed enters an insect’s body, it is encapsulated with hemocytes and a melanin coat to suffocate it, while simultaneously toxic molecules are produced to kill it (Gillespie et al., 1997, Nappi and Ottaviani, 2000). The activation of the encapsulation response is costly as it decreases the longevity of the individual, even when resources are not limiting (Armitage et al., 2003).

The degree of melanization of the insect cuticle is predicted to be positively correlated with the strength of immune defense (Rantala et al., 2000, Wilson et al., 2001), a hypothesis supported by a number of studies. For example, a positive correlation has been found between hemocyte density and cuticular melanization in S. littoralis (Cotter et al., 2004). Although Barnes and Siva-Jothy (2000) did not find a significant correlation between cuticular melanization and PO activity in Tenebrio molitor, they did observe that resistance to entomopathogenic fungus Metarhizium anisopliae was positively correlated with cuticular melanization. Armitage and Siva-Jothy (2005) found in T. molitor that selection for cuticular melanism led to a higher PO activity and hemocyte density in hemolymph in selection lines of black beetles compared with tan lines. In Lymantria monacha, a classic example of industrial melanism, the encapsulation response is positively correlated with wing melanization (Mikkola and Rantala, 2010) and immune-challenged white butterflies, Pieris brassicae, developed bigger wing spots than unchallenged individuals (Freitak et al., 2005).

On the basis of previous studies it seems that the associations between PO activity and cuticle melanism are more complex than that between melanism and encapsulation ability, which is probably because of PO being associated with several different functions of immune defense and cuticle hardening (Bailey, 2011). Accordingly, Rolff et al. (2005) found in T. molitor a negative genetic correlation between cuticle melanism and PO activity in females, and between cuticle melanism and hemocyte density in both sexes. Nevertheless, encapsulation ability was positively phenotypically correlated to cuticle melanism in juvenile Mormon crickets (Bailey, 2011). Thus, the degree of melanism in the cuticle or in the wing spots of insects may signal the effectiveness of components of the insect’s immune system. The association between parasite resistance and color may be employed in female choice for mates if darker cuticles and wing spots are a signal of good parasite resistance of males, and if the resistance is heritable, or in male–male competition if the degree of melanization is linked to the condition of the male (Barnes and Siva-Jothy, 2000).

Bateman’s principle predicts females will invest more into their immune defense than males, because whereas males gain fitness by increasing their mating success females increase their fitness through increased longevity (Rolff, 2002). Previous studies have both contradicted and supported this prediction in different insect species (Cordoba-Aguilar et al., 2006, Rantala and Roff, 2007), but in T. molitor, males have been shown to have higher mortality due to a fungal infection than females (Valtonen et al., 2010).

A common feature of many traits is that they have varying responses to different environmental conditions, a phenomenon known as phenotypic plasticity (for example, see Table 6.1 in Roff, 1997). In ectotherms, especially, temperature can have profound effects on both life-history and immunological traits, as, for example, in the case of development time, which is a critical fitness component and is strongly determined by temperature (for example, Roff, 1992, Lazzaro et al., 2008, Rhyne et al., 2009). Likewise, the effects of temperature on host–parasite relationships are affected by the thermal sensitivity of both the host and the parasite. The increased enzymatic rates resulting from a rise in temperature are generally expected to increase the rates of metabolism and growth, as well as reproductive output and immune defense (Thomas and Blanford, 2003, Angilletta et al., 2010).

Phenotypic plasticity can be described from two perspectives, the reaction norm and the character state approaches. The latter approach is the one taken in the present analysis and describes the genetic variation between two environments by the genetic correlation between these environments (Roff, 1997). Correlations different from ±1 indicate that a superior genotype in one environment may be inferior in another. Such correlations also indicate that responses in one environment may modulate responses in the other environment, but will not constrain selection from driving trait values to their local optima, at least in a two-trait system. With multiple traits the situation becomes more complex and the relevant indicator of evolutionary constraint is whether the genetic variance–covariance matrix is singular. Statistical demonstration of singularity in this matrix is difficult (Roff et al., 2012), and in the present analysis we restrict ourselves to pairwise analysis of traits for which statistical demonstration of a genetic correlation different from ±1 is more easily achieved. Demonstration that this is the case is putative evidence for independent evolution in the two environments, indicating the presence of genotype-by-environment interaction. Genotype-by-environment interaction reduces the connection between a specific phenotype and genotype at the population level, and can thus constrain the evolution of traits in a variable environment.

In the present study, the effects of temperature on insect melanism and its relationship to immune defense and life-history traits were studied in the mealworm beetle, T. molitor. The main questions addressed were:

  1. 1)

    Are encapsulation response and cuticle melanism genetically or phenotypically correlated? On the basis of previous insect studies a positive phenotypic correlation is predicted.

  2. 2)

    How do sex and temperature affect the phenotypic and genetic interrelationship within the suite of four traits?

Materials and methods

Rearing of beetles

The mealworm beetle is a cosmopolitan pest of grain that is often used as a model species in immunoecological studies. The beetles used in this study were taken from a laboratory stock population established originally from 500 individuals collected from the countryside in Latvia. In total, 80 mealworm beetles—60 females and 20 males—were collected as pupae from the stock population, and raised to adulthood separately in plastic canisters. All males were mated with three different females (A, B and C) and the females were allowed to lay eggs for 4 days, after which they were removed from the container and the eggs were left to develop at 28 °C.

About 1 month after egg-laying, 50 larvae from each family were placed in individual 50 ml plastic canisters and fed ad libitum with wheat bran. Each larva was marked with its family code (sire number 1–20 plus female code A, B or C). Larvae of each family were divided randomly into three groups of the same size. Groups were grown in temperatures of 18, 23 and 28 °C under a 14:10 light/dark period. Each larva was given a piece of fresh apple once a week, for moisture, starting about 1 month after formation of the groups. Dry pieces of apple were regularly removed from the canisters. After pupation of the larvae, the wheat bran was removed and the pupae were sexed. Pupae were checked daily to determine the emergence day for each adult beetle. The emerged beetles were given a piece of fresh apple three times a week. Some beetles had emerged unnoticed in the layer of the bran, so the exact development time could not be calculated for those individuals. At the age of 10–14 days, the beetle canisters were marked individually and the beetles’ encapsulation ability was measured, after which they were frozen at −20 °C.

Encapsulation ability, cuticle melanism and elytra length

Encapsulation response

A standard method for initiating and measuring immune responses in insects is by inserting a small artificial object into the body of the insect, and then quantifying the degree of melanization on the object after a set time (Rantala et al., 2000). The ability of insects to encapsulate artificial objects is correlated with their ability to encapsulate parasites (Smilanich et al., 2009) and resist fungal pathogens (Rantala and Roff, 2007). Hence, it provides an index of the strength of an individual’s ability to resist living parasites. In this study, the encapsulation ability of the beetles was measured with a nylon monofilament. On average, 10 (s.e.=0.2) individuals were measured from each family (n=59) and temperature. A total of 1655 offspring were measured, giving an average of 276 (s.e.=8.2) animals per sex/temperature combination. Owing to differences in female fertility, from some families only a few and from some over 10 individuals were used. A 2-mm long (diameter 0.18 mm) nylon implant was inserted through a puncture on the second sternite in the pleural membrane of the beetle. Before inserting the implant, the surface of the implant was roughened with sandpaper to enhance the sticking of hemocytes to the implant, after which the unused implants were stored in 99% ethanol until measurement. The beetle’s immune system was allowed to react for 3h during which time the beetle was kept in an individual canister at its rearing temperature. This reaction time allowed the encapsulation response to proceed while maintaining individual differences in response (Rantala et al., 2002). The encapsulated implant was then removed and frozen at −20 °C.

The implants were photographed under an Olympus SZ-CTV microscope with DeltaPix Invenio 3S 3M Pixel CMOS camera (DeltaPix, Maalov, Denmark) from two different angles. The average light absorbance value for an implant was measured with the ImageJ program (ImageJ 1.38x, Wayne Rasband, National Institues of Health, USA, http://rsb.info.nih.gov/ij/). Average encapsulation response was calculated as the mean of the values from the two different pictures. A standardized encapsulation value was obtained by subtracting the average encapsulation value from the light absorbance value of a clear implant. The bigger the standardized encapsulation value, the stronger is the beetle’s encapsulation response. The repeatability of this method is very high (r=0.997) (Rantala et al., 2002).

Cuticle melanism

The cuticular darkness in beetles is a result of two processes: melanization and sclerotization (Sugumaran, 1991), and was measured with the same method as the encapsulation. Adult beetles were placed under the microscope, individually, dorsal side up and photographed. The melanization of the cuticle was measured as the light reflecting value of the beetle’s thorax with the ImageJ program. The acquired values were transformed to negative values so that the values would represent the biological scale: the higher the cuticle value, the darker the beetle’s cuticle. This method provides a measure of the cuticle’s darkness and a similar method was used for T. molitor by Rolff et al. (2005), the main difference to our study being that we did not use a lightproof box in the measurements, but the light conditions were kept identical between measurements.

Elytra length

The photographs used for the cuticular darkness assay were also used to measure elytra length. Pixel values were transformed to millimeters with a formula obtained by measuring six individuals manually.

Statistical methods

Temperature and sex

We tested for variation associated with temperature and sex with a multivariate analysis of variance, followed by individual analysis of variances and analysis of residuals to ascertain normality using the statistical package R (freeware, available at http://www.r-project.org/). In only one case, development time, was deviation from normality a potential problem, which was resolved with a log transformation. The statistical conclusions using either the transformed or non-transformed data were the same, and we report here the results using the untransformed development time data.

Path analysis

Path analysis provides a method of assessing hypothesized causal relationships among variables. On the basis of the ontogeny of development and results from other insects (True, 2003), we hypothesize that (i) sex, development time and body size directly influence color and encapsulation ability, (ii) adult size is determined by sex and development time whereas development time is determined by sex and (iii) color determines encapsulation response, with the hypothesis that increasing melanization of the cuticle leads to increased encapsulation response. Unfortunately the path model so specified (model A, Figure 1) is over-determined and there are zero degrees of freedom; therefore, we considered three reduced models. In model B, we deleted the direct causal path between size and encapsulation, whereas in model C we deleted the direct causal path between development time and encapsulation. Finally, in model D we deleted both of these direct causal pathways. Although the direct relationships between the traits can be studied in a statistical sense, it must be noted that the path coefficients do not necessarily reflect the biochemical relationships between them. As it is not a priori clear how temperature might affect these relationships we applied a group analysis, applying the model separately for each temperature treatment.

Figure 1
figure 1

Set of possible causal pathways between cuticle darkness (Color), encapsulation ability (Encap), sex, elytra length (Size) and development time (Dtime) in T. molitor. Model A is not permitted because there remains no degrees of freedom with which to test the model.

Analysis of the path models was done using the software package AMOS (IBM, Armonk, NY, USA), with parameters estimated by maximum likelihood. Sex was incorporated into the model by coding females as 0 and males as 1. In structural equation modeling discrete variables are treated as having an underlying normal distribution, with thresholds corresponding to state boundaries. With just two states and equal proportions as in the present case, the use of 0, 1 is equivalent to this transformation. Fit of the path model was determined by χ2, adequacy of fit being demonstrated by a non-significant value of χ2 (Tabachnick and Fidell, 2001).

Genetic analyses

Genetic parameters were estimated using the ‘animal’ model with restricted maximum likelihood, as implemented by ASReml (VSN International, Hertfordshire, UK). Using the animal model has the advantage of testing for maternal and/or non-additive effects (Roff, 2008) and estimating genetic correlations between discrete states such as sex and temperature (Wilson et al., 2010, see also the WAMWiki site at http://www.wildanimalmodels.org/tiki-index.php). Genetic correlations significantly different from +1 indicate that separate optima are possible in the two ‘environments’ (that is, separate sexes or temperatures). No significant dam effects were found, and hence we used the genotypic estimates for both heritabilities and genetic correlations (Becker, 1992). With the half-sib design used in the present paper maternal and non-additive effects cannot be separated, but are jointly tested for in the animal model by incorporating the dam identity as a random variable and comparing this model with that lacking this term using a log-likelihood ratio test. Similarly, differences between sexes and temperatures were tested using the log-likelihood ratio test. All traits were standardized to a mean of zero and a standard deviation of one before analysis.

Results

Only individuals for which data on all variables were available were retained for analysis, giving a total sample size of 1511 animals.

Effect of temperature and sex on melanism, encapsulation response, size and development time

The multivariate analysis of variance indicated a marginally non-significant temperature by sex effect (F4,1504=2.242, P=0.062) but highly significant additive effects of both temperature (F4,1504=2948.58, P<0.0001) and sex (F4,1504=26.96, P<0.0001). There was a highly significant effect of temperature on all traits and a significant additive effect of sex or sex-by-temperature interaction on all traits except encapsulation response (Table 1, Figure 2).

Table 1 Individual analysis of variance testing for effects of temperature and sex on elytra length (size), development time (Dtime), encapsulation ability and cuticle color
Figure 2
figure 2

(ad) Means±s.e. of T. molitor encapsulation response, cuticle darkness, development time and elytra length in all sex-by-temperature combinations.

Path model

Only path model B fitted the data (model B overall χ2=6.3, df=3, P=0.0098: model C overall χ2=24.1, P<0.0005; model D overall χ2=30.7, P<0.0005). Individual path coefficients were not significant at all temperatures, but generally were the same sign across temperatures (Figure 3). Development time had a significant positive effect on size only at the highest temperature, and only in that temperature did sex significantly determine development time. Encapsulation rate was strongly negatively related to sex (that is, females had a higher response) and the path coefficients at all three temperatures were very similar (−0.13, −0.15, −0.15), supporting the lack of an interaction found in the analysis of variance. The presence of a significant effect of sex on encapsulation ability in the path model but the lack of a significant additive effect in the analysis of variance (Table 1) can be attributed to an interaction of other factors in determining the covariance between sex and encapsulation ability. Encapsulation response was positively related to development time at the two lowest temperatures. Cuticular color was also strongly negatively influenced by sex with females having significantly darker cuticles than males at all temperatures. Color was negatively associated with development time, but positively associated with size when the sexes were not analyzed separately.

Figure 3
figure 3

Path diagrams for the best fitting model between cuticle darkness (Color), encapsulation ability (Encap), sex, elytra length (Size) and development time (Dtime) in T. molitor. From top to bottom 18, 23 and 28 °C. Type of line shows statistical significance of standardized path coefficients: dashed: P>0.05; solid, thin to thick: 0.05>P>0.01, 0.01>P>0.001, P<0.001.

Heritabilities and genetic correlations between traits

Heritabilities were estimated separately for all sex-by-temperature combinations (Table 2). Heritability estimates averaged 0.53 (s.e.=0.06) and 88% (21) of them exceeded 0.2. The sign of the phenotypic and genetic correlations was generally the same and matched those of the path coefficients. Further, the genetic correlations were highly correlated with the path coefficients and approximately twice their value (Y=0.011+1.937X, where Y=path coefficient and X=genetic correlation, r=0.81, P<0.0001, Figure 4). Finally, the phenotypic correlations were virtually identical to the path coefficients (Y=0.004+1.002X, where Y=path coefficient and X=phenotypic correlation, r=0.97, P<0.0001, Figure 4). This last result indicates that the effect of sex on the traits was primarily additive (that is, males and females differed by a constant amount), and that there were few indirect effects (for example, the correlation between two traits was because of the direct path between the traits).

Table 2 Heritabilities (s.e.) of cuticle color, encapsulation ability, elytra length (size) and development time (Dtime)
Figure 4
figure 4

Regression of correlations on path coefficients.

Cuticle color was genetically positively correlated with the encapsulation ability and body size in most sex-by-temperature combinations, but negatively genetically correlated with development time (Table 3). Overall, the genetic correlations between color and the other traits varied between −1 and +1 depending on the trait, sex and temperature (Table 3).

Table 3 Genetic correlations (s.e.) between color and the other traits

Genetic correlations between the sexes and temperatures

With the exception of color at 23 °C, genetic correlations between sexes, within temperatures, were overall large (>0.6, Table 4). In three cases the correlation was significantly different from 1. Similarly, genetic correlations estimated between temperatures were generally large (>0.45, Table 5). All correlations for development time were significantly <1.

Table 4 Genetic correlations between the sexes
Table 5 Genetic correlations (s.e.) between temperatures

Discussion

The relationship between encapsulation response and cuticle color

One of the main goals of this study was to determine the relationship between cuticle melanism and a central immune defense trait, encapsulation ability, and to examine how temperature shapes this relationship. This focus was selected on the basis of the hypothesis that melanism and immune defense are positively correlated (Wilson et al., 2001, Mikkola and Rantala, 2010). However, previous studies were conducted using single environmental conditions, and therefore it was unclear how changes in environmental variables, such as temperature, would affect this relationship.

It is important to note that the immune defense of invertebrates is complex and negative correlations can be found between different areas of pathogen resistance (Cotter et al., 2004), and thus encapsulation response should not be taken as an overall index of immunity. Our study demonstrates a positive but weak, and temperature-dependent, phenotypic correlation between the encapsulation response and cuticle melanism, as the relationship was positive at 18 °C but was weakened to insignificance by an increase in temperature from 23 to 28 °C, as measured by the path coefficients. In addition, the responses of melanization and encapsulation ability were opposite to each other, as cuticle darkness was increased whereas encapsulation ability was decreased with a rise in temperature, which suggests that the traits are more affected by interactions with other traits than each other. Based on our path model (Figure 3), the encapsulation response was more strongly affected by development time than cuticle melanism, whereas cuticle melanism was strongly affected by body size.

Both color and encapsulation ability had large heritabilities and were generally similarly correlated between temperatures. Interestingly, the genetic correlations between the traits were negative, positive or zero, depending on sex and temperature (Table 3). Defining causes behind this would require further studies on the genetic basis of these traits, as both negative and positive genetic correlations can be caused by pleiotropic effects of genes or linkage disequilibrium between loci affecting the traits (Lynch and Walsh, 1998). To conclude, our results suggest it is not likely that cuticle darkness would be used as an indicator of male and female immunocompetence in mate choice across different environmental conditions in the mealworm beetle.

Effects of temperature on immune and life-history traits

Previous studies both from evolutionary ecology and biological pest control have, in general, shown that even a modest rise in temperature makes the hosts more resistant to infections by microbes and parasites (Thomas and Blanford, 2003, Adamo and Lovett, 2011), although the response is not necessarily linear, highlighting the significance of measurements done in a range of temperatures (Murdock et al., 2012). In our study, the encapsulation responses of beetles reared at 18 °C were the highest, and the encapsulation ability was the lowest at the highest temperature. Similar findings were made by Triggs and Knell (2012) who found that the hemocyte count of Indian meal moth Plodia interpunctella was low at high temperatures or unaffected by temperature when food quality was good. We did not measure nutritional effects on immune defense, but it is likely that the effects of environmental variables are dependent on each other (Triggs and Knell, 2012). It has also been shown that maintaining an effective immune system is costly (for example, Valtonen et al., 2010), and that with higher temperatures trade-offs may emerge between immune function and reproduction (Adamo and Lovett, 2011). It is therefore possible that the cost of maintaining a strong immune system varies between temperatures, which might explain why at the higher temperature the encapsulation response was weaker than that at the lower temperatures.

The influence of temperature on the development times of beetles was especially strong. Therefore, the fitness benefits of fast development may be confounded by costs or trade-offs between other traits at low temperatures. Our results suggest that such cost could be imposed by cuticle melanization, as the genetic correlation between development time and cuticle color was negative in three out of six groups (Table 3). This is partly consistent with previous findings in the Egyptian cotton leafworm, where larval cuticle melanization was negatively genetically correlated with pupal development time, but positively genetically correlated with larval development time (Cotter et al., 2004). Importantly, in our study both phenotypic and genetic correlations between development time and cuticle darkness were negative only at 18 and 23 °C, showing that this trade-off can be offset by favorable environmental conditions, such as warm temperatures.

Body size measured as elytra length had a curved response to the temperature change, the beetles reared at 23 °C being the smallest. The response was similar in body mass (data not shown). The cause of this can be increased resource investment into a trait we did not measure. Interestingly, development time had a significant effect on body size only at 28 °C (Figure 3), which demonstrates that the relationship between some of the most central life-history traits is temperature dependent.

Sexual dimorphism in immune and life-history traits

In this study distinct patterns were found in the effect of sex on the four traits, with the path coefficients increasing, decreasing or showing little change with temperature, which indicate a divergence between the sexes in the former two categories with increasing temperature. Studies in insects testing sexual dimorphism in immune defense have resulted in mixed findings (for example, Cordoba-Aguilar et al., 2006, Rantala and Roff, 2007). It has been found that there is sex difference in response to genetic (Rantala and Roff, 2007) and nutritional stress (McKean and Nunney, 2005; Ruuhola et al., 2007) that may cause between population and species variation in sex difference in immunity. In the present case, encapsulation ability was highest in females and the gender difference showed a modest or no change with temperature. This increased encapsulation ability in females corresponded to increased cuticle melanization compared with males, as initially hypothesized. In addition, the genetic correlation of encapsulation ability between sexes was <1 at 28 °C, which is consistent with the sex difference observed with the path model. Thus, there is potential for a sex difference in trait evolution at high temperatures.

For cuticle color we found that the genetic correlation between sexes may be <1, as the estimated correlation was close to zero at 23 °C. Consistent sex difference observed at the phenotypic level also suggests that cuticle color is partly determined by sex-specific genes. Thus, based on our results independent evolution in the cuticle melanism of females and males in response to differences in temperature regime is possible. This is in contrast to the findings of Rolff et al. (2005) who found the genetic correlation of cuticle darkness between sexes to be not significantly different from one.

In our study, males emerged 2 days later than females at 23 and 28 °C, but slightly earlier at 18 °C, and the genetic correlation of development time between sexes was <1 at 23 °C. Sex differences in insect development time have previously been linked to insect reproductive strategy the (for example, Zonneveld, 1996). Temperature may influence insect optimal reproductive strategy, for instance by affecting egg maturation (Berger et al., 2008). A change in reproductive strategy could cause the trait optima of life-history traits to shift in response to temperature, and could potentially be the ultimate mechanism behind the traits’ high sensitivity to temperature change. More insight into the relationship of temperature and insect reproductive strategy could be gained for instance by measuring egg production of females and mating frequency of males at different temperatures.

Heritabilities and genotype-by-environment interactions

Heritability of development time was extremely high at 18 °C and decreased on average about 30% as temperature changed to 28 °C (Table 2). This means that, in practice, most of the phenotypic variation observed in development time was explained by additive genetic variation at the coldest temperature, while about 70% of the variation was explained by additive genetic variation at the warmest temperature. The genetic correlations of development time between temperatures were all significantly <1, which demonstrates the presence of G × E, suggesting that different genotypes may be favored in different environments. On the basis of our results, the evolution of development time in one temperature regime would, however, not be completely independent of selection in another temperature regime, as the genetic correlations were greater than zero. As the genetic correlations of all the other traits between temperatures were not different from +1, we did not find significant statistical evidence of G × E for any of the other traits than development time.

The heritabilities of encapsulation ability were the lowest of the studied traits (Table 2). Bateman’s principle predicts the selective advantages of an efficient immune response to be higher for females than males (Rolff, 2002), which could affect the heritability of immune response traits. We found a clear sex difference in the heritability of encapsulation response between sexes, but the difference was not consistent across the temperature range (Table 2), which can be because of temperature-dependent changes in the reproductive strategy of the mealworm beetles.

The heritability of cuticle melanization in our study was of similar magnitude to that observed by Cotter et al. (2004) in S. littoralis. Interestingly, Rolff et al. (2005) found significantly higher heritabilities for cuticle darkness in mealworm beetles grown at 26 °C than we did at any of the studied temperatures. The rearing method of beetles could explain some of the difference between the results, as in our study all beetles were grown in separate canisters, whereas Rolff et al. (2005) maintained beetles at low densities, but several individuals in the same container, which may affect their investment in immune-defense traits.

Conclusions

Our study has demonstrated temperature-dependent correlations between sexes in a suite of life-history and immune defense traits, and that even a 5 °C shift in temperature can make the genetic correlation between sexes change from zero to one. In contrast to Rolff et al. (2005) we did not find significant differences between sexes for genetic correlations between traits, suggesting that there are no sex differences in the quantitative genetic architecture of the traits in our population. The genetic correlations between temperatures showed that there are genotype-by-environment interactions in the development times of mealworm beetles across temperatures that they can encounter in their natural habitats. Moreover, on the basis of the temperature-dependent sex differences in development time and heritability of encapsulation ability, we suggest that insect reproductive strategy can be influenced by temperature, which needs to be studied more deeply.

Melanin is expected to have numerous pleiotropic effects on other traits (True, 2003). This hypothesis is strongly supported by the present analysis, which shows such effects related to sex, encapsulation response, development time and body size. These effects demonstrate that the production of melanin has costs on physiological responses, morphology and life-history traits, especially the development time. Given the strength of the relationships between melanism and other fitness-related traits and the relative ease with which color can be measured, the evolution of melanization of the insect cuticle represents an extremely useful model in which to explore the interaction of multiple systems at both the phenotypic and genetic level.

Overall, the complexity of the temperature-related effects in fitness-related traits shows that predicting changes at the population level in response to for instance climate warming is very difficult, and requires unraveling the genetic and physiological basis of these traits.

Data archiving

Data deposited in the Dryad repository: doi:10.5061/dryad.bn00s.