Strains of the influenza virus form coherent global populations, yet exist at the level of single infections in individual hosts. The relationship between these scales is a critical topic for understanding viral evolution. Here we investigate the within-host relationship between selection and the stochastic effects of genetic drift, estimating an effective population size of infection N_{e} for influenza infection. Examining whole-genome sequence data describing a chronic case of influenza B in a severely immunocompromised child we infer an N_{e} of 2.5 × 10^{7} (95% confidence range 1.0 × 10^{7} to 9.0 × 10^{7}) suggesting that genetic drift is of minimal importance during an established influenza infection. Our result, supported by data from influenza A infection, suggests that positive selection during within-host infection is primarily limited by the typically short period of infection. Atypically long infections may have a disproportionate influence upon global patterns of viral evolution.

The evolution of the influenza virus may be considered across a broad range of scales. On a global level, populations exhibit coherent behaviour (

Despite the clear role for selection in global influenza populations, recent studies of within-host infection have suggested that positive selection does not strongly influence evolution at this smaller scale (

To resolve this issue, we evaluated the relative importance of selection and genetic drift during a case of influenza infection. The balance between these factors is determined by the effective size of the population, denoted N_{e}. If N_{e} is high, selection will outweigh genetic drift, even where differences in viral fitness are small (_{e} is low, less fit viruses are more likely to outcompete their fitter compatriots.

Estimating N_{e} is a difficult task, with a long history of method development in this area (_{e} may be calculated by matching the genetic change in allele frequencies in a population with the changes occurring in an idealised population evolving under genetic drift (_{e} not much greater than 100 (_{e} and selection exist, they are limited in considering only a few loci in linkage disequililbrium (_{e} in viral populations (_{e} is high, any signal of drift can be obscured by noise.

We here estimate a mean effective population size for an established within-host influenza B infection using data collected from a severely immunocompromised host. While the viral load of the infection was not unusual for a hospitalised childhood infection (_{e}. The large effective size we infer suggests that selection acts in an efficient manner during an established influenza infection. Even in more typical cases, the influence of positive selection is likely to be limited only by the duration of infection.

Viral samples were collected at 41 time points spanning 8 months during the course of an influenza B infection in a severely immunocompromised host (

(

(

(

Phylogenetic analysis of whole-genome viral consensus sequences showed the existence of non-trivial population structure, with at least two distinct clades emerging over time (^{th} sample is intermediate between the initial and final samples collected (

To estimate the effective population size, we analysed genome-wide sequence data from samples in clade A collected before first use of favipiravir. A method of linear regression was used to quantify the rate of viral evolution, measuring the genetic distance between samples as a function of increasing time between dates of sample collection. We inferred a rate equivalent to 0.051 substitutions per day (97.5% confidence interval 0.034 to 0.068) (

(_{e}. The dashed black line shows the rate of evolution of the real population; gray shading shows a 97.5% confidence interval for this statistic. (_{e} for clade B. The results of simulations shown here are identical to those in part B of the figure.

(

The consensus glutamate nucleotide (blue) was sometimes replaced by glycine (green), valine (yellow), and alanine (red). Glycine and alanine are associated with zanamivir resistance in influenza B.

(

Data are given according to the interval in time, measured in whole days between samples.

Patients are denoted with the letters assigned them in the original study (_{e}.

Equivalent distances for a single generation generated from simulated data at different effective population sizes are also provided. The calculated equivalent distance per generation from the sequence data is also provided.

Allele frequencies from across the genome are sorted and shown on a log scale.

Only non-zero frequencies are reported. These allele frequencies were processed using a statistical method for removing false positive variant calls as a precursor step within the Wright-Fisher simulation.

Samples in this dataset were split following RNA extraction with replicate sets of RNA being processed and sequenced independently. Variants at higher frequencies were identified at more consistent frequencies than variants at lower frequencies.

V indicates the identification of a variant, while X indicates the non-identification of a variant. Combinations of V and X indicate observations made in two replicate samples.

While high frequency variants were very reliably identified, the reliability of identifying variants was significantly impaired at lower frequencies.

A simulation based analysis, measuring the extent of evolution in idealised Wright-Fisher populations (^{7} (95% confidence range 1.0 × 10^{7} to 9.0 × 10^{7}) for viruses in clade A before the use of favipiravir (^{6}, (95% confidence range 4 × 10^{5} to 2 × 10^{8}) perhaps reflecting the less frequent observation of samples in that clade (

Our value of N_{e} is representative of the population after the initial establishment of infection; the initial expansion of the viral population was not represented in our data. Population structure during the infection might have lowered the value we obtain (

Our method equates change in a population with genetic drift (_{e}. While viral evolution was generally not driven by selection (

The dataset we considered is particularly suited to our calculation. The long period of infection combined with frequent sampling allowed for the characterisation of a slow rate of evolution amidst population structure and noise in the data. Further, the absence of strong selection reduced the error in our inference approach, which assumed an idealised neutral population. To provide further validation we repeated our approach on data describing long-term influenza A/H3N2 infection in four immunocompromised adults (_{e} we obtained, of between 3 × 10^{5} and 1 × 10^{6} (

We believe that our study provides a first realistic estimate of within-host effective population size for severe influenza infection in humans. The viral load in the influenza B case was high, representative of hospitalised cases of childhood influenza infection. However, the magnitude of our inferred effective size, of order 10^{7}, suggests that selection will predominate over drift even in more typical cases. Mean CT values for influenza in non-hospitalised children have been reported as around 10 units lower than those for hospitalised cases (^{4} in such cases. Such a value again reflects an established population, not accounting for the initial population bottleneck. It has the implication that the evolution of a measurable variant (i.e. at a frequency of 1% or above) will be dominated by selection of a magnitude of 1% or greater per generation (

Our result supports the idea that a tight transmission bottleneck (

Our result highlights the potential importance of longer infections in the adaptation of global influenza populations, particularly where some adaptive immune response remains. A newly emergent variant under strong positive selection increases faster than linearly in frequency (_{e}, implying efficient selection, additional days of infection will have a disproportionate influence upon the potential transmission of adaptive variants. This does not imply that longer infections are the sole driving force behind global viral adaptation; selective effects affecting viral transmissibility (

In a single-locus haploid system, the expected change in a variant allele with frequency q caused by genetic drift is given by the formula (

This fact has been exploited to evaluate the size of transmission bottlenecks in influenza infection, comparing statistics of genome sequence data collected before and after a transmission event (_{e}. By means of evolutionary simulations we estimate N_{e} for cases of within-host influenza infection.

Sequence data describing the evolution of the infection was generated as part of a previous study (

Short-read data were aligned first to a broad set of influenza sequences. Sequences from this set to which the highest number of reads aligned were identified and used to carry out a second short-read alignment. The SAMFIRE software package was then used to filter the short-read data with a PHRED score cutoff of 30, to identify consensus sequences, and to calculate the number of each nucleotide found at each position in the genome. SAMFIRE is available from

Variant frequencies at different time points during infection were used to calculate a rate of change in the population over time. We define _{i}

Sequence distances for non-synonymous and synonymous mutations were calculated in a similar manner, with the exception that distances were calculated over individual nucleotides rather than in a per-locus manner. We calculated_{N,i} and A_{S,i} are the sets of nucleotides a and positions i in the genome which respectively induce non-synonymous and synonymous changes in the consensus sequence. Synonymous and non-synonymous variants were identified with respect to influenza B protein sequences; a nucleotide substitution was defined as being non-synonymous if it induced a change in the coded protein in at least one viral protein sequence. By contrast to our primary distance measurement, values for synonymous and non-synonymous sites were calculated as mean distances per nucleotide, reflecting the differing numbers of each type of potential substitution in the viral genome.

We converted our measurements of sequence distance into an estimate of N_{e} by means of a simplified evolutionary model, assuming that all of the change in the population results from genetic drift. We first note the effect of error in measurements of the population upon our distance metric.

We suppose that at the time t, we make the observation:_{i} are locus-specific errors in the measurement of allele frequencies; we write this equation in the form:

Here, given only two error-prone samples from a system, separation of the real population distance and the error term is impossible. However, given multiple samples, an approximate separation can be made. We here use linear regression to fit a model to the observed distances, fitting the model:_{e} is constant, and if the distribution of allele frequencies does not change over time. In our data, the consensus population declines approximately eight-fold (_{e} for each clade. We note that large deviations from our model assumptions can be qualitatively identified by a poor fit between a simple regression model and the data.

Linear regression was performed using the Mathematica 11 software package, using the same package to calculate a 97.5% confidence interval for the calculated gradient, k.

We next approximated the behaviour of our system using a Wright-Fisher model, re-writing the first component of

Here ΔD is a stochastic function describing the change in the population, measured according to the metric D, that arises from a single generation of genetic drift in a population with effective size N_{e} and initial allele frequencies q(t_{1}). Regarding these allele frequencies we note that the distribution of minor allele frequencies across the genome was reasonably constant between samples for which a good read depth was achieved (_{1}).

Our Wright-Fisher model simulated the evolution of the viral population for a single generation. Rates of evolution calculated from the sequence data were rates of change per day whereas a Wright-Fisher simulation gives an estimated rate of evolution per generation. We therefore scaled the former to match the experimentally ascertained estimate of 10 hr per generation for influenza B (

To conduct a simulation we constructed a population of N viruses. Each simulated virus had a genome comprised of eight segments, each identical in length to the corresponding segment of the influenza B virus sampled from the patient. Observations from the clinical viral population were used to specify the genetic composition of the viral population at the beginning of the simulation. A simulated population of viral genomes was established. For each viral segment, a clinical sample was chosen at random. Nucleotide frequencies at each locus in the clinical sample (modified as described below) were used to generate a multinomial sample of viruses from the simulated population, assigning alleles to viruses in the simulated population according to the random sample. This step was repeated for each locus in the segment, with no intrinsic association between alleles at different loci. The sample collected on 30th November 2017 was excluded as a starting point from this analysis due to its low read depth; all other samples had a mean read depth in excess of 2000-fold coverage.

Simulation of the population was conducted at the genome-wide level. We simulated a single generation of the evolution of our population under genetic drift, generating a random sample of N whole viral genomes from the population. Intra-segment recombination was assumed to be negligible (

For each population size tested, our simulation was run 400 times, using the data to produce a 97.5% confidence interval for the extent of evolutionary change at a given effective population size. For each of these 400 replicate simulations, an independent random set of samples was chosen to initiate each of the eight simulated viral segments. The extent of evolution of the real population was compared to the results from our simulated populations, giving an inference of the effective size of the viral population.

Amendments were made to the above approach.

The evolutionary distance ΔD(N,q(t_{1})) calculated by our method is dependent upon the vector of allele frequencies q. Given a greater number of polymorphic alleles in a system, the evolutionary distance, calculated as the sum of allele frequency changes, will also increase. While the experimental pipeline we used has been shown to perform well in capturing within-host viral diversity (

Considering the real viral sample, we note that at any given genetic locus, a minority variant either exists or does not exist according to some well-defined criterion. (For the moment the way in which variation is defined is not important; methods for defining variation, which include the use of a frequency threshold, are discussed later.) We denote the possible states of a locus as P and N, according to whether the locus is positive or negative for variation. We suppose that the probability that a random locus in the genome has a minority variant is given by P_{P}, leading to the equivalent statistic P_{N} = 1- P_{P}.

Sequencing of a specific position in the genome results in the observation or non-observation of a variant. In our data we have sets of two replicate observations of each position in the genome, giving for each minority variant the possible outcomes VV, VX, XV, and XX, where V corresponds to the observation of a variant, and X corresponds to the non-observation of a variant. These observations contain errors; we denote the true positive, false positive, true negative and false negative rates of the variant identification process by P_{V|P}, P_{V|N}, P_{X|N}, and P_{X|P} respectively. In this notation, V|P indicates the observation of a variant conditional on the variant being a true positive.

The underlying purpose of our calculation is to remove falsely detected variation from the population. We begin by assuming that the false negative rate of detecting variants is equal to zero. That is, where we do not see a variant in the sequence data, we assume that a variant is never actually present. This is a conservative step in so far as we never add unobserved variation to the population. Our assumption gives the result that the false negative rate, P_{X|P} = 0. In so far that a variant is never unobserved it follows that the true positive rate P_{V|P} = 1.

We may now construct expressions for the probabilities of observing each of the four possible outcomes. Noting that P_{V|N} + P_{X|N} = 1 we obtain

Thus the outcome probabilities may be expressed in terms of the underlying probability of a position having a variant, P_{P}, and the false positive rate P_{V|N}.

We next processed our sequence replicate data, considering only sites that were sequenced to a read depth of at least 2000-fold coverage. For each locus in a dataset, we calculated the observed frequency of each of the nucleotides A, C, G, and T, generating pairs which described these frequencies in each of our two replicate datasets. Removing pairs in which an allele has a frequency of more than 0.5 in either of the two datasets, we obtained a list of minority variants from each locus, generally comprising three allele frequency pairs per locus. If it is correct that two of the three minority alleles have very low frequencies, the frequencies are close to being statistically independent; the existence of a very few alleles of one minority type does not greatly affect the probability of another variant allele being observed in another read. We note that, of the more than 73 thousand sites sequenced, only 56, fewer than 0.1%, had more than one minority variant at a frequency greater than 1%. We proceeded on the assumption that each pair of minority frequencies was statistically independent of the others.

From the repeated observations of sites, we may count the number of observations of each of the four outcomes; given a total of N pairs we denote these as N_{VV}, N_{VX}, N_{XV}, and N_{XX}. Under our model of independent pairs we constructed the multinomial log likelihood of the underlying variant and false positive rates._{ab} are constructed from P_{P} and P_{V|N} according to the equations above.

Given a set of paired observations, we calculated the maximum likelihood values of P_{P} and P_{V|N}. From these statistics we are able to calculate the positive predictive value of sequencing, namely the proportion of observed variants that are true positives. This is achieved by dividing the probability that a true positive was detected (equal to the number of true positives as P_{V|P} = 1), by the probability that a variant was detected:

Within our data, our expectation was that minority variants at higher allele frequencies would be more likely to be observed as variants in both replicate samples. We note that, where a frequency cutoff is applied to identify variants, care is required in the above protocol. For example, if a hard threshold was applied, in which variants were called at 1% frequency, a variant that was detected at frequencies of 1.01% and 0.99% would be regarded as having been observed in one case, and not observed in the other, although it likely represents a consistent observation.

In order to assess the frequency dependence of our true positive rate, we defined minimum and maximum variant frequency thresholds q^{min} and q^{max}, and denoted the replicate observations of a minority variant frequency as q^{A} and q^{B} in the two samples. We further defined the frequency q^{cut} according to the formula:

We then defined regions of frequency space as follows:

These inequalities are illustrated in

In the above, q^{cut} functions to slightly harshen the criteria for detecting variants at low frequencies. If a variant is observed in one sample at frequency greater than q^{min}, then if q^{min} is greater than 0.2%, the frequency in the second sample had to be at least half q^{min} to be counted. If q^{min} was between 0.1% and 0.2%, the frequency in the second sample had to be at least 0.1%, while if q^{min} was less than 0.1%, the frequency in the second sample had to be at least q^{min}.

For different ranges of frequency values, q^{min} and q^{max}, the proportion of observed variants that were true positives was calculated according to the maximum likelihood method above, using these categorisations. Results are shown in

To account for our neglect of mutation, a frequency cutoff was applied to our simulation data. Under a pure process of genetic drift, low-frequency variants in our population are likely to die out, reaching a frequency of zero. In a real population, this would not occur, variants being sustained at low frequencies by a balance of mutation and purifying selection (_{e}.

Confidence intervals for the effective population size were calculated as the overlap of 97.5% confidence intervals for the evolutionary rates in the observed data, calculated from the regression for the real data, and estimated from the simulated statistics. The overlap of these values gives an approximate 95% confidence interval for N_{e}.

A number of choices were made in our estimation of an effective population size. The effects of each of these choices were explored through further calculation and simulation. Results are shown in

In the calculation to set up an initial viral population, the assignment of minority alleles to sequences becomes slow at large population sizes. Our code simulated viral genomes; a variant allele was included into the population by choosing an appropriate proportion of genomes to which the variant was assigned. For greater computational efficiency we used a pseudo-random approach for choosing genomes. Given a population size N, we generated a set P of prime numbers that were each larger than N. Given some desired allele frequency q we wish to choose qN genomes to which to assign the variant. We therefore calculated the set of numbers:^{k} (where k is an integer between one and p-1) form a pseudorandom permutation of the numbers from one to p-1. We constructed a set of qN genomes by choosing genomes indexed in turn by the elements of this set, beginning from k = 1, and discarding values greater than N.

To achieve calculations for population sizes larger than 10^{7} we implemented a statistical averaging method. We generated a single population of size 10^{6}, then generated 200 outcomes of a single generation of the same size, recording allele frequencies in each case. In order to simulate a value of N of size r x 10^{6} we compared the frequencies of the initial population to the mean frequencies of a random set of r outcomes. This is equivalent of simulating transmission from a population of size r x 10^{6} in which the initial population contains r copies of each of one of 10^{6} genotypes.

Consensus sequences of data were analysed using the BEAST2 software package (

Haplotype reconstruction was performed using multi-locus polymorphism data generated by the SAMFIRE software package (_{i}

Here the parameter C describes the extent of noise in the sequence data, a lower value indicating a lower confidence in the sequence data. Haplotype reconstruction was performed by finding the maximum likelihood value of the vector of haplotype frequencies

Our analysis of data describing long-term influenza A/H3N2 infection was performed on data from a previous study (_{e}. We note that the estimates of false positive rate generated for the influenza B data were applied equally in this case, due to not having equivalent data to re-estimate these values. Examining the data from patient W, our distance measurements suggested potential population structure involving the samples collected on days 62 and 69; these samples were excluded from our regression analysis.

No competing interests declared

Data curation, Software, Formal analysis, Validation, Investigation, Methodology, Writing - review and editing

Formal analysis, Investigation, Methodology, Writing - review and editing

Resources, Project administration, Writing - review and editing

Conceptualization, Resources, Data curation, Software, Formal analysis, Supervision, Funding acquisition, Validation, Investigation, Visualization, Methodology, Writing - original draft, Project administration, Writing - review and editing

A generated under different modelling assumptions.

All sequence data is taken from previous publications, and is available from the Sequence Read Archive. Where this is sensible, raw data underlying figures has been made available in files which accompany this document.

The following previously published datasets were used:

In the interests of transparency, eLife publishes the most substantive revision requests and the accompanying author responses.

The manuscript assesses the intra-host effective population size of influenza based on longitudinal deep sequencing data from a chronic influenza B infection. Using principles modeling and statistical approaches, the authors show that the short length of a typical influenza infection is the key limiting factor upon selection at the within-host level. The topic is important, as it sheds light on the interplay between the two scales of selection within- and between-host in shaping the evolution of influenza virus.

Thank you for submitting your article "A large effective population size for within-host influenza virus infection" for consideration by

The reviewers have discussed the reviews with one another and the Reviewing Editor has drafted this decision to help you prepare a revised submission.

We would like to draw your attention to changes in our revision policy that we have made in response to COVID-19 (https://elifesciences.org/articles/57162). Specifically, we are asking editors to accept without delay manuscripts, like yours, that they judge can stand as

Summary:

The manuscript presents a study on within-host population genetics of influenza virus and in particular, inference of effective population size during chronic infection in immunocompromised patients. The topic is important as it explores the interplay between the two scales of selection: within-host and between-host selection that shape the evolution of influenza. Based on the analysis of sequence polymorphism, authors infer a relatively large effective population size ~10^{7} during chronic infection, in contrast to previously inferred values of ~10^{2} or less during transmission and in acute infections. All of the reviewers agree that the findings in this manuscript are interesting and a large effective population would have significant implications for efficacy of selection during within-host evolution of influenza. However, there are still some concerns regarding methodology, interpretation and presentation of the results which we would like to see addressed.

Essential revisions:

1) Comparison between chronic and acute infections:

The authors analyzed data from chronic influenza infections and concluded that the effective population size of the virus is high, including during acute infections. For instance, the authors argue that "the observed lack of within-host variation in typical cases of influenza can be explained by the short period of infection; the stochastic effects of genetic drift do not limit the impact of positive selection". It is however not evident that the authors' estimates of effective population size from chronic infections apply to acute infections given the exponential increase and decrease of viral load that dominate the course of acute infections. In fact, it's not clear that effective population size is even a very useful concept in this case.

Also, McCrone et al., 2018, and Xue and Bloom, 2020, have both shown that within-host variation in acute infections is dominated by non-synonymous mutations, and Xue and Bloom, 2020, also document stop-codon mutations within acute infections that are rarely found at appreciable frequencies in chronic infections. These observations suggest that selection is inefficient within hosts in acute infections, contrary to the authors' claims.

Moreover, McCrone et al. see radical changes in variant frequencies over the course of a few days (Figure 2E in that work) – but lineages in chronic infections (this work) persist for many months. If the authors think that N_{e} is comparable between acute and chronic infections, how do they explain the lack of diversity observed in acute infections? One way to explain this is to maintain a high N_{e} but with strong transmission bottleneck to impose stochasticity. But as point out above, "N_{e}" is really not a well-defined quantity in this case. Alternatively, could the difference imply a lower census size in acute infections, and if so, is this consistent with differences in viral load? This issue is important in view of the proposed relevance of high N_{e} for long-term influenza evolution (e.g., last phrase of the Abstract and the last phrase of the Introduction).

Overall, the authors should acknowledge the differences between acute and chronic infections, and discuss their estimates in light of the previous observations. Moreover, it may also be helpful to revise the title to indicate that the manuscript focuses on chronic infections.

2) High N_{e} is inferred from small drift and a small rate of "substitutions" (which under the authors' terminology also account for minor changes in allele frequencies). In other words, the authors are inferring a large N_{e} based on the longer-term coexistence of multiple lineages within a host. Therefore, it would be important that the manuscript also discusses alternative explanations that could lead to such patterns of polymorphism. Importantly, as N_{e} in the manuscript is inferred from a Wright-Fisher (WF) model, violations in the underlying assumptions of the model can bias the results. For example, one can imagine that demographic effects like population structure could be responsible for long-term coexistence and survival of lineages, e.g., if each of the samples represents a mixture of persistent subpopulations? The authors seem to suggest this by analyzing clades A and B separately, Results and Discussion, second paragraph. Alternatively, could balancing selection in the host be responsible for maintaining this polymorphism (seems unlikely, but still a formal possibility)? A discussion and/or analysis of such alternative scenarios would be useful in assessing the robustness of the manuscript's findings.

3) Robustness of the analysis and proposed statistics:

a) It would be useful to have a clearer sense of the sensitivity of N_{e} to the cutoffs used. While a lot of care has gone into the choice, some diagrams showing the sensitivity of N_{e} to cutoff choice would better demonstrate the degree to which it is a function of low frequency variants in a straightforward way.

b) To estimate how N_{e} affects changes in allele frequencies, the authors simulate a single generation of Wright-Fisher evolution using initial allele frequencies from a randomly selected sample from the infection. As the equation in the subsection “Summary” indicates, populations with high-frequency alleles will experience larger changes in allele frequency at a given effective population size, so the initial distribution of allele frequencies from this randomly chosen sample can have a major effect on the expected change in allele frequencies. The authors show in Figure 2—figure supplement 1 that mutations can reach frequencies of 20-30% in neuraminidase, and in the influenza A patients analyzed in Figure 2—figure supplement 3, many mutations reach these and even higher frequencies, particularly at later points in the infection. The authors should run their Wright-Fisher simulations with different initial allele frequencies to evaluate how this choice of allele frequencies may affect estimates of effective population size.

c) The authors design statistic D to assess their estimation of N_{e}. This statistic is a sum of changes in variant frequencies across sites (subsection “Calculation of evolutionary rates”), which is then compared between data and Wright-Fisher simulations for different N_{e} values. The authors seem to suggest that D should be more robust to noise (subsection “Summary”), without providing any evidence. In particular, the authors should clearly state how the assumptions they made about recombination structure in WF simulation could impact the statistics D and the interpretation of the inferred N_{e}. From the manuscript it is not clear whether WF simulations are done at the site-wise, segment-wise, or genome-wise level, which would impact the correlation between changes in variant frequencies. For example, simulations done with high (free) recombination would expect a lower variance D compared to the case with strong linkage (data), for the same N_{e}. These points should be better clarified.

4) In Figure 1A, it is clear (and the authors also mention) that the patient's viral load drops to undetectable levels for over a month of the infection, and viral load also varies substantially while the patient is continually infected. Effective population size and census population size are not always directly related, but the authors should discuss how changing population sizes affect their estimate of effective population size and whether a single effective population size is adequate to represent the infection.

5) The authors calculate sequence distance between every pair of sequenced timepoints to reduce the influence of noise from sequencing error, but as a result, the points in Figure 2A are non-independent and may contribute to a tighter confidence interval around the evolutionary rate than is realistic. In particular, changes in variant frequencies that take place during the middle of the infection will be overcounted in these pairs and will disproportionately influence the overall estimate of evolutionary rates. When the authors estimate the evolutionary distance between consecutive timepoints and divide by the number of days between them, how well does the estimate correspond to the estimates in Figure 2? What is the variance in these estimates?

6) The regression performed in Figure 2A, C, and analogous figures may be especially influenced by the few points at the right end of the distribution, which represent evolutionary distances between points spaced further apart in time. How robust is the estimate of evolutionary rate to removal of these points, or by calculation of evolutionary rate as suggested in comment 4?

7) The authors chose to infer effective population size using variants and haplotypes on the neuraminidase and hemagglutinin segments. This is an odd choice since these regions tend to experience the strongest selection, which can strongly influence the estimates of effective population size. Selection can act on linked haplotypes across the genome in some cases, but have the authors tested to see if these results hold for other gene segments as well?

8) Why are the effective population size estimates for the clade B samples calculated separately from the clade A samples? It's not evident from the SAMFIRE inference of haplotypes that clades A and B constitute separate subpopulations; it seems that they could be distinct genotypes in a well-mixed population as well, as might result from a coinfection.

9) The authors assume the generation time of 10 hours per generation for influenza B. However, if generations are longer in immunocompromised individuals, the analysis would lead to an overestimation of N_{e}. Given that the main result in this manuscript is that N_{e} is high, this possibility should at least be discussed.

Essential revisions:

1) Comparison between chronic and acute infections:

The authors analyzed data from chronic influenza infections and concluded that the effective population size of the virus is high, including during acute infections. For instance, the authors argue that "the observed lack of within-host variation in typical cases of influenza can be explained by the short period of infection; the stochastic effects of genetic drift do not limit the impact of positive selection". It is however not evident that the authors' estimates of effective population size from chronic infections apply to acute infections given the exponential increase and decrease of viral load that dominate the course of acute infections. In fact, it's not clear that effective population size is even a very useful concept in this case.

Also, McCrone et al., 2018, and Xue and Bloom, 2020, have both shown that within-host variation in acute infections is dominated by non-synonymous mutations, and Xue and Bloom, 2020, also document stop-codon mutations within acute infections that are rarely found at appreciable frequencies in chronic infections. These observations suggest that selection is inefficient within hosts in acute infections, contrary to the authors' claims.

Moreover, McCrone et al. see radical changes in variant frequencies over the course of a few days (Figure 2E in that work) – but lineages in chronic infections (this work) persist for many months. If the authors think that N_{e} is comparable between acute and chronic infections, how do they explain the lack of diversity observed in acute infections? One way to explain this is to maintain a high N_{e} but with strong transmission bottleneck to impose stochasticity. But as point out above, "N_{e}" is really not a well-defined quantity in this case. Alternatively, could the difference imply a lower census size in acute infections, and if so, is this consistent with differences in viral load? This issue is important in view of the proposed relevance of high N_{e} for long-term influenza evolution (e.g., last phrase of the Abstract and the last phrase of the Introduction).

Overall, the authors should acknowledge the differences between acute and chronic infections, and discuss their estimates in light of the previous observations. Moreover, it may also be helpful to revise the title to indicate that the manuscript focuses on chronic infections.

We acknowledge that it is important to relate our result, derived from an unusual case of infection, to more regular cases of influenza in humans. We first note that what is meant in our case by the effective population size is that statistic as it relates to an established influenza infection; our data do not describe the initial founding and growth of the viral infection.

Our primary point of reference to regular influenza infection comes via measurements of CT score relating to viral infection. Our reference on this suggests about 10 fewer units of CT, or close to a 1000-fold numerical drop in census population size, in non-hospitalised, as opposed to hospitalised childhood cases. We now include the very rough calculation that this would suggest an N_{e} of around 10^{4} for such cases, cautioning that this is for an established infection, after the initial period of expansion from the transmission bottleneck.

We believe our consideration of an established population to match that of other studies of data from within-host influenza infection; in order for data to be collected from such infections, the viral population must be of some minimal consensus size. Noting that the threshold frequency at which the effect of selection outweighs that of drift is 1/N_{e}s, we believe that within the window for which data can be collected, selection of 1% or greater per generation will dominate drift at an allele frequency of 1% or more. In this sense genetic drift does not limit positive selection.

On previous findings we do not completely recognise the statement that within-host variation in acute infections is dominated by non-synonymous mutations. If a simple count of variants is made, the majority will likely be non-synonymous, however this reflects a fact that the large majority of possible variants are non-synonymous for at least one viral protein. McCrone et al. state that their data, ‘suggest significant purifying selection within hosts’ while Xue and Bloom state that ‘synonymous mutations accumulate about twice as quickly as nonsynonymous mutations within hosts’. Synonymous mutations are relatively more common than nonsynonymous mutations at low frequencies, consistent with purifying selection.

We are not fully convinced that stop mutations are lethal in the traditional sense due to the nature of the influenza virus; the genome encapsulated within a virus (i.e. encoded in the RNA within a set of viral proteins) is not necessarily the same genome that was translated to produce the proteins. As such the observation of stop mutations at very low frequencies is not entirely inconsistent with efficient purifying selection. We are not aware of a great deal of work looking at stop mutations in chronic influenza infection, however the presence of purifying selection would again explain such a lack.

While we greatly admire the work of McCrone et al., we are not convinced that the within-host changes in allele frequency that they observe are caused purely by genetic drift. Selection, population structure, and rare sequencing error could all contribute to the changes observed, and the data described in that paper, with two samples collected from each individual, do not allow for discrimination between drift and these other factors. In our case, where we have multiple samples from a host, we observe both large differences between individual samples (in common with McCrone) but also an underlying pattern that suggests a large within-host population size. Previous data describing within-host evolution does not contradict our result.

We have revised the title to, ‘A large effective population size for established influenza infection’. This recognises that our inference neglects the initial phase of viral growth, which may arise from a single particle. While we cannot with our method directly evaluate N_{e} for acute infections, we believe that an argument based on CT values carries some weight when applied to these cases.

2) High N_{e} is inferred from small drift and a small rate of "substitutions" (which under the authors' terminology also account for minor changes in allele frequencies). In other words, the authors are inferring a large N_{e} based on the longer-term coexistence of multiple lineages within a host. Therefore, it would be important that the manuscript also discusses alternative explanations that could lead to such patterns of polymorphism. Importantly, as N_{e} in the manuscript is inferred from a Wright-Fisher (WF) model, violations in the underlying assumptions of the model can bias the results. For example, one can imagine that demographic effects like population structure could be responsible for long-term coexistence and survival of lineages, e.g., if each of the samples represents a mixture of persistent subpopulations? The authors seem to suggest this by analyzing clades A and B separately, Results and Discussion, second paragraph. Alternatively, could balancing selection in the host be responsible for maintaining this polymorphism (seems unlikely, but still a formal possibility)? A discussion and/or analysis of such alternative scenarios would be useful in assessing the robustness of the manuscript's findings.

For additional clarity we note that our rate is equivalent to a number of substitutions per day.

Rather than the coexistence of multiple lineages we infer a rate of N_{e} based upon the rate of change within (primarily clade A) of the viral population. Multiple lineages are not required in the sense that there could be a fully well-mixed population and we could still infer N_{e} using our method. Explicitly, we derive a rate of change in the viral population, measured across multiple samples, and identify a Wright-Fisher population which under genetic drift matches this rate of change.

We have added a few words to clarify the cladal structure of the population. We believe that the infection is founded by a single viral population (as opposed to co-infection) and that subsequently there is a branching event, so that clades A and B become spatially separated in the host and evolve independently of one another. Our guess is that the less-frequently observed clade B includes a smaller number of viruses, and so evolves faster under genetic drift.

We note two possible deviations from our Wright-Fisher model. Firstly, population structure going beyond the simple cladal structure we observe would lead to a reduction in the value of N_{e}; we cite Whitlock and Barton on this point. Such population structure would alter the value we derive i.e. it will decrease N_{e} relative to a well-mixed population, leading to an increase in the rate of change of the population that our model will detect. Regarding population structure, we note that a non-well-mixed population could lead to non-representative sampling of the population and thereby increased distances between individual samples; this effect is included in our ‘error’ terminology in the method.

Secondly, we note the potential for selection to shape the population, noting the emergence of zanamivir resistance. Such selection would not be accounted for in our model i.e. to the extent that it is present it would increase the rate of change of the population that we will detect, but will attribute to a lower N_{e}. In this sense the presence of positive selection would lead us to underestimate N_{e}. Purifying selection is difficult to model; within the Wright-Fisher framework all selection is identical in leading to changes in allele frequencies with time. This has the consequence that as N_{e} becomes high the change in the population does not tend to zero. We note that there will be effects other than genetic drift affecting the population, and stick to our definition that our effective population size is the size at which an idealised population evolving under drift matches the behaviour of our data.

3) Robustness of the analysis and proposed statistics:

a) It would be useful to have a clearer sense of the sensitivity of N_{e} to the cutoffs used. While a lot of care has gone into the choice, some diagrams showing the sensitivity of N_{e} to cutoff choice would better demonstrate the degree to which it is a function of low frequency variants in a straightforward way.

We have made two significant cutoffs in our method. The first is to remove what we believe to be false positive variant calls in the sequence data, while the second is to impose a hard cut of 0.1% allele frequency when making our calculation of distance. To evaluate these we have rerun our calculations in a way that removes each of these in turn; we find that the resulting change in N_{e} is not greatly changed by either of these. We have added Supplementary file 1 which contains inferences for calculations run with parameters other than the default parameters.

b) To estimate how N_{e} affects changes in allele frequencies, the authors simulate a single generation of Wright-Fisher evolution using initial allele frequencies from a randomly selected sample from the infection. As the equation in the subsection “Summary” indicates, populations with high-frequency alleles will experience larger changes in allele frequency at a given effective population size, so the initial distribution of allele frequencies from this randomly chosen sample can have a major effect on the expected change in allele frequencies. The authors show in Figure 2—figure supplement 1 that mutations can reach frequencies of 20-30% in neuraminidase, and in the influenza A patients analyzed in Figure 2—figure supplement 3, many mutations reach these and even higher frequencies, particularly at later points in the infection. The authors should run their Wright-Fisher simulations with different initial allele frequencies to evaluate how this choice of allele frequencies may affect estimates of effective population size.

The reviewers are correct that the allele frequencies used to initiate the Wright-Fisher model may affect the inferred effective population size. When we calculated replicate simulated populations we accounted for this; in each of the replicate simulations a random sample from the population was chosen to provide the allele frequencies for each segment of the simulated population. The uncertainty bars in our calculations therefore incorporate the uncertainty intrinsic to the initial choice of allele frequencies.

c) The authors design statistic D to assess their estimation of N_{e}. This statistic is a sum of changes in variant frequencies across sites (subsection “Calculation of evolutionary rates”), which is then compared between data and Wright-Fisher simulations for different N_{e} values. The authors seem to suggest that D should be more robust to noise (subsection “Summary”), without providing any evidence. In particular, the authors should clearly state how the assumptions they made about recombination structure in WF simulation could impact the statistics D and the interpretation of the inferred N_{e}. From the manuscript it is not clear whether WF simulations are done at the site-wise, segment-wise, or genome-wise level, which would impact the correlation between changes in variant frequencies. For example, simulations done with high (free) recombination would expect a lower variance D compared to the case with strong linkage (data), for the same N_{e}. These points should be better clarified.

We have now incorporated further explanation into the Materials and methods, describing in a more formal manner how our statistic works and why it is more robust than a simple distance metric based upon pairs of samples from a population. We have clarified that our WF simulations were done at the genome-wise level. Based on prior evidence from human infection, simulations assumed an absence of intra-segment recombination or of reassortment between segments; this is now more clearly stated.

4) In Figure 1A, it is clear (and the authors also mention) that the patient's viral load drops to undetectable levels for over a month of the infection, and viral load also varies substantially while the patient is continually infected. Effective population size and census population size are not always directly related, but the authors should discuss how changing population sizes affect their estimate of effective population size and whether a single effective population size is adequate to represent the infection.

The calculation we make in Clade A was performed over the samples in this clade used up to the point at which favipiravir was first used; this is shown by the green box in Figure 1A. Our belief is that CT score is somewhat noisy, sometimes providing a better measurement of the amount of viral material on a swab than of the consensus population size. Previous modelling of these data suggests a smooth, roughly 8-fold decline in viral load during this period (Lumby et al., 2020). We believe that the pre-favipiravir set of samples is the most appropriate one from which to derive a headline figure for effective population size, the subsequent clinical intervention being an unusual event.

We have added a note that our estimate for clade B spanned the interval in time with the bottleneck; this may be a reason for its lower value. We also note that our estimate is of a mean effective population size.

5) The authors calculate sequence distance between every pair of sequenced timepoints to reduce the influence of noise from sequencing error, but as a result, the points in Figure 2A are non-independent and may contribute to a tighter confidence interval around the evolutionary rate than is realistic. In particular, changes in variant frequencies that take place during the middle of the infection will be overcounted in these pairs and will disproportionately influence the overall estimate of evolutionary rates. When the authors estimate the evolutionary distance between consecutive timepoints and divide by the number of days between them, how well does the estimate correspond to the estimates in Figure 2? What is the variance in these estimates?

We have provided further explanation of our method. Our basic rationale is that individual samples from the population are considerably affected by error, such that the error in each sample is larger than the true evolutionary distances undergone by the population. The raw distances between samples in consecutive timepoints are shown in the left-most points in Figure 2A; the mean of these values is 42.6 (standard deviation 8.5), with essentially no correlation between these values and the number of days which separate the samples (pvalue 0.97 from a correlation test performed in Mathematica 11). If we persist with this calculation we obtain a mean change per day in the population of just over 9 nucleotides per day, greater than the total inferred change of close to 8 nucleotides for clade A across five months of evolution. We believe that noise in the individual samples greatly outweighs the genuine signal of evolutionary change in the population in such a way that the simple comparison of pairwise samples does not produce an accurate result.

Assuming a constant underlying effective population size (or failing that, calculating some kind of mean), our regression allows us to infer a rate of evolution even in the presence of considerable noise. We acknowledge that changes in the population during the middle of infection are over-represented but do not have a solution to this; the use of multiple samples is intrinsic to our approach.

6) The regression performed in Figure 2A, C, and analogous figures may be especially influenced by the few points at the right end of the distribution, which represent evolutionary distances between points spaced further apart in time. How robust is the estimate of evolutionary rate to removal of these points, or by calculation of evolutionary rate as suggested in comment 4?

We have checked the slope of the regression by removing points from either the beginning and the end of the infection. In Figure 2A, removing between zero and four time points from each end of the data in any combination gives 25 regression coefficients; all of these fall within the 97.5% confidence interval that we report for our original calculation. [Note : Removing a time point removes all distances associated with that point, removing multiple points from the figure]. In Figure 2C there are data from only four time points; here removing either the first or the last leads to regression coefficients within the original confidence interval. We believe that the use of consecutive samples to assess effective population size gives a highly misleading result due to noise and confounding factors in the data greatly exaggerating the real rate of change of the population. We therefore omit this result from the main text, though we note that performing this calculation for clade A gives an effective population size of approximately 800.

7) The authors chose to infer effective population size using variants and haplotypes on the neuraminidase and hemagglutinin segments. This is an odd choice since these regions tend to experience the strongest selection, which can strongly influence the estimates of effective population size. Selection can act on linked haplotypes across the genome in some cases, but have the authors tested to see if these results hold for other gene segments as well?

This is a misunderstanding of our approach. We illustrate the cladal structure of the population using haplotype reconstructions calculated using sequence data for neuraminidase and haemagglutinin. These segments were chosen as they had slightly higher levels of genetic diversity, giving the clearest illustrations of a pattern that was visible across all of the viral segments. However, the calculation of effective population size was calculated genome-wide, using data from all viral segments. We have amended the text to greater highlight the illustrative nature of the haplotype reconstructions we present.

8) Why are the effective population size estimates for the clade B samples calculated separately from the clade A samples? It's not evident from the SAMFIRE inference of haplotypes that clades A and B constitute separate subpopulations; it seems that they could be distinct genotypes in a well-mixed population as well, as might result from a coinfection.

We believe that it is unlikely that these clades arise from a well-mixed population. The samples we have are deep-sequenced, generally to in excess of 2000x coverage. However, considerable differences are observed between these samples; in a well-mixed population, the samples might exhibit a pattern of evolution, but evolution would follow a continuous pattern of change rather than identifiably (in the haplotype reconstruction) being from one subpopulation or another. Our ‘clade B’ samples describe the 18^{th}, 40^{th}, and 41^{st} samples from the host. The 18^{th} sample is evolutionarily intermediate between everything in ‘clade A’ and the final two samples. This leads us to the belief that the two clades begin as a single transmitted population (i.e. not from a co-infection), that clades A and B are very largely spatially separate, and that clade B evolves away from clade A over time, potentially as a result of genetic drift. We have added further detail to the text describing the observed relationship between samples.

9) The authors assume the generation time of 10 hours per generation for influenza B. However, if generations are longer in immunocompromised individuals, the analysis would lead to an overestimation of N_{e}. Given that the main result in this manuscript is that N_{e} is high, this possibility should at least be discussed.

We are not aware of a biological reason why the generation time for influenza would be different for immunocompromised individuals, but acknowledge that this parameter might contain some uncertainty. We have explored the effect of changes in the generation time in Supplementary file 1.