Introduction

Pathogen life histories are shaped by natural selection to maximise reproductive fitness: pathogens must avoid clearance by the host immune system long enough to ensure transmission to a new host lacking pre-existing immunity. Host immune defences therefore exert strong selective pressures on both the within- and between-host components of pathogen life histories. These processes have generated structured patterns of antigenic diversity within pathogen genomes that facilitate the evasion of herd and within-host immunity1, promoting both high levels of allelic diversity at the population level2,3 and antigenic variation during infection4. The relative impact of within- and between-host selection on pathogen diversity is expected to depend on the mode of transmission: compared to airborne pathogens transmitted through the respiratory route, sexually transmitted or vector-borne pathogens must contend with often infrequent and uncertain opportunities for transmission, with high variability in host contact rates5,6,7. Sexually transmitted pathogens are often associated with chronic diseases8 and may cause longer infections in order to compensate for the heterogeneities in partner contact rates9,10,11, often facilitated by antigenic variation10,12,13,14.

The effects of different types of immunity on the structuring and dynamics of pathogen populations have been a focus of theoretical studies for several decades15,16,17,18, but most have focused either on herd immunity as a driver of population level diversity in short-term infections, or on the interactions with an individual immune system that orchestrate antigenic variation in long-term infections. Since pathogen diversity will ultimately reflect both these processes, understanding population structure will require the unification of the study of within-host and between-host immune selection pressures.

The Opa proteins of the bacterial Neisseria genus provide a unique framework for studying the impact of within- and between-host evolutionary pressures on the structuring of antigenic diversity in two distinct and globally important pathogens. N. meningitidis (the meningococcus) colonises the nasopharynx of up to 40% of adults19 and is a primary cause of meningitis and septicaemia worldwide. N. gonorrhoeae (the gonococcus) primarily colonises the genito-urinary tract, in addition to the pharynx and rectum and gives rise to the sexually transmitted disease gonorrhoea, with more than 106 million cases in 200820. Both gonococci and meningococci can exhibit either carriage states of prolonged colonisation in the host, or give rise to symptomatic disease with shorter durations of infection. N. meningitidis is usually carried asymptomatically in the host nasopharynx, with a minority of colonisations leading to invasive disease. Both carried and disease-causing infections of meningococci are relatively short (with invasive infections lasting 2–7 days21 and average carriage durations of 30 days22). The durations of asymptomatic and symptomatic gonococcal infections are generally longer than those caused by meningococci, with average durations of asymptomatic infection ranging from 3–12 and 3–6 months in men and women respectively and estimates of symptomatic infection of 3–45 days or 2–3 weeks in men and 2–30 days or 3–4 weeks in women (depending on the source of estimates provided)23,24 (Table 1). It is noteworthy, however, that the natural duration of symptomatic gonococcal infections would have been longer before antibiotics were introduced and gonorrhea was historically viewed as a chronic disease25,26.

Table 1 Estimates of the duration of symptomatic and asymptomatic infection with Neisseria meningitidis and Neisseria gonorrhoeae

Multiple opa loci are present in each genome, encoding adhesins that play a central role in attachment to and invasion of, host epithelium cells. These sequences are not only highly diverse on a population level, owing to high rates of recombination and gene conversion, but also exhibit flexible expression within individual infections27. Thus, they provide a unique opportunity to study the effects of selection by the immune system at both the population level and within individual isolates in two related pathogens with contrasting life histories. In addition, the Opa proteins have been shown to elicit bactericidal antibodies and are currently being considered as vaccine candidates against meningococcal infection28. Understanding the processes underlying the maintenance of diversity and structuring of the Opa proteins therefore has implications for the prospective design and evolutionary consequences of such vaccines.

The sequence diversity among Neisserial Opa proteins is primarily limited to two hypervariable (HV) regions, corresponding to two surface exposed loops that have been shown to interact with the host immune system29,30. Each opa locus is constitutively transcribed and protein expression is controlled by phase variation (due to insertions and deletions of pentanucleotide repeats in the leader coding sequence of each opa allele)31. The expression of different Opa proteins has been shown to vary during the course of gonococcal infection, suggesting that Opa antigenic variation could prolong infection through the avoidance of clearance by the humoral host immune response32,33. Within-host variation at the Opa loci has yet to be observed for meningococci, but the presence of mechanisms required for phase variation suggests that it is possible31.

Previously, we have shown that strong cross-immunity between hosts can structure the diversity of meningococcal Opa repertoires34 (where cross-immunity refers to the degree to which infection by one strain prevents successful infection by another as a result of broad-acting immune responses). Here, we extend this mathematical model to explain the differences in Opa repertoire structures that we observe between gonococci and meningococci and to examine the trade-offs faced by pathogens generally between maximising within-host fitness and competing on a population level for hosts. Despite their relatively recent shared evolutionary history, gonococci and meningococci have exploited divergent life strategies. Here we show that the contrasting structures of their Opa antigenic repertoires can be parsimoniously explained by a different balance of within- and between- host selection pressures conferred by the host immune response, mediated by different infectious periods.

Results

We examine the structure and diversity of published Opa repertoires of meningococcal and gonococcal isolates34,35 in the context of allelic genomic repertoire diversity. Meningococci contain 3–4 Opa loci36, whereas the Opa repertoires of gonococci are larger, comprising 11–12 loci37. Figure 1 shows that the structure and diversity of the Opa repertoires differ markedly between the two species, illustrating a comparison of the within-repertoire allelic diversity among Opa proteins. The meningococci frequently contain identical alleles at multiple Opa loci in comparison to gonococci, which show high levels of within-repertoire diversity and many isolates exhibiting unique Opa alleles across multiple loci34,35. These differences are not simply a function of the number of Opa loci present, but represent a qualitatively different pattern of diversity.

Figure 1
figure 1

The proportion of alleles across individual genome's Opa repertoires which are identical, among isolates expressing shared loci.

Red bars: N. gonorrhoeae (95 isolates); blue bars: N. meningitidis (64 isolates). Calculated using data taken from Bilek et al.35 and Callaghan et al.34. The schematic underneath the x axis is a conceptual representation of the proportion of alleles within a repertoire of four loci which are identical.

We developed a simple mathematical model to represent the idea that within-host antigenic diversity can prolong individual infections through antigenic variation, but that strains sharing antigenic alleles will be competing for hosts through herd immunity. The mathematical model was based on an extension of our previous framework34, in which two opa loci each comprised two HV regions, which were permitted to express one of two possible alleles (Figure 2a). In this framework, HV1 could express either “a” or “b” and HV2 could express either “x” or “y”, thereby creating nine different strains in total: ax, bx, ay, by, axy, bxy, abx, aby and abxy. No dose dependence was assumed (i.e. strains ax and axax were taken as immunologically identical) and immunological cross-immunity (referring to immune responses against antigenically similar strains) was included (Figure 2b).

Figure 2
figure 2

Overview of the model.

(a) Schematic diagram of strains included in the model. Each isolate has two opa loci, each with two hypervariable regions (HV1 and HV2). One of two possible alleles can be expressed at each Opa locus (a or b at HV1; x or y at HV2). It is assumed there are no dose-response effects; i.e. a strain with the genotype bxbx is considered identical to bx. (Diagram modified from Callaghan et al.34). All possible strains can be selected for in the model (i.e. strains do not become extinct, they simply fall to extremely low frequencies), to account for the possibility of recombination between strains. (b) The model assumes that strains are inhibited from infecting hosts co-infected with or immune to strains sharing antigenic determinants by the parameter γ (where γ = 1 confers complete cross-immunity). (c) Deterministic equations used in the model. zi and yi represent the proportion of the host population immune to and infected with strain i respectively; wi represents the proportion immune to any strain; σ confers the rate of loss of infectiousness of a strain; β represents a strain's transmissibility; ε confers the rate of loss of immunity; and μ confers the average host death rate. The force of infection (λ) of any strain is determined by the product of its transmissibility and its total prevalence in the infected population (i.e. λi = β*Yi).

To incorporate antigenic variation into the model, we assumed that increased Opa repertoire diversity was associated with longer durations of infection: strain abxy has a longer duration of infection than aby, which in turn has a longer duration of infection than ab. Thus, antigen repertoire diversity facilitated chronicity in the host, but also increased the probability of sharing antigenic alleles with other pathogen strains in the population. Waning host immunity was also incorporated into the framework (varying the rates of waning immunity had small effects on the overall patterns observed and are thus documented in more detail in the Supplementary Material; the results described here assume lifelong immunity unless otherwise specified). Our goal was to determine whether the simple within- versus between-host trade-offs imposed by allele-specific immunity could robustly explain the patterns of Opa repertoire diversity observed in both of these pathogens.

We can classify our model results broadly into those characterised by high or low reproduction numbers (Figures 3a and b, respectively). For pathogen populations with high transmission (R0) values, strong cross-immunity between hosts led to the stable emergence of strains characterised by a minimal set of non-overlapping alleles (strains ax and by), whereas low to moderate levels of cross-immunity led to the co-existence of all possible strains, consistent with the results of other theoretical frameworks15,16. Strongly non-overlapping patterns among antigenic repertoires have been observed in several bacterial populations, including a number of outer membrane proteins in meningococci (such as PorA, FetA and Opa2,3,34), as well as Group A Streptococci30. Here, strain axby cannot emerge since many hosts had cross-immunity to one or more of its antigenic determinants. We envision this scenario to reflect the pattern seen with the meningococcus and other short-lived and highly transmissible pathogens: low within-repertoire diversity but high diversity at the population level to maximise between-host fitness34.

Figure 3
figure 3

The effects of cross-immunity on strain frequencies at different R0s.

(a) R0 = 2 (β = 4, σ = 2); (b) R0 = 1.1 (β = 4, σ = 3.6). In (a), strain axby is lost from the population at higher values of cross-immunity; whereas at the lower R0 of 1.1, axby dominates the population at all levels of cross-immunity. The rate of increase in infectious period conferred to increasing antigenically diverse strains corresponds to (d) in Figure 4.

In contrast, for the scenario in which the R0 of the pathogen population is low (Figure 3b), strain axby had the highest prevalence over all levels of cross-immunity. To investigate the effects of the longer durations of infection facilitated by antigenically complex strains (axy, bxy, abx, aby, axby), as well as a larger range of R0 values, we compared the results of four distinct relationships between the duration of infection and the number of antigenic loci (Figure 4; see also Supplementary Material). As the relative fitness advantage to antigenically diverse strains decreased (i.e. moving from a to d in Figure 4), strain axby was less likely to dominate the population and the non-overlapping strains ax and by became more prevalent. These results were not qualitatively altered by waning immunity (see Supplementary Material).

Figure 4
figure 4

The effects of different relationships between increasing antigenic diversity and the increase in infectious period conferred.

As the infectious period advantage conferred to antigenically diverse strains decreases (moving from a to d), strain axby (light grey) is less likely to dominate the population. Even when the increase in infectious period is relatively shallow, axby can emerge at all values of R0 when cross-immunity is sufficiently low.

Oscillations between opposing sets of discordant antigenic types (in which non-overlapping strains ax and by cycled in prevalence over time with ay and bx) was observed over a similar amount of parameter space in all simulations with lifelong immunity (see Figure 5 for typical dynamics observed during antigenic cycling), but was observed less frequently as the period of immunity decreased (see Supplementary Material). Antigenic cycling has been observed in the PorA and FetA outer membrane proteins of N. meningitidis3,15, but not among gonococci. Indeed, the emergence of antigenic cycling at longer durations of immunity is consistent with the evidence that meningococci invoke longer-lasting immune responses than gonococci28,38,39. In summary, when transmission rates and herd immunity were low, strains expressing the largest and most diverse antigen repertoires dominated the population due to their superior fitness within hosts. We envision that the strains emerging in these areas of parameter space represent the gonococcus and other long-lived pathogens with lower transmission rates.

Figure 5
figure 5

The phenomenon of “antigenic cycling” between alternating sets of discordant strains (ax, by and ay, bx).

(β = 4, σ = 2, γ = 0.6).

Our model results are therefore consistent with the observed differences in within-repertoire Opa allelic diversity between meningococci and gonococci34,35 (shown in Figure 1), despite the simplicity of our assumptions. Meningococcal repertoires contain a much greater proportion of identical alleles in comparison to gonococcal repertoires, corresponding to higher R0 values and strong cross-immunity between hosts in our model. We have previously suggested34 that strong cross-immunity between strains on a population level can explain this low within-repertoire diversity in the meningococcus, consistent with our results (see Figure 4) and the data available on immune responses to meningococcal Opa antigens28. The results here suggest that within-host selection for antigenic variation in the meningococcus is not strong enough to counteract the strength of between-host selection. In contrast, the gonococcal repertoires showed few repeated Opa alleles within repertoires, consistent with our model when R0 is relatively low and/or when cross-immunity is weak and antigenic variation is an important driver of long-lived infections. For the gonococcus, therefore, within-host selection plays a key role in structuring antigen repertoires. Although the specificity and duration of immunity conferred by gonococcal Opa proteins is not well understood, with different studies yielding contrasting results38,39,40,41,42,43,44, we explored a wide range of rates of waning immunity to confirm that our model results were robust to this assumption (see Supplementary Material).

Discussion

While the effect of cross-immunity between hosts is well-established as a major selective force structuring the antigenic diversity of pathogen populations16,17,18,34,45,46, it is often impossible to directly compare pathogens with different life history strategies because of the vast differences in the structure, function and biology of their antigenic determinants. Here we have used the Opa antigen repertoires of ecologically distinct Neisseria species as a unique system to simultaneously explore the effects of within- and between-host cross-reactive immunity. Our model provides a simple and testable hypothesis to explain different patterns of diversity observed among meningococcal and gonococcal Opa repertoires: the balance of within-host and between-host immune selection pressures enhances repertoire diversity in the gonococcus and minimises it in the meningococcus. Our framework therefore expands beyond the theoretical frameworks that have investigated either the importance of maximising within-host duration of infection or maximising between-host transmission15,16,17, providing a single mathematical framework accommodating both components of pathogen fitness.

Mathematical models represent tools for generating hypotheses and exploring their implications; here we have purposefully chosen a highly simplified framework to show that these evolutionary forces alone can account for patterns of pathogen diversity. This does not preclude other biological mechanisms playing important roles in Opa diversity, however. Our model does not simulate the exact levels of diversity of Opa loci or alleles in meningococcal and gonococcal populations or the patterns of expression, basing the analysis instead on an abstraction from observations to date. As ongoing population genomic studies and long read sequencing platforms define opa diversity for Neisseria species, it will be important to incorporate these data to refine and test our model. Additionally, systematic study of opa expression under various contexts of infection – including the role of Opa+ gonococci in urethral infection33,47,48, resistance of Opa- gonococci to proteolytic enzymes and relation to sensitivity to hormonal levels47 and under differing levels of pyruvate49 – will present another avenue for future study. Furthermore, Opa proteins may subvert the immune system by means other than antigenic variation. There is evidence that gonococcal Opa proteins inhibit innate immune responses of epithelial cells50, in addition to adaptive B cell51 and T cell responses52. The suppression of host immunity by Opa proteins is consistent with the results of our model and these specific host-pathogen interactions may enhance the selection on Opa repertoires as described in our framework of antigen repertoire evolution.

Functional constraints may also contribute to the specific combinations of hypervariable regions expressed, since these regions affect receptor tropism53. As specific Opa variants mediate interactions with distinct host receptors, they may influence the tropism for epithelial, endothelial and phagocytic cells. It has thus been suggested that Opa diversity in gonococci enables the colonisation of a wider range of host sites54. Equally, the greater diversity of host sites colonised by gonococci compared to meningococci may also enhance antigenic repertoire size. Our model results are not inconsistent with this additional benefit of within-host diversity and suggest that these tropisms would be maintained as long as transmission rates were not sufficiently high to generate strong between-host immune selection. Additionally, this functional constraint is unlikely to account for the non-overlapping structures we observe.

Apart from N. gonorrhoeae and N. meningitidis, the Neisseria genus comprises several other principally commensal species, several of which also express Opa antigens, such as N.lactamica, N. sicca and N. perflava29,55,56. Interestingly, N. lactamica, which is common in infants, has only 1 to 2 Opa loci. According to our framework and the assumption that increased antigenic diversity prolongs infection, one could hypothesise that N. lactamica has a shorter duration of infection and higher R0 than N. meningitidis. This is also consistent with the theoretical prediction that pathogens with higher R0 values are associated with a lower average age of infection, but better estimates of carriage durations are required to test these predictions57. It has been conjectured that both pathogenic species descended from the same commensal common ancestor and that the gonococcus arose most recently from a clone that colonised the urogenital tract58. Under this scenario, the Opa repertoire has expanded and diversified over time, from 1–2 loci in commensals, to 3–4 in meningococci and 11 in gonococci. This expansion may reflect the differences in life histories among the Neisseria, with an increasing need for antigenic variation to sustain prolonged infection in the host.

Our model provides a simple explanation for the structure of antigen repertoires that relies only on the strength of cross-immunity and the frequency of transmission. Our model raises the testable hypothesis that short-lived pathogens manifest non-overlapping, simple antigenic repertoires to maximise between-host transmission fitness, whereas more complex antigenic repertoires are observed in long-lived infections to facilitate immune evasion. Our general framework predicts that such observations may be upheld across a variety of antigens in different pathogens and also highlights the evolutionary tension which cross-immunity exerts on pathogens: the trade-off between maximising between-host antigenic diversity on a population level and maximising within-host antigenic diversity within antigen repertoires.

Methods

Calculating Opa repertoire diversity

Opa allelic data for N. gonorrhoeae were taken from the isolates published by Bilek et al.35 and for N. meningitidis from the isolates presented by Callaghan et al.34. Only the unique Opa repertoires were included in order to avoid bias by the prevalence of particularly widespread and successful strains. First, unique Opa repertoires were identified and subsequently those isolates expressing shared alleles at a minimum of two loci were selected. Out of a total of 216 N. meningitidis isolates, 148 Opa profiles were unique and of these, 64 showed identical Opa alleles at two or more loci. Out of a total of 150 N. gonorrhoeae isolates, there were 138 unique Opa profiles and of these, 95 showed identical Opa alleles at two or more loci. For each Opa profile showing shared alleles, the percentage of expressed Opa alleles which were shared in the repertoire was calculated.

Mathematical model

The system can be described by three differential equations, based on a model by Gupta et al.16:

Where zi represents the proportion of the host population immune to strain i; wi represents the proportion immune to any strain; and yi represents the proportion currently infected with strain i. Further, σ confers the rate of loss of infectiousness of a strain (and therefore the average duration of infection is given by 1/σ); β represents transmissibility (a strain's likelihood of being transferred from an infected to a susceptible host); ε confers the rate of loss of immunity; and the average death rate within the host population is conferred by μ. It is assumed that all strains have the same transmissibility. The force of infection (λ) of any strain is determined by the product of its transmissibility and its total prevalence in the infected population (i.e. λi = β*Yi). The basic reproductive number, R0, (represented as the average number of secondary cases produced by one infectious case in a totally susceptible population) can be approximated to β/σi. Rather than include explicit recombination in the model, we simply allow all strains to circulate at all times even if they exist at very low frequencies. This can be seen as a way to incorporate recombination, since any combination of alleles can be selected for in the population.

It is assumed that upon infection the host enters the immune and infectious categories concurrently. Cross-immunity is controlled by γ: hosts that have been infected with a strain sharing alleles with i will become infectious with the probability (1 − γ) upon infection with strain i (i.e. when γ = 1, full cross-immunity operates between strains). The rate of loss of infectiousness is set to differ between strains and depends on the number of antigenic loci a strain exhibits. Three σ values control the dynamics: the value assigned to strains ax, ay, bx and by always exceeds that of strains axy, bxy, abx and aby, which always exceeds that of strain axby. The rates of increase in the 3 periods of duration of infection (1/σ) as a function of increasing strain antigenic diversity shown in Figure 4 are as follows.

  1. A

    The infectious period increases by 35% when the strain moves from 2 to 3 antigenic loci and by a further 10% when it exhibits 4 antigenic loci.

  2. B

    The infectious period increases by 22.5% per additional antigenic locus.

  3. C

    The infectious period increases by 10% when the strain moves from 2 to 3 antigenic loci and by a further 35% when it exhibits 4 antigenic loci.

  4. D

    The infectious period increases by 7.5% per additional antigenic locus.

Except where noted, the exact parameter values used were as follows: μ = 0.02; σ varied between 1 and 3.6; β = 4 (in order to investigate R0 values ranging from 1.1 to 4); ε varied between 0 and 365 (corresponding to periods of immunity of lifelong duration to 1 day, respectively). The periods of duration of infection, rates of loss of immunity and reproductive number are unfortunately poorly understood for both meningococci and gonococci, but the range of values used here are consistent with the estimates available in the literature22,28,38,39,40,41,42,43,44,59 (Table 1). The average duration of infection with gonococci is likely to lie closer to the longer asymptomatic estimates, as it is thought that asymptomatic women are responsible for 80–98% of the transmissions and asymptomatic men for 60–80% of the transmissions60.