# Epigenetic memories and the evolution of infectious diseases

David V. Mcleod, Geoff Wild, Francisco Úbeda

► To cite this version:

David V. Mcleod, Geoff Wild, Francisco Úbeda. Epigenetic memories and the evolution of infectious diseases. Nature Communications, 2021, 12 (1), pp.4273. 10.1038/s41467-021-24580-0. hal-04960304

HAL Id: hal-04960304

https://cnrs.hal.science/hal-04960304v1

Submitted on 11 Mar 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

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

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

ARTICLE

https://doi.org/10.1038/s41467-021-24580-0

OPEN

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

Check for updates

# Epigenetic memories and the evolution of infectious diseases

David V. McLeod<fnref n="1" />,², Geoff Wild³ & Francisco Úbeda<fnref n="1" />,⁴✉

Genes with identical DNA sequence may show differential expression because of epigenetic marks. Where epigenetic marks respond to past conditions, they represent a form of “memory”. Despite their medical relevance, the impact of memories on the evolution of infectious diseases has rarely been considered. Here we explore the evolution of virulence in pathogens that carry memories of the sex of their previous host. We show that this form of memory provides information about the sex of present and future hosts when the sexes differ in their pathogen’s transmission pattern. Memories of past hosts enable the evolution of greater virulence in infections originating from one sex and infections transmitted across sexes. Thus, our results account for patterns of virulence that have, to date, defied medical explanation. In particular, it has been observed that girls infected by boys (or boys infected by girls) are more likely to die from measles, chickenpox and polio than girls infected by girls (or boys infected by boys). We also evaluate epigenetic therapies that tamper with the memories of infecting pathogens. More broadly, our findings imply that pathogens can be selected to carry memories of past environments other than sex. This identifies new directions in personalised medicine.

<footnote n="1">¹Centre D'Ecologie Fonctionnelle & Evolutive, CNRS, Montpellier, France. ²Institute of Integrative Biology, ETH Zürich, Zürich, Switzerland. ³Department of Applied Mathematics, The University of Western Ontario, London, ON, Canada. ⁴Department of Biology, Royal Holloway University of London, Egham, Surrey, UK. ✉email: f.ubeda@rhul.ac.uk</footnote>
In general, the term ‘epigenetics’ refers to the molecular mechanisms underlying the differential expression of genes with identical DNA sequences in response to environmental factors—for example, diet, stress, parental origin—thus resulting in different phenotypes (gene ‘plasticity’)¹,². Environmental factors leave marks that do not change the DNA sequence of the gene, for example, DNA methylation or histone modification¹⁻³. Some of these ‘epigenetic marks’ are maintained during the lifetime of an individual (henceforth ‘epigenetically acquired’ marks) but they are not inherited from one generation to the next (Fig. 1a.iii). Other marks, however, are inherited across generations (henceforth ‘epigenetically inherited’ marks)¹,² (Fig. 1a.i-ii). There is abundant evidence of epigenetic inheritance in plants and mammals²,⁴. In plants, for example, the exposure of flax (Linum usitatissimum) to demethylating agents results in early flowering, a phenotype that continues to be observed in later generations when these agents are absent⁵. In mammals, the exposure of mice (Mus musculus) to early-life stress (maternal separation) results in depression, a phenotype that continues to be observed in descendants that were not separated from their mothers⁶,⁷. Epigenetic inheritance thus opens up the fascinating possibility that genes have ‘memories’ of past environmental conditions that, in turn, affect their expression even after conditions have changed.

Due to its medical and developmental implications, epigenetic inheritance has received a lot of attention that has advanced our knowledge of phenomena like cancer and foetal growth⁸,⁹. Despite the abundant attention that epigenetic inheritance has received, to our knowledge memories have not been considered when studying the epidemiology and evolution of infectious diseases. This oversight is not justified from a scientific-interest perspective: epigenetic inheritance has the potential to affect a wide array of pathogen phenotypes. The oversight is also not justified from a medical perspective: if we better understand the forces that act to shape pathogens, then we can possibly devise better strategies to treat the infections they create. Finally, the oversight is not justified from an empirical perspective: there is abundant evidence of epigenetic marks established through exposure to environmental conditions that regulate the expression of genes underpinning virulence or transmission¹,³,¹⁰⁻¹⁸. Furthermore, some of these epigenetic marks are inherited across multiple generations of the pathogen, e.g., marks carried by the EBV virus, *Salmonella enterica*, *Candida albicans* and *Plasmodium falciparum*¹,³,¹¹,¹⁸. In the case of *P. falciparum*, exposure to the antibiotic blasticidin, leads this pathogen to epigenetically adjust the expression profile of its var-family genes to avoid the action of the antibiotic itself; these epigenetic marks are transmitted to multiple generations of pathogens after the antibiotic has disappeared¹⁰,¹⁹. Here we work towards filling this gap by considering epigenetic memories in the evolution of infectious pathogens.

We advance theory by studying the evolution of virulence in pathogens that can remember the sex of the host from which they came (henceforth, ‘origin-specific virulence’) (Fig. 2a). We outline conditions under which natural selection favours pathogens that retain the memory of the sex of the host they originated from over those that do not. Furthermore, we make testable predictions about the greater virulence of pathogens inherited from one sex as opposed to the other. In addition, we investigate when pathogens that can condition their virulence on the sex of their previous host will be selected to add information regarding the sex of their current host (henceforth, ‘origin-&-sex-specific virulence’) (Fig. 2b). We make explicit predictions about the greater virulence of pathogens originating from and infecting the same sex, as opposed to originating from and infecting the opposite sex. By providing testable predictions we aim to motivate experimental work that test epigenetic memories in pathogens.

While there is abundant evidence that pathogens can retain memories of past environments¹,³,¹¹,¹⁸, we are not aware of experiments testing whether pathogens retain the sex of their previous host. However, information on the sex of the previous carrier is widespread in genes of plants and mammals that are imprinted²⁰⁻²². Parallels on information acquisition can be drawn between gametic cells proliferating in female and male somatic environments and pathogens multiplying in females and male hosts. If genes in gametic cells are able to acquire information on the sex of their current carrier and pass it on to genes in the next carrier (imprinted genes) it does not seem too far fetched to consider genes in pathogens that are able to acquire information on the sex of their current host and pass it on to pathogenic genes in the next host (in particular when it has been shown that pathogens can acquire information on their current environment and maintain it through division¹,³,¹¹,¹⁸).

Our results can explain the puzzling observations of virulence patterns in measles, chickenpox and polio wherein those with infections contracted from same-sex individuals develop a less virulent infection compared to those infected by the opposite sex²³⁻²⁶. That, in developing countries, girls infected with measles by boys are more likely to die from the infection than girls infected by girls, is a well-established result that remains poorly understood²³,²⁴,²⁷. What is interesting about this pattern is that it cannot be explained by differences in virulence between girls and boys (i.e., due to differences between the sexes in their immune system) as differences between the sexes will affect equally infections received from girls and boys. Here we argue that pathogens with epigenetic memories of the sex of the host from which they came, can explain the complex patterns of virulence found in measles, chickenpox and polio. Finally, we explore the implications of our findings for the treatment of infectious diseases. In particular, we predict when the use of drugs that erase some epigenetic memories in pathogens will reduce their virulence.

## Results

**Infectious-disease dynamics.** We consider a structured host population consisting of two possible host types, female (type $j=f$) and male (type $j=m$). A host of a given sex, $j$, infected with a pathogen that most recently originated from a sex-$k$ host, recovers from its infection at rate $\gamma$, dies from causes unrelated to the infection at rate $\mu$ (natural mortality) and dies from causes related to the infection at a rate $\alpha_{j,k}$ (virulence) (see Fig. 3).

We model transmission using a law of mass-action with rate constant $\beta_{i \leftarrow p}$ where $i$ in this context refers to the sex of the susceptible host and $j$ refers to the sex of the infective host. We make the standard assumption that there is a trade-off between virulence and transmission²⁸⁻³¹. This trade-off could be mediated by the rate of pathogen replication within an infected host²⁸⁻³¹. For example, a greater replication rate could increase disease transmission but would also increase host mortality. For clarity, we will use $\beta_{i \leftarrow j}(\alpha_{j,k}) = \frac{\alpha_{j,k}}{\alpha_{j,k} + \theta_{i \leftarrow j}}$, where $\theta_{i \leftarrow j}$ is a positive parameter that controls how quickly the transmission benefits of higher virulence saturate.

Hosts also belong to one of two subpopulations, $\ell=A$ and $\ell=B$, and individual hosts move between these at a per-capita rate $\sigma$. Subpopulations differ with respect to the pattern of contact between hosts and/or the influx susceptible hosts. We use $c_{i \leftarrow j}^{\ell} = c_{j \leftarrow i}^{\ell}$ to denote the probability with which an interaction between a sex-$i$ host and sex-$j$ host occurs in subpopulation $\ell$. In addition, we use $\Lambda_j^{\ell}$ to denote the total rate at which sex-$j$ susceptible individuals are recruited to subpopulation $\ell$ (e.g., through birth or immigration) (see Fig. 3). If $c_{i \leftarrow j}^A = c_{i \leftarrow j}^B$ and $\Lambda_j^A = \Lambda_j^B$ for all $i, j$, then the two-subpopulation model collapses to a one-population model. We will consider the one- and two-subpopulation models separately.
a. Diploid organism with soma/germline separation

<figure><img src="image_4.png" /><figcaption>ii. Epigenetically inherited: Inter-generational</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>iii. Epigenetically acquired: Transitory</figcaption></figure>

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

b. Haploid organism without soma/germline separation

<figure><img src="image_7.png" /><figcaption>ii. Epigenetically acquired</figcaption></figure>

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

**Fig. 1** Schematic representation of the different types of epigenetic marks observed in different organisms. Panel a refer to complex organisms, that is diploid with germline-soma differentiation. Each sub-panel depicts a different type of epigenetic mark a.i trans-generational epigenetically inherited, a.ii inter-generational epigenetically inherited, and a.iii epigenetically acquired. Panel b refer to complex organisms that are haploid with no germline-soma differentiation. Sub-panel b.i depicts epigenetically inherited marks, while b.ii depicts epigenetically acquired marks.
<figure><img src="image_9.png" /><figcaption>**Fig. 2 Cycle of epigenetic marks on pathogens.** The first panel represents the cycle of epigenetically inherited marks on pathogens, that is marks underpining origin-specific virulence. The second panel represents the cycle of epigenetically inherited and acquired marks on pathogens, that is marks underpining origin-&-sex-specific virulence.</figcaption></figure>

Let $S_i^\ell$ and $x_{i,k}^\ell$ denote the density of susceptible sex-j hosts, and infected sex-j hosts who contracted the infection from a sex-k host, respectively, in subpopulation $\ell$ at time $t$. Then the description above gives rise to the following system of twelve differential equations:

$$ 
\begin{aligned}
\dot{S}_i^\ell &= \Lambda_i^\ell - \mu S_i^\ell - S_i^\ell \sum_{j \in \ell} c_{i \leftarrow j}^\ell \sum_{k \in \ell} \beta_{i \leftarrow j}(\alpha_{j,k}) x_{j,k}^\ell + \gamma \sum_{j \in \ell} x_{j,j}^\ell + \sigma(S_i^{\ell-} - S_i^\ell), \\
\dot{x}_{j,k}^\ell &= S_j^\ell c_{j \leftarrow k}^\ell \sum_{i \in \ell} \beta_{j \leftarrow k}(\alpha_{j,k}) x_{k,i}^\ell - (\alpha_{j,k} + \mu + \gamma)x_{j,k}^\ell + \sigma(x_{j,k}^{\ell-} - x_{j,k}^\ell),
\end{aligned}
\quad (1) $$

where dots indicate differentiation with respect to time, where $\ell$, $-\ell \in \{A, B\}$ with $-\ell \neq \ell$, and where $i, j, k \in \{f, m\}$.

**Evolutionary dynamics of pathogen virulence.** We study the evolutionary dynamics of pathogen virulence using an invasion analysis$^{32,33}$. This analysis considers a rare mutant pathogen that expresses a novel virulence phenotype as it competes against an established resident strain. It relies on the assumption that the dynamics described in (1) have brought the global population very close to an equilibrium at which the resident strain is maintained in an endemic state.

Typically an invasion analysis yields a measure of the invasion fitness of a rare mutant. In this case, the measure would reflect the expected number of secondary infections created by a mutant expressing virulence phenotype $\tilde{\alpha}_{j,k} \neq \alpha_{j,k}$. Rather than working directly with this measure, we opt to investigate its first derivative, i.e. the selection gradient:

$$ \lambda'_{j,k}(\alpha_{j,k}) = \sum_{\ell=A,B} \bar{x}_{j,k}^\ell \left[ \sum_{i=f,m} v_{i,j}^\ell c_{i \leftarrow j}^\ell \underbrace{\frac{d\beta_{i \leftarrow j}(\tilde{\alpha}_{j,k})}{d\tilde{\alpha}_{j,k}}}_{(a)} - v_{j,k}^\ell \underbrace{\frac{d\tilde{\alpha}_{j,k}}{d\tilde{\alpha}_{j,k}}}_{(b)} \right]_{\tilde{\alpha}_{j,k}=\tilde{\alpha}_{j,k}} \quad (2) $$

where $v_{i,j}^\ell$ is the reproductive value of a $i \leftarrow j$ infection currently

found in subpopulation $\ell$ and overbars indicate variables at equilibrium (e.g., $\bar{x}_{j,k}^\ell$ is $x_{j,k}^\ell$ at equilibrium). Term (a) in Eq. (2) expresses the rate at which secondary $i \leftarrow j$ infections in subpopulation $\ell$ rise with increasing mutant virulence. That is the upside of increased virulence. Term (b), on the other hand, represents the rate at which host mortality goes up as mutant virulence increases and captures the downside. By weighting (a) and (b) by reproductive value, Eq. (2) captures the long-term evolutionary significance of small changes in mutant virulence. Overall, the selection gradient, $\lambda'_{j,k}(\alpha_{j,k})$, gives the direction of travel through trait space that produces the greatest instantaneous increase in mutant fitness. When this quantity is positive (resp. negative), selection favours an increase (resp. decrease) $\alpha_{j,k}$.

The selection gradient revealed by our analysis, along with any constraints owing to a pathogen's inability to adjust based on the sex of its host or its host of origin, establishes the evolutionary trajectory for each resident virulence trait $\alpha_{j,k}$. We expect to find an 'evolutionarily stable' (ES) virulence trait, denoted $\alpha_{j,k}^*$, at the end of a given trajectory. We identify these ES values computationally using an iterative numerical procedure (see "Methods" and Note 1 of the Supplementary Information).

It is not difficult to intuit that the evolutionary dynamics associated with (2) could give rise to ES levels of virulence that depend on the sex of a pathogen's current host (current sex j). Given that transmissibility $\beta_{i \leftarrow j}$ explicitly depends on j, we expect the nature of the virulence-transmission trade-off to change depending on the sex of the host in which a strain is currently found; thus, the optimal balance struck between transmissibility and virulence follows suit in a sex-specific manner. This basic point can be derived from models with different types of hosts when assuming that the types considered are female and male hosts$^{34}$. Interestingly, when transmissibility does not explicitly depend on the sex of the current host (infectivity), but does
<figure><img src="image_10.png" /><figcaption>**Fig. 3** Flow diagram of two subpopulation epidemiological model. More details can be found in the main text and Note 1 of the Supplementary Information.</figcaption></figure>

explicitly depend on the sex of the future host (future sex i) (susceptibility), natural selection does not favour the evolution of sex-specific virulence. When transmissibility does not explicitly depend on either the sex of the current or future host, natural selection favours the evolution of sex-specific virulence when vertical transmission is considered³⁵.

It may be more difficult to intuit that evolutionary processes like the one suggested by (2) would predict ES virulence traits that depend on the sex of the host from which a given infection was acquired (sex of origin). This is especially true because, in the model we present here, sex of origin does not explicitly affect the transmission-virulence trade-off. We relax this assumption in the Supplementary Information (Note 1) for completeness. Nevertheless, adjusting virulence in the sex of origin can be advantageous when (i) the trade-off is affected by the sex of the susceptible host (susceptibility), and (ii) a sufficiently strong

correlation exists between the sex of the host of origin and the sex of the host in which the next infection is likely to become established. As we detail below, the former requirement can be established by assuming one sex is more resistant to infection than the other, and the latter requirement can be established in the two-subpopulation setting we have here.

Despite the possibly complicated relationship between transmissibility and virulence, when describing our results we will compare transmissibilities (and only transmissibilities) that arise using a benchmark level of virulence. This benchmark, denoted $\alpha_{bm}$, reflects the predictions made by our model under the assumption of no pathogen plasticity. By evaluating $\beta_{i \leftarrow j}$ at the benchmarked $\alpha$ value, we can highlight the transmission differences that precede the origin of pathogen plasticity. To be clear, $\beta_{i \leftarrow j}$ should be henceforth understood as $\beta_{i \leftarrow j}(\alpha_{bm})$.
<figure><img src="image_11.png" /></figure>

**Fig. 4** Evolution of origin-specific virulence with different infectivity and susceptibility between the sexes. On each sub-panel, the difference between evolutionarily stable virulence of female- and male-acquired infections are plotted as circles whose area scales with the extent of the difference. Circles are centred according to the average infectivity of females, defined as $\sqrt{\beta_{m \leftarrow \mu} \beta_{f \leftarrow f}}$, and average infectivity of males, defined as $\sqrt{\beta_{l \leftarrow m} \beta_{m \leftarrow m}}$. In subpanel i, average transmissibility between individuals of the same sex, defined as $\sqrt{\beta_{l \leftarrow f} \beta_{m \leftarrow m}}$, is higher than the average transmissibility between individuals of the opposite sex, defined as $\sqrt{\beta_{f \leftarrow m} \beta_{m \leftarrow f}}$. In sub-panel ii, the average transmissibility between individuals of the same sex is lower than the average transmissibility between individuals of the opposite sex. In both sub-panels, the results are based on a one-population model in which there are no sex-specific differences in background mortality, no possibility of recovery, and no difference in the influx of sexes to the population. Parameters (see Supplementary Information Note 1 and Available Code): *c-values all* 1, *m* = 35, *ρ* = 0.5, *μ* = 0.5, *γ* = 0, *θ*<sub>*i*→*j*</sub> ranged from 0.5 to 1.5 and all combinations were considered (9⁴different combinations).

In the Supplementary Information (Note 2), we provide more details on our evolutionary analysis, including explicit calculations using the selection gradient; here we focus upon the key results. In particular, we address two questions: i. When does origin-specific or origin-&-sex-specific virulence evolve? ii. When do we expect to observe greater virulence of pathogens with a particular origin or a particular origin in a particular sex? We pay attention to contrasting patterns of virulence exhibited by infections transmitted between same-sex individuals against patterns exhibited by infections transmitted between opposite-sex individuals. This contrast is deserving of special attention as it is related to complex patterns of virulence in measles, chickenpox and polio—patterns that cannot be explained by recourse to sex-specific virulence.

**Origin-specific virulence: no population structure.** In this section and the next, we explore the evolution of virulence when pathogens have epigenetically inherited information about the sex of the host from which they came, denoted $\alpha_{*,k}$. Henceforth, bullets represent a lack of dependency of the variable on the term they replace.

Origin-specific virulence can evolve when transmissibility depends on both the sex in which the pathogen currently resides and the sex that follows (see Note 5 of the Supplementary Information and Fig. 4). In this circumstance, two patterns emerge. If the average same-sex transmissibility exceeds the average cross-sex transmissibility, then greater virulence occurs in infections originating from the sex with greater average infectivity (if $\sqrt{\beta_{f \leftarrow f} \beta_{m \leftarrow m}} > \sqrt{\beta_{f \leftarrow m} \beta_{m \leftarrow f}}$, then $\alpha_{*,k}^* > \alpha_{*,-k}^*$ when $\sqrt{\beta_{f \leftarrow k} \beta_{m \leftarrow k}} > \sqrt{\beta_{f \leftarrow -k} \beta_{m \leftarrow -k}}$; Fig. 4i). By contrast, if average cross-sex transmissibility exceeds same-sex

transmissibility, then the pattern is reversed: pathogen originating from the sex with the lower infectivity are more virulent (Fig. 4ii).

The intuition behind this result is that a pathogen's origin provides information about the sex of the current host. Virulence then evolves to be lower in the sex that can infect more readily. For example, if the average cross-sex transmissibility is higher than the average same-sex transmissibility, then a pathogen with female origin is more likely to be infecting a male. In this case, when the average transmissibility from a sex (i.e. the infectivity of that sex) is higher in males, pathogens are selected to evolve lower virulence in males which corresponds to lower virulence when of female origin. In this scenario, origin-specific marks provide information about the sex of the current host. If reliable information about the sex of the current host were available, selection would favour the evolution of sex-specific virulence over origin-specific virulence. If a pathogen can gain information on the sex of its current host immediately after infection (or shortly after), it would not be selected to keep memories. However, if it takes the pathogen some time to gain this information, it will be selected to keep memories.

**Origin-specific virulence: population structure.** We now assume transmission depends only on the sex to which the pathogen is transmitted (susceptibility of a sex), $\beta_{i \leftarrow j} = \beta_{i \leftarrow *}$. Here, origin-specific virulence evolves as long as subpopulations differ with respect to the sex-specific influx of new susceptible individuals ($\Lambda_j^A \neq \Lambda_j^B$), or with respect to contact structure ($c_{i \leftarrow j}^A \neq c_{i \leftarrow j}^B$) (Fig. 5 and Supplementary Information Note 4). Most notably, when sex-k is less susceptible to infection, the virulence of pathogens with sex-k origin evolves to be greater (if $\beta_{k \leftarrow *} < \beta_{k \leftarrow -k}$, then $\alpha_{*,k}^* > \alpha_{*,-k}^*$; Fig. 5).
<figure><img src="image_12.png" /><figcaption>**Fig. 5** Evolution of origin-specific virulence with different subpopulations and different susceptibility between the sexes. On each sub-panel the difference between evolutionarily stable virulence associated with female- and male-acquired infections are plotted as circles whose area scales with the extent of the difference. Circles are centred according to the extent of the difference between subpopulations and the excess female susceptibility, defined as $β_{f→e} - β_{m→e}$. There are no sex-specific differences in background mortality, there was no possibility of recovery, and there was only weak mixing of populations ($σ = 0.25$). In sub-panel i, the subpopulations differ only in their sex-ratio (controlled through the influx of susceptible hosts), from a scenario with no difference (indicated as `none`) to one in which one subpopulation is strongly female biased while the other is strongly male biased (indicated as `max`). In sub-panel ii, the subpopulations differ in their contract structure, from a scenario with no difference (`none`) to one in which in subpopulation A, contacts are exclusively same-sex ($c_{i→j}^A = c_{j→i}^A$), while in subpopulation B, contacts are exclusively cross-sex ($c_{i→j}^B = c_{j→i}^B$).</figcaption></figure>

The intuition behind this result is that the differences between subpopulations establishes a positive correlation between the sex of the host the pathogen will infect, and the sex of the host from which the pathogen originated. Virulence evolves to be lower when an infection originates from the sex that can be infected more readily. For example, if subpopulation A shows a higher rate of same-sex contacts and subpopulation B a higher rate of cross-sex contacts, a female-origin pathogen in either of these populations is likely to end up infecting a female next. When the susceptibility is higher in males, pathogens are selected to evolve higher virulence when of female origin. In this scenario origin-specific marks provide information about the sex of the next host. In this case, even if information about the sex of the current host were available, selection favours the evolution origin-specific virulence over sex-specific virulence.

**Origin-&-sex-specific virulence.** So far we have explored the evolution of virulence when pathogens can only make use of inherited information. Here we extend our previous analysis to include pathogens that can adjust their virulence in response to inherited information about the sex of the host they came from, and acquired information about the sex of the host in which they currently reside, denoted $α_{f,k}$. This extension is motivated by the complex virulence patterns observed in measles, chickenpox, and polio<sup>25,36</sup>. These infections result in greater mortality in girls infected by boys and in boys infected by girls<sup>25,36</sup>, a pattern that cannot be explained by invoking origin-specific or sex-specific virulence alone. In particular, sex-specific virulence could explain greater mortality arising from infections occurring in a given sex, and origin-specific virulence could explain greater mortality in infections originating from a given sex, but neither alone can yield the observed virulence patterns. Thus, it takes origin-&-sex-specific virulence to explain the reported interaction effects. What's more, shifting the focus from pathogens to hosts, these patterns cannot be readily explained by sex-specific differences in the immune response or gene expression profiles alone. These differences would explain sex-specific virulence but not those differences seen in measles, chickenpox and polio.

In the absence of population structure, origin-&-sex-specific virulence will not evolve as information about the sex of the host of origin provides no adaptive value beyond information about the sex of the current host (i.e., sex-specific virulence).

The two-subpopulations model expands the scope for the evolution of origin-&-sex-specific virulence. In this section, we explore two ways in which this expansion can occur.

Firstly, in the presence of population structure, origin-&-sex-specific virulence can evolve even when transmissibility is the same for all host types (that is, $β_{i→j} = β_{j→i}$). In this case, however, subpopulations must differ with respect to the sex-specific influx of susceptible hosts ($Λ_j^A ≠ Λ_j^B$), and the pattern of contact between host types ($c_{i→j}^A ≠ c_{i→j}^B$). Origin-&-sex-specific virulence is favoured, then, because it is an indirect response to the conditions the pathogen is likely to encounter in the future.

As an example, consider a case in which contacts in one subpopulation tend to occur more frequently between same-sex individuals ($c_{j→j}^A > c_{j→-j}^A$), whereas contacts in the other sub-population tend to be between individuals of the opposite sex ($c_{i→j}^A < c_{i→-j}^A$). Suppose further that opportunities to create new infections are more abundant in the former subpopulation because birth rates there are greater ($Λ_j^A > Λ_j^B$). Under these conditions, we find higher virulence from infections acquired from same-sex individuals on average, meaning ($α_{f,f}^* + α_{m,m}^* > \frac{1}{2}(α_{f,m}^* + α_{m,f}^*)$) (Fig. 6).

The intuition behind this result rests on a two-part rationale. First, when births balance deaths on a global scale, as they do in our model at equilibrium, a higher birth rate in one subpopulation disproportionately buffers the negative consequences of virulence there. As a result, there is less disincentive to be virulent in the population where same-sex contacts dominate. Second, knowing that the sex of the host of origin matched (resp. did not match) the sex of the current host would suggest to a pathogen that the consequences of virulence are less (resp. more) dire than they might be otherwise.

Second, the evolution of origin-&-sex-specific virulence can be supported in the presence of sex-specific transmissibilities as well. In
<figure><img src="image_13.png" /></figure>

**Fig. 6 Evolution of origin-&-sex-specific virulence when subpopulations differ in contact structure and population size.** The difference between average virulence associated with infections acquired from same-sex transmission, defined as $\bar{\alpha}_{kk} = (\alpha_{11} + \alpha_{22})/2$, and those acquired from cross-sex transmission, defined as $\bar{\alpha}_{-kk} = (\alpha_{12} + \alpha_{21})/2$, is plotted here as circles whose area scales with the extent of the difference. Circles are centred according to the relationship between the contact patterns that exist in the respective subpopulations, and the extent of the bias in birth rate between subpopulations. These numerical results assume no sex-specific differences in transmissibility or susceptibility ($\beta_{\bullet\bullet\bullet} = 0$), no sex-specific background mortality, no possibility of recovery, and weak mixing of populations ($\sigma = 0.25$). In sub-panel i, there is higher same-sex contact in one subpopulation but lower in the other. As the difference with respect to contact patterns between the populations increases, contacts in one subpopulation become more strongly biased toward same-sex interactions while those in the other subpopulation become equally biased but toward cross-sex interactions. Opportunities for the creation of new infections can be strongly associated with same-sex interactions when the influx of new susceptible hosts through birth strongly favours the population with that contact pattern. Birth rates may also be greater in the subpopulation associated with cross-sex interactions, in which case the negative consequences of pathogen virulence are lower there and greater cross-sex virulence evolves. In sub-panel ii, there is higher same-sex contact in one population but no bias in the other. This assumes no bias in the same-sex vs cross-sex pattern of contact in one of the two subpopulations. In this case the opportunity to create new infections ranges between same-sex bias and no bias as the influx of new susceptible hosts shifts through births from favouring one subpopulation to favouring the other.

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

**Fig. 7 Evolution of origin-&-sex-specific virulence when subpopulations differ in same-sex and cross-sex transmission.** The difference between average virulence associated with infections acquired from same-sex transmission and those acquired from cross-sex transmission are plotted as circles whose area scales with the extent of the difference itself. Circles are centred according to average same-sex transmissibility and average cross-sex transmissibility. We assume no sex-specific differences in background mortality, no possibility of recovery, and weak mixing of populations ($\sigma = 0.1$). In sub-panel i, the subpopulations differ in their sex-ratio such that the influx of sexes to each subpopulation is biased in exactly opposite directions, but contact structure does not differ between populations ($c_{i \to j}^A = c_{j \to i}^B = 1$). In sub-panel ii, the subpopulations differ in their contact structure. Influx of sexes to each population is unbiased, but same-sex contact is more common in subpopulation A ($c_{j \to i}^A > c_{i \to j}^A$), while cross-sex contact is more common in subpopulation B ($c_{i \to j}^B < c_{j \to i}^B$).
<figure><img src="image_15.png" /><figcaption>**Fig. 8** Summary of results regarding the evolution of origin-specific virulence. We focus on the case when female-origin virulence will be greater than male-origin one. Each row indicates a set of different assumptions regarding the population structure and pathogen's transmissibility.</figcaption></figure>

<figure><img src="image_16.png" /><figcaption>**Fig. 9** Summary of results regarding the evolution of origin-&-sex-specific virulence. We focus on the case when cross-sex virulence will be greater than same-sex one. Each row indicates a set of different assumptions regarding the population structure and pathogen's transmissibility.</figcaption></figure>

order for this virulence pattern to evolve, transmissibilities must show both sex-specific susceptibility and sex-specific infectivity. If transmissibilities are sex-specific, though, we can relax conditions on subpopulations, insisting that they only differ with respect either the sex-specific in susceptible hosts, or the pattern of contacts

between host types. As before, origin-&-sex-specific virulence is favoured because it is an indirect response to the conditions the pathogen is likely to encounter in the future.

In general, when average same-sex transmissibility is higher, then infections currently found in one sex but originating from
<figure><img src="image_17.png" /><figcaption>**Fig. 10** Virulence of cross-sex and same-sex measles infections. Sub-panel i shows the ratio of case fatalities ($\chi$) in cross-sex infections relative to same-sex infections, defined as $(\chi_{mf} + \chi_{fm})/(\chi_{mm} + \chi_{ff})$, in two studies conducted in children 6-35 months old in Guinea-Bissau and Senegal. Notice that in both cases infections from the opposite sex are roughly twice as virulent as infections from the same sex. Sub-panel ii shows the ratio of case fatalities in cross-sex infections relative to same-sex infections broken down by sex of the infected. This ratio in infected boys is given by the proportion of boys infected by girls relative to the one infected by boys, that is $\chi_{mf}/\chi_{mm}$ and in infected girls is given by the proportion of girls infected by boys relative to the one infected by girls, that is $\chi_{fm}/\chi_{ff}$. Notice that in all cases infections from the opposite-sex are more virulent than infections from the same-sex, that is $\chi_{-ij}/\chi_{jj} > 1$, ranging between 1.5 and 2.5 times more virulent. Finally, sub-panel iii shows the proportion of case fatalities in each of the sexes when infected by each of the other sexes in the two studies conducted in Guinea-Bissau and Senegal<sup>23,24</sup>.</figcaption></figure>

the opposite sex show greater average virulence (if $\sqrt{\beta_f \leftarrow f \beta_m \leftarrow m} > \sqrt{\beta_f \leftarrow m \beta_m \leftarrow f}$, then $\frac{1}{2}(\alpha_{f,f}^* + \alpha_{m,m}^*) < \frac{1}{2}(\alpha_{f,m}^* + \alpha_{m,f}^*)$; Fig. 7).

Discussion

Our research shows that genes in pathogens can be selected to
retain epigenetic memories of the sex of the host from which the
infection originated. Our research also shows that genes in
pathogens can be selected to combine epigenetic memories of the
sex of the host from which the infection originated with

information on the sex of the current host. Pathogens are selected
to retain epigenetic memories when they convey reliable info-
mation about: the past, present, and future sex of the host they
infect. Epigenetic memories about a past host can provide the
pathogen: (i) information about opportunities for transmission
that depend on the host they originated from; (ii) information
about the sex of the current host (Fig. 8); (iii) information about
the sex of future hosts (Fig. 9). Epigenetic memories about a past
host that evolve to provide indirect information about the sex of
the current host will be out-competed by direct information on
the sex of the current host. On the contrary, epigenetic memories
about a past host that evolve to provide information about the sex
of future hosts (e.g., due to asymmetries in contact networks, or
difference density of susceptibles) will out-compete information
on the sex of the current host.

From an abstract perspective, our findings relate to previous
work on the evolution of epigenetic cues in heterogeneous
environments³⁷⁻⁴¹. When the environment experienced by the
individual is heterogeneous, epigenetic memories can evolve
when they contain information about the current environment
(e.g., strong environmental autocorrelation or limited migration)
that could not be obtained otherwise (e.g., due to time lags,
environmental noise/variability)³⁷⁻⁴¹. In our model, from a
pathogen's perspective, sex can be thought as a two-state het-
erogeneous environment. Consistent with previous work, we find
that epigenetic cues may evolve when they provide information
on the sex of the current host, and this information cannot be
obtained directly—for example, due to a delay between the
moment of infection and the time when information on the sex of
the host may be available. In addition, we find that epigenetic
cues may evolve when they provide information on attributes of
the population in which the host is found. In particular, such cues
are of value when information on the sex of the past host informs
about future transmission opportunities.

To support the evolution of origin-specific and/or origin-&-sex-specific virulence there must be differences between either host sexes in their infectivity and susceptibility, or a population structured according to differences in the interactions between the sexes. These biological and social differences are pervasive in human populations: differences between the sexes in infectivity and in susceptibility are ubiquitous42-48; differences between social groups with respect to their sex ratios and/or the contact patterns between individuals of the same and opposite sexes have been widely reported49,50. The outcome will be virulence that differs when the pathogen was transmitted from a female rather than a male (origin-specific virulence) or virulence that differs when the pathogen was transmitted from a female and infecting a female, or transmitted from a male and infecting a female (origin-&-sex-specific virulence). The latter complex patterns of virulence can result in greater average virulence in same-sex infections than cross-sex transmission infections or vice versa.

Our findings offer an explanation for the complex pattern of
virulence identified by doctors in diseases like measles, chickenpox
and polio. More than two decades ago, it was observed that in
countries with limited access to medical treatment, girls infected with
measles by boys were 2.5 times more likely to die from the infection
than girls infected by other girls²³ (Fig. 10i). Similarly, boys infected
by girls were 1.7 times more likely to die than boys infected by other
boys (Fig. 10ii). Overall, average cross-sex infections with measles
were twice as virulent when compared to average same-sex infections
(Fig. 10iii). This same qualitative result has been replicated by other
studies²⁴ and extended to infections with chickenpox and polio²⁵,²⁶.
While these complex patterns of virulence are well established
empirically, their origins remain a mystery²⁷. Focusing on the host,
differences in virulence between cross-sex and same-sex infections
cannot be explained by sex differences in the immune system or in
<figure><img src="image_18.png" /><figcaption>ii. Origin-&-sex-specific virulence</figcaption></figure>

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

**Fig. 11 Predictions for the effects of epigenetic therapy on the virulence of an infection.** Here we consider haploid pathogens with two types of genes: one whose greater expression x enhances virulence, $\frac{da}{dx} > 0$, (henceforth *virulence enhancer*), and another one whose greater expression y inhibits virulence, $\frac{dy}{dx} < 0$, (henceforth *virulence inhibitor*). Epigenetically inherited marks are established by methylation of promoter regions resulting in reduced expression of the gene. Epigenetic interventions consist of demethylating the pathogen's genome. In sub-panel i, we consider pathogens exhibiting origin-specific virulence. When infections originating in females are more virulent ($\alpha_{ef} > \alpha_{em}$), pathogens of female-origin are selected to methylate the promoter of virulence inhibitor genes thus increasing the virulence of the infection. Therefore epigenetic interventions that demethylate infections from females will re-activate virulence inhibitors and reduce the virulence of the infection. In sub-panel ii, we consider pathogens showing origin-&-sex-specific virulence. When the virulence of pathogens with male-origin in females is higher ($\alpha_{fm} > \alpha_{mf} > \alpha_{mm} > \alpha_{fl}$), pathogens with male-origin in females are selected to methylate the promoter of virulence inhibitor genes thus increasing the virulence of the infection. Thus epigenetic interventions that demethylate infections in females originating from females, will re-activate virulence inhibitors and thus reduce the virulence of the infection. Notice, however, that pathogens with the same male-origin but infecting females, will respond to the same epigenetic intervention in the opposite manner, that is increasing the virulence of the infection.

gene expression alone. The latter would result in different virulence in girls and boys but the lack of effects due to the origin of the infection would result in the cancellation of these differences; if there were only sex-specific effects caused by the immune system, cross-sex and same-sex virulence would not differ on average.

We argue that epigenetically inherited and acquired marks allow the evolution of sex-&-origin-specific virulence in pathogens in ways that can explain greater virulence of cross-sex infections as opposed to same-sex infections, as observed in measles, chickenpox and polio<sup>23–26</sup>. We devised two plausible

scenarios in which such complex patterns may evolve; both cases require a population structure where subpopulations differ with respect to their contact patterns in a sex-specific manner. For example, a population where the pathogen is transmitted within two groups of individuals. One group may be formed largely by individuals with primarily same-sex interactions, and the other group by individuals with largely cross-sex interactions. One way in which greater virulence of cross-sex infections may evolve is when, in addition to the aforementioned contact structure, the two groups differ in their sex ratio and/or size (Fig. 6).
Alternatively, greater virulence in cross-sex infections may evolve when in addition to the aforementioned contact structure there is greater same-sex transmissibility (Fig. 7).

Our research suggests the possibility of developing epigenetic therapies by interfering with pathogens' memories. Epigenetic therapies have been widely used in the treatment of cancer⁹,⁵¹, and their use in the treatment of infectious diseases is starting to be implemented. If evidence of epigenetic marks modifying the virulence of pathogens transmitted from different sexes were to be found, it would be possible to use the predictions of our model to guide modifications of the epigenome of pathogens exhibiting origin-specific virulence. When pathogens of male origin are selected for lower virulence they will under-express any gene whose expression is positively correlated with virulence ('virulence enhancer') (Fig. 11). By contrast, when pathogens of female origin are selected for higher virulence, they will under-express any gene whose expression is negatively correlated with virulence ('virulence inhibitor') (Fig. 11).

Epigenetic marks in viruses and bacteria are often implemented by downregulating the expression of genes via differential methylation of the promoter of a gene³,⁵², although this is not the only mechanism and the mechanisms are more diverse in other pathogens⁵³,⁵⁴. While our model applies to any mechanism of non-genetic inheritance, for the purpose of illustrating how our model may guide epigenetic therapy we focus on marks established via methylation of the promoter. In particular, here we explore an epigenetic intervention to reduce the virulence of an infection by demethylating the pathogen's genome using, as a criterion, the sex of the host from which the pathogen originated. This can be achieved through different pharmacological agents, i. e. generic DNA methyltransferase inhibitors⁵³,⁵⁴ or specific use of CRISPR to demethylate a gene⁵⁵. When natural selection results in higher virulence of infections originating from a given sex, we predict that genome-wide demethylation of the pathogen originated from that sex, and only that sex, will reduce virulence (Fig. 11). This is because demethylation will upregulate previously muted virulence inhibitors in pathogens originating from one sex, but will upregulate previously muted virulence enhancers in pathogens originating from the other sex (Fig. 11). Importantly, indiscriminate demethylation will produce undesirable effects when directed at pathogens without accounting for their origin. For specific patterns of virulence, our model allows us to predict the outcome of treatments that demethylate the pathogen's genome.

More generally, our work suggests that complex patterns of virulence (origin-specific or origin-&-sex specific) can be understood in terms of the selective pressures that affect the pathogen. We propose the intriguing possibility that pathogen's memories of past environments may be driving the virulence of infections. Our research focuses on the sex of the previous host but our results could be extended to other characters (e.g., stress levels caused by differences in the socioeconomic status of hosts). The possibility that there may be a variety of epigenetically inherited memories advocates the need for personalised approaches to infections in which factors like sex or social status can inform the best course of action to treat a disease. This research aims to be a first step in that direction.

## Methods

We identify Evolutionarily Stable levels of virulence using a numerical invasion analysis implemented in Matlab⁵⁶. A detailed description of our approach can be found in Note 2.1 of the Supplementary Information, and custom code and the numerical data it generates are available for download. Briefly, results are obtained by guessing the ES levels of virulence, then carrying out the following five-step procedure: (i) Substitute the most recent guess into the system of equations in (1), then integrate forward in time to find the equilibrium levels of susceptible and

infected hosts. (ii) Use the equilibrium levels of susceptible and infected hosts to construct the selection gradients described in (2). (iii) Update the guess by either incrementing it (when the corresponding selection gradient is positive) or decrementing it (when the corresponding selection gradient is negative). (iv) Repeat (i-iii) until the magnitude of each relevant selection gradient is within a tolerance of zero. (v) Return each of the most recent guesses as the estimates of the various ES virulence levels.

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

## Data availability

The numerical results used to produce Figs 4-7 and figures that appear in the Supplementary Information can be found at https://github.com/geoffwild/McLeod_et_al_NComm and at https://zenodo.org/deposit/4939424.

## Code availability

Custom code was written using Matlab⁵⁶ and can be found at https://github.com/geoffwild/McLeod_et_al_NComm and at https://zenodo.org/deposit/4939424.

Received: 16 May 2020; Accepted: 24 June 2021;
Published online: 13 July 2021

## References

1. Gomez-Diaz, E., Jorda, M., Angel Peinado, M. & Rivero, A. Epigenetics of host-pathogen interactions: the road ahead and the road behind. *PLoS Pathogens* **8**, 1–10 (2012).

2. Heard, E. & Martienssen, R. A. Transgenerational epigenetic inheritance: myths and mechanisms. *Cell* **157**, 95–109 (2014).

3. Balakrishnan, L. & Milavetz, B. Epigenetic regulation of viral biological processes. *Viruses* **9**, 1–14 (2017).

4. Miska, E. A. & Ferguson-Smith, A. C. Transgenerational inheritance: models and mechanisms of non-DNA sequence-based inheritance. *Science* **354**, 59–63 (2016).

5. Fieldes, M., Schaeffer, S., Krech, M. & Brown, J. DNA hypomethylation in 5-azacytidine-induced early-flowering lines of flax. *Theor. Appl. Genet.* **111**, 136–149 (2005).

6. Franklin, T. B. et al. Epigenetic transmission of the impact of early stress across generations. *Biol. Psychiatry* **68**, 408–415 (2010).

7. Weiss, I. C., Franklin, T. B., Vizi, S. & Mansuy, I. M. Inheritable effect of unpredictable maternal separation on behavioral responses in mice. *Front. Behav. Neurosci.* **5**, 1–12 (2011).

8. Peters, J. The role of genomic imprinting in biology and disease: an expanding view. *Nat. Rev. Genet.* **15**, 517–530 (2014).

9. Feinberg, A. P., Koldobskiy, M. A. & Gondor, A. Epigenetic modulators, modifiers and mediators in cancer aetiology and progression. *Nat. Rev. Genet.* **17**, 284–299 (2016).

10. Chookajorn, T. et al. Epigenetic memory at malaria virulence genes. *Proc. Natl. Acad. Sci. USA* **104**, 899–902 (2007).

11. Jablonka, E. & Raz, G. Trans-generational epigenetic inheritance: prevalence, mechanisms, and implications for the study of heredity and evolution. *Q. Rev. Biol.* **84**, 131–176 (2009).

12. Sonda, S. et al. Epigenetic mechanisms regulate stage differentiation in the minimized protozoan *Giardia lamblia*. *Mol. Microbiol.* **76**, 48–67 (2010).

13. Mishra, P. K., Baum, M. & Carbon, J. DNA methylation regulates phenotype-dependent transcriptional activity in *Candida albicans*. *Proc. Natl. Acad. Sci. USA* **108**, 11965–11970 (2011).

14. Niller, H. H. et al. Role of epigenetics in EBV regulation and pathogenesis. *Future Microbiol.* **9**, 747–756 (2014).

15. Ukaegbu, U. E. et al. A unique virulence gene occupies a principal position in immune evasion by the malaria parasite *Plasmodium falciparum*. *PLoS Genet.* **11** 1–26 (2015).

16. Duraisingh, M. T. & Horn, D. Epigenetic regulation of virulence gene expression in parasitic protozoa. *Cell Host Microbe* **19**, 629–640 (2016).

17. Rai, L. S., Singha, R., Brahma, P. & Sanyal, K. Epigenetic determinants of phenotypic plasticity in *Candida albicans*. *Fungal Biol. Rev.* **32**, 10–19 (2018).

18. Sanchez-Romero, M. & Casadesus, J. The bacterial epigenome. *Nat. Rev. Microbiol.* **18**, 7–20 (2020).

19. Volz, J. C. et al. PfSET10, a *Plasmodium falciparum* methyltransferase, maintains the Active var Gene in a poised state during parasite division. *Cell Host Microbe* **11**, 7–18 (2012).

20. Bartolomei, M. S. & Ferguson-Smith, A. C. Mammalian Genomic Imprinting. *Cold Spring Harb. Perspect. Biol.* **3**, 1–17 (2011).
21. Gehring, M. Genomic imprinting: insights from plants. *Annu. Rev. Genet.* **47**, 187–208 (2013).

22. Haig, D. & Graham, C. Genomic imprinting and the strange case of the insulin-like growth factor-II receptor. *Cell* **64**, 1045–1046 (1991).

23. Aaby, P., Bukh, J., Hoff, G., Lisse, I. & Smits, A. Cross-sex transmission of infection and increased mortality due to measles. *Rev. Infect. Dis.* **8**, 138–143 (1986).

24. P. A. Influence of cross-sex transmission on measles mortality in rural Senegal. *Lancet* **340**, 388–391 (1992).

25. Nielsen, N., Wohlfahrt, J., Melbye, M., Molbak, K. & Aaby, P. Does cross-sex transmission increase the severity of polio infection? A study of multiple family cases. *Scand. J. Infect. Dis.* **34**, 273–277 (2002).

26. Poulsen, A. et al. A household study of chickenpox in Guinea-Bissau: Intensity of exposure is a determinant of severity. *J. Infect.* **45**, 237–242 (2002).

27. Organization, W. H. *Addressing Sex and Gender in Epidemic-prone Infectious Diseases* (World Health Organization, 2007).

28. Anderson, R. & May, R. Coevolution of hosts and parasites. *Parasitology* **85**, 411–426 (1982).

29. Alizon, S., Hurford, A., Mideo, N. & Van Baalen, M. Virulence evolution and the trade-off hypothesis: history, current state of affairs and the future. *J. Evol. Biol.* **22**, 245–259 (2009).

30. Cressler, C., McLeod, D., Rozins, C., van den Hooegen, J. & Day, T. The adaptive evolution of virulence: a review of theoretical predictions and empirical tests. *Parasitology* **143**, 915–930 (2016).

31. Acevedo, M., Dillemuth, F., Flick, A., Faldyn, M. & Elderd, B. Virulence-driven trade-offs in disease transmission: a meta-analysis. *Evolution* **73**, 636–647 (2019).

32. Taylor, P. D. & Frank, S. A. How to make a kin selection model. *J. Theor. Biol.* **180**, 27–37 (1996).

33. Otto, S. P. & Day, T. *A Biologist's Guide to Mathematical Modeling in Ecology and Evolution* (Princeton University Press, 2007).

34. Gandon, S. Evolution of multihost parasites. *Evolution* **58**, 455–469 (2004).

35. Übeda, F. & Jansen, V. The evolution of sex-specific virulence in infectious diseases. *Nat. Commun.* **7**, 1–9 (2016).

36. Aaby, P. Assumptions and contradictions in measles and measles immunisation research: is measles good for something? *Soc. Sci. Med.* **41**, 673–686 (1995).

37. Jablonka, E. et al. The adaptive advantage of phenotypic memory in changing environments. *Philos. Trans. R. Soc. B* **350**, 133–141 (1995).

38. Day, T. & Bonduriansky, R. A unified approach to the evolutionary consequences of genetic and non-genetic inheritance. *Am. Nat.* **178**, E18–E35 (2011).

39. English, S., Pen, I., Shea, N. & Uller, T. The information value of non-genetic inheritance in plants and animals. *PLoS One* **10**, 1–17 (2015).

40. Uller, T., English, S. & Pen, I. When is incomplete epigenetic resetting in germ cells favoured by natural selection? *Proc. R. Soc. B* **282** 1–8 (2015).

41. McNamara, J. M., Dall, S. R. X., Hammerstein, P. & Leimar, O. Detection vs. selection: integration of genetic, epigenetic and environmental cues in fluctuating environments. *Ecol. Lett.* **19**, 1267–1276 (2016).

42. Addo, M. M. & Altfeld, M. Sex-based differences in HIV type-1 pathogenesis. *J. Infect. Dis.* **209**, S86–S92 (2014).

43. Baden, R., Rockstroh, J. K. & Buti, M. Natural history and management of hepatitis C: does sex play a role? *J. Infect. Dis.* **209**, S81–S85 (2014).

44. Gabriel, G. & Arck, P. C. Sex, immunity and influenza. *J. Infect. Dis.* **209**, S93–S99 (2014).

45. Muzny, C. A., Kapil, R., Austin, E. L., Hook, E. W. & Geisler, W. M. Lower sexually transmissible infection prevalence among lifetime exclusive women who have sex with women compared with women who have sex with men. *Sexual Health* **11**, 592–593 (2014).

46. Nhamoyebonde, S. & Leslie, A. Biological differences between the sexes and susceptibility to tuberculosis. *J. Infect. Dis.* **209**, S100–S106 (2014).

47. van Lunzen, J. & Altfeld, M. Sex differences in infectious diseases-common but neglected. *J. Infect. Dis.* **209**, S79–S80 (2014).

48. Ricardo Vazquez-Martinez, E., Garcia-Gomez, E., Camacho-Arroyo, I. & Gonzalez-Pedrajo, B. Sexual dimorphism in bacterial infections. *Biol. Sex Differ.* **9**, 1–20 (2018).

49. Tolhurst, R. et al. The challenge of infectious disease: time to take gender into account. *J. Health Manag.* **4**, 135–151 (2002).

50. Onnela, J., Waber, B. N., Pentland, A., Schnorf, S. & Lazer, D. Using sociometers to quantify social interaction patterns. *Sci. Rep.* **4**, srep05604 (2014).

51. Jones, P. A., Issa, J.-P. J. & Baylin, S. Targeting the cancer epigenome for therapy. *Nat. Rev. Genet.* **17**, 630–641 (2016).

52. Casadesus, J. & Low, M. Epigenetic gene regulation in the bacterial world. *Microbiol. Mol. Biol. Rev.* **70**, 830–856 (2006).

53. Egger, G., Liang, G., Aparicio, A. & Jones, P. Epigenetics in human disease and prospects for epigenetic therapy. *Nature* **429**, 457–463 (2004).

54. Park, M., Keung, A. J. & Khalil, A. S. The epigenome: the next substrate for engineering. *Genome Biol.* **17**, 1–17 (2016).

55. Urbano, A., Smith, J., Weeks, R. & Chatterjee, A. Gene-specific targeting of dna methylation in the mammalian genome. *Cancers* **11**, 1–20 (2019).

56. MATLAB. version 9.6.0 (R2019a) (The MathWorks Inc., Natick, Massachusetts, 2019).

## Acknowledgements

F.U. thanks Mateo Übeda Tran for invaluable advice and support. The authors thank Western University for the partial support provided through its Research-In-Teams program. D.V.M. is supported by ETH and NSERC Postdoctoral Fellowships. G.W. is supported by an NSERC Discovery Grant. F.U. is supported by a NSFDEB-NERC Research Grant NE/T009322/1.

## Author contributions

D.M., G.W. and F.U. contributed equally.

## Competing interests

The authors declare no competing interests.

## Additional information

**Supplementary information** The online version contains supplementary material available at https://doi.org/10.1038/s41467-021-24580-0.

**Correspondence** and requests for materials should be addressed to F.b.

**Peer review information** *Nature Communications* thanks Elena Gómez-Díaz, Minus van Baalen and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

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

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

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

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

© The Author(s) 2021