<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD with MathML3 v1.3 20210610//EN"  "JATS-archivearticle1-3-mathml3.dtd"><article xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article" dtd-version="1.3"><front><journal-meta><journal-id journal-id-type="nlm-ta">elife</journal-id><journal-id journal-id-type="publisher-id">eLife</journal-id><journal-title-group><journal-title>eLife</journal-title></journal-title-group><issn publication-format="electronic" pub-type="epub">2050-084X</issn><publisher><publisher-name>eLife Sciences Publications, Ltd</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="publisher-id">105466</article-id><article-id pub-id-type="doi">10.7554/eLife.105466</article-id><article-id pub-id-type="doi" specific-use="version">10.7554/eLife.105466.3</article-id><article-version article-version-type="publication-state">version of record</article-version><article-categories><subj-group subj-group-type="display-channel"><subject>Research Article</subject></subj-group><subj-group subj-group-type="heading"><subject>Evolutionary Biology</subject></subj-group></article-categories><title-group><article-title>Parallel HIV-1 fitness landscapes shape viral dynamics in humans and macaques that develop broadly neutralizing antibodies</article-title></title-group><contrib-group><contrib contrib-type="author"><name><surname>Shimagaki</surname><given-names>Kai S</given-names></name><contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0001-7580-4781</contrib-id><xref ref-type="aff" rid="aff1">1</xref><xref ref-type="aff" rid="aff2">2</xref><xref ref-type="other" rid="fund1"/><xref ref-type="fn" rid="con1"/><xref ref-type="fn" rid="conf1"/></contrib><contrib contrib-type="author"><name><surname>Lynch</surname><given-names>Rebecca M</given-names></name><contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0002-7188-8073</contrib-id><xref ref-type="aff" rid="aff3">3</xref><xref ref-type="fn" rid="con2"/><xref ref-type="fn" rid="conf1"/></contrib><contrib contrib-type="author" corresp="yes"><name><surname>Barton</surname><given-names>John P</given-names></name><contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0003-1467-421X</contrib-id><email>jpbarton@pitt.edu</email><xref ref-type="aff" rid="aff1">1</xref><xref ref-type="aff" rid="aff2">2</xref><xref ref-type="other" rid="fund1"/><xref ref-type="fn" rid="con3"/><xref ref-type="fn" rid="conf1"/></contrib><aff id="aff1"><label>1</label><institution-wrap><institution-id institution-id-type="ror">https://ror.org/01an3r305</institution-id><institution>Department of Computational and Systems Biology, University of Pittsburgh School of Medicine</institution></institution-wrap><addr-line><named-content content-type="city">Pittsburgh</named-content></addr-line><country>United States</country></aff><aff id="aff2"><label>2</label><institution-wrap><institution-id institution-id-type="ror">https://ror.org/01an3r305</institution-id><institution>Department of Physics and Astronomy, University of Pittsburgh</institution></institution-wrap><addr-line><named-content content-type="city">Pittsburgh</named-content></addr-line><country>United States</country></aff><aff id="aff3"><label>3</label><institution-wrap><institution-id institution-id-type="ror">https://ror.org/00y4zzh67</institution-id><institution>Department of Microbiology, Immunology and Tropical Medicine, School of Medicine and Health Sciences, George Washington University</institution></institution-wrap><addr-line><named-content content-type="city">Washington, DC</named-content></addr-line><country>United States</country></aff></contrib-group><contrib-group content-type="section"><contrib contrib-type="editor"><name><surname>Bitbol</surname><given-names>Anne-Florence</given-names></name><role>Reviewing Editor</role><aff><institution-wrap><institution-id institution-id-type="ror">https://ror.org/02s376052</institution-id><institution>Ecole Polytechnique Federale de Lausanne (EPFL)</institution></institution-wrap><country>Switzerland</country></aff></contrib><contrib contrib-type="senior_editor"><name><surname>Schiffer</surname><given-names>Joshua T</given-names></name><role>Senior Editor</role><aff><institution-wrap><institution-id institution-id-type="ror">https://ror.org/007ps6h72</institution-id><institution>Fred Hutch Cancer Center</institution></institution-wrap><country>United States</country></aff></contrib></contrib-group><pub-date publication-format="electronic" date-type="publication"><day>10</day><month>11</month><year>2025</year></pub-date><volume>14</volume><elocation-id>RP105466</elocation-id><history><date date-type="sent-for-review" iso-8601-date="2024-12-30"><day>30</day><month>12</month><year>2024</year></date></history><pub-history><event><event-desc>This manuscript was published as a preprint.</event-desc><date date-type="preprint" iso-8601-date="2024-12-07"><day>07</day><month>12</month><year>2024</year></date><self-uri content-type="preprint" xlink:href="https://doi.org/10.1101/2024.07.12.603090"/></event><event><event-desc>This manuscript was published as a reviewed preprint.</event-desc><date date-type="reviewed-preprint" iso-8601-date="2025-03-11"><day>11</day><month>03</month><year>2025</year></date><self-uri content-type="reviewed-preprint" xlink:href="https://doi.org/10.7554/eLife.105466.1"/></event><event><event-desc>The reviewed preprint was revised.</event-desc><date date-type="reviewed-preprint" iso-8601-date="2025-09-17"><day>17</day><month>09</month><year>2025</year></date><self-uri content-type="reviewed-preprint" xlink:href="https://doi.org/10.7554/eLife.105466.2"/></event></pub-history><permissions><copyright-statement>© 2025, Shimagaki et al</copyright-statement><copyright-year>2025</copyright-year><copyright-holder>Shimagaki et al</copyright-holder><ali:free_to_read/><license xlink:href="http://creativecommons.org/licenses/by/4.0/"><ali:license_ref>http://creativecommons.org/licenses/by/4.0/</ali:license_ref><license-p>This article is distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution License</ext-link>, which permits unrestricted use and redistribution provided that the original author and source are credited.</license-p></license></permissions><self-uri content-type="pdf" xlink:href="elife-105466-v1.pdf"/><self-uri content-type="figures-pdf" xlink:href="elife-105466-figures-v1.pdf"/><abstract><p>HIV-1 evolves within individual hosts to escape adaptive immune responses while maintaining its capacity for replication. Coevolution between HIV-1 and the immune system generates extraordinary viral genetic diversity. In some individuals, this process also results in the development of broadly neutralizing antibodies (bnAbs) that can neutralize many viral variants, a key focus of HIV-1 vaccine design. However, a general understanding of the forces that shape virus-immune coevolution within and across hosts remains incomplete. Here, we performed a quantitative study of HIV-1 evolution in humans and rhesus macaques, including individuals who developed bnAbs. We observed strong selection early in infection for mutations affecting HIV-1 envelope glycosylation and escape from autologous strain-specific antibodies, followed by weaker selection for bnAb resistance. The inferred fitness effects of HIV-1 mutations in humans and macaques were remarkably similar. Moreover, we observed a striking pattern of rapid HIV-1 fitness gains that precedes the development of bnAbs. Our work highlights strong parallels between infection in rhesus macaques and humans, and it reveals a quantitative evolutionary signature of bnAb development.</p></abstract><abstract abstract-type="plain-language-summary"><title>eLife digest</title><p>Viruses are genetic particles composed of DNA or RNA, encased by a protective protein shell called the capsid. They cannot reproduce independently and must infect a host cell to replicate. Many viruses mutate rapidly, allowing them to adapt to and evade the immune responses of their hosts.</p><p>For example, HIV-1, the virus that causes AIDS, has a high mutation rate, resulting in the emergence of many distinct variants of the virus. Therefore, an effective vaccine needs to be able to stimulate a special type of antibody known as broadly neutralizing antibody (bnAb). These large defense proteins can recognize and neutralize many different viral strains, which could make them a key focus in HIV vaccine development.</p><p>Researchers often use rhesus macaques as a model system to study how HIV-1 evolves and interacts with the immune system. Previous studies have shown that some viruses mutate in similar ways in both humans and rhesus macaques. However, the details of HIV-1 evolution and mutation patterns in these two hosts remain unclear. Gaining deeper insight into the evolutionary processes linked to bnAb development could inform vaccine design and evaluate the suitability of rhesus macaques as an animal model for HIV-1 research.</p><p>Shimagaki et al. aimed to quantify how HIV-1 evolves in different hosts and whether these evolutionary patterns differ between individuals who do or do not develop bnAbs. The researchers reanalyzed previously collected HIV-1 data from two humans who developed bnAbs and 13 rhesus macaques, using computational models to estimate how various mutations affect viral replication (i.e., viral fitness). Their analysis revealed strong quantitative similarities in viral evolution between humans and macaques: the estimated fitness effects of mutations were highly correlated across species. Rapid increases in viral fitness were observed before bnAbs were detected, suggesting that selective pressure on the virus may help drive the development of antibody breadth.</p><p>These findings suggest that vaccine strategies designed to replicate the conditions that lead to rapid viral adaptation may help stimulate broadly neutralizing antibody responses. The observed parallels in HIV-1 evolution between humans and rhesus macaques also support the continued use of macaques as a relevant model for HIV-1 research. Still, significant challenges remain. Future studies should explore the link between viral evolution and antibody development in larger cohorts. Moreover, vaccine development requires addressing many practical aspects – such as antigen selection and dosing regimens – which extend beyond the viral fitness dynamics explored in this study.</p></abstract><kwd-group kwd-group-type="author-keywords"><kwd>HIV</kwd><kwd>population genetics</kwd><kwd>statistical inference</kwd><kwd>evolution</kwd></kwd-group><kwd-group kwd-group-type="research-organism"><title>Research organism</title><kwd>Viruses</kwd></kwd-group><funding-group><award-group id="fund1"><funding-source><institution-wrap><institution-id institution-id-type="ror">https://ror.org/01cwqze88</institution-id><institution>National Institutes of Health</institution></institution-wrap></funding-source><award-id>R35GM138233</award-id><principal-award-recipient><name><surname>Shimagaki</surname><given-names>Kai S</given-names></name><name><surname>Barton</surname><given-names>John P</given-names></name></principal-award-recipient></award-group><funding-statement>The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.</funding-statement></funding-group><custom-meta-group><custom-meta specific-use="meta-only"><meta-name>Author impact statement</meta-name><meta-value>Fitness constraints on the HIV envelope protein are highly similar in humans and rhesus macaques, emphasizing the utility of macaque models of infection and antibody development.</meta-value></custom-meta><custom-meta specific-use="meta-only"><meta-name>publishing-route</meta-name><meta-value>prc</meta-value></custom-meta></custom-meta-group></article-meta></front><body><sec id="s1" sec-type="intro"><title>Introduction</title><p>HIV-1 rapidly mutates and proliferates in infected individuals. The immune system is a major driver of HIV-1 evolution, as the virus accumulates mutations to escape from host T cells and antibodies (<xref ref-type="bibr" rid="bib94">Wei et al., 2003</xref>; <xref ref-type="bibr" rid="bib1">Allen et al., 2005</xref>; <xref ref-type="bibr" rid="bib53">Li et al., 2007</xref>). Due to the chronic nature of HIV-1 infection, coupled with high rates of mutation and replication, HIV-1 genetic diversity within and between infected individuals is incredibly high. Genetic diversity challenges vaccine development, as vaccine-elicited antibodies must be able to neutralize many strains of the virus to protect against infection (<xref ref-type="bibr" rid="bib2">Altfeld and Allen, 2006</xref>).</p><p>However, there exist rare antibodies that are capable of neutralizing a broad range of HIV-1 viruses. These broadly neutralizing antibodies (bnAbs) have therefore been the subject of intense research (<xref ref-type="bibr" rid="bib48">Kwong et al., 2013</xref>; <xref ref-type="bibr" rid="bib11">Burton and Hangartner, 2016</xref>; <xref ref-type="bibr" rid="bib87">Sok and Burton, 2018</xref>; <xref ref-type="bibr" rid="bib35">Haynes et al., 2023</xref>). Eliciting bnAbs through vaccination remains a major goal of HIV-1 vaccine design. However, the development of exceptionally broad antibody responses is rare, and such antibodies typically develop only after several years of infection (<xref ref-type="bibr" rid="bib16">Doria-Rose et al., 2010</xref>; <xref ref-type="bibr" rid="bib33">Haynes et al., 2012</xref>; <xref ref-type="bibr" rid="bib34">Haynes et al., 2016</xref>; <xref ref-type="bibr" rid="bib39">Hraber et al., 2014</xref>).</p><p>Recent years have yielded important insights into the coevolutionary process between HIV-1 and antibodies that sometimes leads to the development of bnAbs. Clinical studies have collected serial samples of HIV-1 sequences from a few individuals who developed bnAbs and characterized the resulting antibodies, their developmental stages, and binding sites (<xref ref-type="bibr" rid="bib57">Liao et al., 2013</xref>; <xref ref-type="bibr" rid="bib10">Bonsignori et al., 2017</xref>; <xref ref-type="bibr" rid="bib17">Doria-Rose et al., 2014</xref>). The contributions of HIV-1 and its coevolution to bnAb development are complex (<xref ref-type="bibr" rid="bib67">Moore et al., 2015</xref>; <xref ref-type="bibr" rid="bib50">Landais and Moore, 2018</xref>). High viral loads and viral diversity have been positively associated with bnAb development (<xref ref-type="bibr" rid="bib31">Gray et al., 2011</xref>; <xref ref-type="bibr" rid="bib67">Moore et al., 2015</xref>; <xref ref-type="bibr" rid="bib50">Landais and Moore, 2018</xref>). However, superinfection, which can vastly increase HIV-1 diversity, is not always associated with bnAb development (<xref ref-type="bibr" rid="bib13">Cornelissen et al., 2016</xref>), and it does not appear to broaden antibody responses in the absence of other factors (<xref ref-type="bibr" rid="bib50">Landais and Moore, 2018</xref>).</p><p>Here, we sought to characterize the evolutionary dynamics of HIV-1 that accompany the development of bnAbs in clinical data. In particular, we inferred the landscape of selective pressures that shape the evolution of HIV-1 within hosts, reflecting the effects of the immune environment. We first analyzed data from two individuals who developed bnAbs within a few years after HIV-1 infection (<xref ref-type="bibr" rid="bib57">Liao et al., 2013</xref>; <xref ref-type="bibr" rid="bib10">Bonsignori et al., 2017</xref>). In both individuals, HIV-1 mutations inferred to be the most beneficial were observed early in infection. In general, mutations that provided resistance to autologous strain-specific antibodies were inferred to be more strongly selected than ones that escaped from bnAbs. We also observed clusters of beneficial mutations along the HIV-1 genome, which were associated with envelope protein (Env) structure.</p><p>To confirm the generality of these patterns in a broader sample, we studied recent data from rhesus macaques (RMs) infected with simian-human immunodeficiency viruses (SHIV) that incorporated HIV-1 Env proteins derived from the two individuals above (<xref ref-type="bibr" rid="bib75">Roark et al., 2021</xref>). This study also compared patterns of Env evolution in HIV-1 and SHIV in response to host immunity. We observed striking parallels between the inferred fitness effects of Env mutations in RMs and humans, suggesting highly similar selective pressures on the virus despite different host species and differences in individual immune responses. Furthermore, we found that RMs that developed broad, potent antibody responses could clearly be distinguished from those with narrowly focused responses using the evolutionary dynamics of the virus. Specifically, the virus population in individuals who developed greater breadth was distinguished by larger and more rapid gains in fitness than in other individuals. Collectively, these results show high similarity between SHIV evolutionary dynamics in RMs and HIV-1 in humans, and that viral fitness gain is associated with antibody breadth.</p></sec><sec id="s2" sec-type="results"><title>Results</title><sec id="s2-1"><title>Quantifying HIV-1 evolutionary dynamics</title><p>We studied HIV-1 evolution accompanying the development of bnAbs in two donors, CH505 and CH848, enrolled in the Center for HIV/AIDS Vaccine Immunology 001 acute infection cohort (<xref ref-type="bibr" rid="bib92">Tomaras et al., 2008</xref>). CH505 developed the CD4 binding site-targeting bnAb CH103, which was first detectable 14 weeks after HIV-1 infection (<xref ref-type="bibr" rid="bib57">Liao et al., 2013</xref>). CH103 maturation was found to be associated with viral escape from another antibody lineage, CH235, that ultimately developed significant breadth (<xref ref-type="bibr" rid="bib27">Gao et al., 2014</xref>; <xref ref-type="bibr" rid="bib9">Bonsignori et al., 2016</xref>). CH848 developed a bnAb, DH270, targeting a glycosylated site near the third variable loop (V3) of Env (<xref ref-type="bibr" rid="bib10">Bonsignori et al., 2017</xref>). Similar to the bnAb development process in CH505, escape from ‘cooperating’ DH272 and DH475 lineage antibodies was observed to contribute to the maturation of DH270 (<xref ref-type="bibr" rid="bib10">Bonsignori et al., 2017</xref>).</p><p>To quantify HIV-1 evolutionary dynamics, we sought to infer a fitness model that best explained the changes in the genetic composition of the viral population observed in each individual over time. In recent years, a wide variety of approaches have been developed to infer the fitness effects of mutations from temporal genetic data (<xref ref-type="bibr" rid="bib7">Bollback et al., 2008</xref>; <xref ref-type="bibr" rid="bib41">Illingworth and Mustonen, 2011</xref>; <xref ref-type="bibr" rid="bib42">Illingworth and Mustonen, 2012</xref>; <xref ref-type="bibr" rid="bib62">Malaspinas et al., 2012</xref>; <xref ref-type="bibr" rid="bib64">Mathieson and McVean, 2013</xref>; <xref ref-type="bibr" rid="bib49">Lacerda and Seoighe, 2014</xref>; <xref ref-type="bibr" rid="bib22">Feder et al., 2014</xref>; <xref ref-type="bibr" rid="bib89">Steinrücken et al., 2014</xref>; <xref ref-type="bibr" rid="bib26">Foll et al., 2014</xref>; <xref ref-type="bibr" rid="bib91">Terhorst et al., 2015</xref>; <xref ref-type="bibr" rid="bib80">Schraiber et al., 2016</xref>; <xref ref-type="bibr" rid="bib90">Tataru et al., 2017</xref>; <xref ref-type="bibr" rid="bib73">Paris et al., 2019</xref>; <xref ref-type="bibr" rid="bib65">Mathieson and Terhorst, 2022</xref>; <xref ref-type="bibr" rid="bib36">He et al., 2023</xref>; <xref ref-type="bibr" rid="bib86">Sohail et al., 2022</xref>; <xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref>; <xref ref-type="bibr" rid="bib84">Shimagaki and Barton, 2025b</xref>; <xref ref-type="bibr" rid="bib28">Gao and Barton, 2025</xref>; <xref ref-type="bibr" rid="bib52">Lee et al., 2025</xref>). The vast majority of these methods focus on a single locus at a time, ignoring correlations between genetic variants at different loci. While the recombination rate of HIV-1 is high (<xref ref-type="bibr" rid="bib69">Neher and Leitner, 2010</xref>; <xref ref-type="bibr" rid="bib76">Romero and Feder, 2024</xref>), the virus also evolves under strong selection, which can lead to interference between clones with different beneficial mutations (<xref ref-type="bibr" rid="bib77">Rouzine and Weinberger, 2013</xref>; <xref ref-type="bibr" rid="bib72">Pandit and de Boer, 2014</xref>; <xref ref-type="bibr" rid="bib29">Garcia and Regoes, 2014</xref>; <xref ref-type="bibr" rid="bib30">Garcia et al., 2016</xref>; <xref ref-type="bibr" rid="bib97">Williams and Pennings, 2020</xref>; <xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref>). Thus, we applied MPL, an inference method that systematically accounts for genetic correlations (<xref ref-type="bibr" rid="bib86">Sohail et al., 2022</xref>; <xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref>; <xref ref-type="bibr" rid="bib84">Shimagaki and Barton, 2025b</xref>; <xref ref-type="bibr" rid="bib28">Gao and Barton, 2025</xref>; <xref ref-type="bibr" rid="bib52">Lee et al., 2025</xref>), to estimate the fitness effects of HIV-1 mutations.</p></sec><sec id="s2-2"><title>Model overview</title><p>Here, we provide a brief overview of the key steps in the MPL approach to inferring selection. Further details are available in Methods and in prior work (<xref ref-type="bibr" rid="bib86">Sohail et al., 2022</xref>; <xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref>; <xref ref-type="bibr" rid="bib84">Shimagaki and Barton, 2025b</xref>; <xref ref-type="bibr" rid="bib28">Gao and Barton, 2025</xref>; <xref ref-type="bibr" rid="bib52">Lee et al., 2025</xref>). First, we assume that the effect on viral fitness of each individual mutation <inline-formula><alternatives><mml:math id="inf1"><mml:semantics><mml:mrow><mml:mi>𝑎</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft1">\begin{document}$a$\end{document}</tex-math></alternatives></inline-formula> at each site <inline-formula><alternatives><mml:math id="inf2"><mml:semantics><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft2">\begin{document}$i$\end{document}</tex-math></alternatives></inline-formula> is quantified by a selection coefficient <inline-formula><alternatives><mml:math id="inf3"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft3">\begin{document}$s_i(a)$\end{document}</tex-math></alternatives></inline-formula>, with positive coefficients <inline-formula><alternatives><mml:math id="inf4"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-rel" stretchy="false">&gt;</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:semantics></mml:math><tex-math id="inft4">\begin{document}$s_i(a) \gt 0$\end{document}</tex-math></alternatives></inline-formula> denoting mutations that are beneficial for the virus and <inline-formula><alternatives><mml:math id="inf5"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-rel" stretchy="false">&lt;</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:semantics></mml:math><tex-math id="inft5">\begin{document}$s_i(a) \lt 0$\end{document}</tex-math></alternatives></inline-formula> denoting deleterious ones. We further assume that the cumulative fitness effects of mutations are additive, such that the overall fitness <inline-formula><alternatives><mml:math id="inf6"><mml:semantics><mml:mrow><mml:msup><mml:mrow><mml:mi>𝐹</mml:mi></mml:mrow><mml:mrow><mml:mi>𝛼</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft6">\begin{document}$F^\alpha$\end{document}</tex-math></alternatives></inline-formula> of a viral sequence α is given by the sum of the selection coefficients for all the mutations that it bears. That is,<disp-formula id="equ1"><label> (1)</label><alternatives><mml:math id="m1"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:msup><mml:mi>F</mml:mi><mml:mi>α</mml:mi></mml:msup><mml:mo>=</mml:mo><mml:mi>F</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>g</mml:mi><mml:mi>α</mml:mi></mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>+</mml:mo><mml:munderover><mml:mo>∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>L</mml:mi></mml:munderover><mml:munderover><mml:mo>∑</mml:mo><mml:mrow><mml:mi>a</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>q</mml:mi></mml:munderover><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msubsup><mml:mi>g</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>a</mml:mi></mml:mrow><mml:mi>α</mml:mi></mml:msubsup><mml:mspace width="thinmathspace"/><mml:mo>,</mml:mo></mml:mstyle></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t1">\begin{document}$$\displaystyle  F^\alpha= F(g^\alpha) = 1 + \sum_{i=1}^L\sum_{a=1}^q s_i(a)g_{i,a}^\alpha\,,$$\end{document}</tex-math></alternatives></disp-formula></p><p>where <inline-formula><alternatives><mml:math id="inf7"><mml:semantics><mml:mrow><mml:msup><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow><mml:mrow><mml:mi>𝛼</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:msubsup><mml:mrow><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msubsup><mml:mrow><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msubsup><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑎</mml:mi></mml:mrow><mml:mrow><mml:mi>𝛼</mml:mi></mml:mrow></mml:msubsup><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>𝑞</mml:mi></mml:mrow></mml:msubsup><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>𝐿</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:semantics></mml:math><tex-math id="inft7">\begin{document}$g^\alpha= ((g^\alpha_{i,a})_{a=1}^q)_{i=1}^L$\end{document}</tex-math></alternatives></inline-formula> represents the viral sequence, with <inline-formula><alternatives><mml:math id="inf8"><mml:semantics><mml:mrow><mml:msubsup><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑎</mml:mi></mml:mrow><mml:mrow><mml:mi>𝛼</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:semantics></mml:math><tex-math id="inft8">\begin{document}$g_{i,a}^\alpha$\end{document}</tex-math></alternatives></inline-formula> equal to one if genotype α has allele <inline-formula><alternatives><mml:math id="inf9"><mml:semantics><mml:mrow><mml:mi>𝑎</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft9">\begin{document}$a$\end{document}</tex-math></alternatives></inline-formula> at site <inline-formula><alternatives><mml:math id="inf10"><mml:semantics><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft10">\begin{document}$i$\end{document}</tex-math></alternatives></inline-formula> and zero otherwise. <inline-formula><alternatives><mml:math id="inf11"><mml:semantics><mml:mrow><mml:mi>𝐿</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft11">\begin{document}$L$\end{document}</tex-math></alternatives></inline-formula> is the length of the genetic sequence, and <inline-formula><alternatives><mml:math id="inf12"><mml:semantics><mml:mrow><mml:mi>𝑞</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft12">\begin{document}$q$\end{document}</tex-math></alternatives></inline-formula> represents the number of genetic states (i.e., <inline-formula><alternatives><mml:math id="inf13"><mml:semantics><mml:mrow><mml:mi>𝑞</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>5</mml:mn></mml:mrow></mml:semantics></mml:math><tex-math id="inft13">\begin{document}$q=5$\end{document}</tex-math></alternatives></inline-formula> for nucleotide sequences and 21 for amino acids, including gaps/deletions).</p><p>We assume that viral replication is stochastic, where viruses with higher fitness are more likely to spread infection to new cells than ones with lower fitness. Let us write the number of viruses of each genotype in the population at time <inline-formula><alternatives><mml:math id="inf14"><mml:semantics><mml:mrow><mml:mi>𝑡</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft14">\begin{document}$t$\end{document}</tex-math></alternatives></inline-formula> as <inline-formula><alternatives><mml:math id="inf15"><mml:semantics><mml:mrow><mml:mi>𝑛</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mo>…</mml:mo><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑀</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft15">\begin{document}$n(t) = (n_1(t), n_2(t), \ldots, n_M(t))$\end{document}</tex-math></alternatives></inline-formula>, where <inline-formula><alternatives><mml:math id="inf16"><mml:semantics><mml:mrow><mml:mi>𝑀</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:msup><mml:mrow><mml:mi>𝑞</mml:mi></mml:mrow><mml:mrow><mml:mi>𝐿</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft16">\begin{document}$M = q^L$\end{document}</tex-math></alternatives></inline-formula> is the total number of possible genotypes. In our model, the probability of obtaining a new distribution of genotypes <inline-formula><alternatives><mml:math id="inf17"><mml:semantics><mml:mrow><mml:mi>𝑛</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-bin" stretchy="false">+</mml:mo><mml:mn>1</mml:mn><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft17">\begin{document}$n(t+1)$\end{document}</tex-math></alternatives></inline-formula> in the next generation is multinomial,<disp-formula id="equ2"><label>(2)</label><alternatives><mml:math id="m2"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mi>P</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mi>N</mml:mi><mml:mo>!</mml:mo><mml:munderover><mml:mo movablelimits="false">∏</mml:mo><mml:mrow><mml:mi>α</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>M</mml:mi></mml:mrow></mml:munderover><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mi>α</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>n</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>α</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>α</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo><mml:mo>!</mml:mo></mml:mrow></mml:mfrac></mml:mrow><mml:mo>,</mml:mo></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t2">\begin{document}$$\displaystyle P\left(n(t+1)\right) = N! \prod\limits_{\alpha= 1}^{M}{\frac{p_\alpha(n(t))^{n_\alpha(t+1)}}{n_\alpha(t+1)!}}, $$\end{document}</tex-math></alternatives></disp-formula></p><p>with <inline-formula><alternatives><mml:math id="inf18"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>N</mml:mi><mml:mo>=</mml:mo><mml:munder><mml:mo>∑</mml:mo><mml:mi>α</mml:mi></mml:munder><mml:msub><mml:mi>n</mml:mi><mml:mi>α</mml:mi></mml:msub></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft18">\begin{document}$N = \sum_\alpha n_\alpha$\end{document}</tex-math></alternatives></inline-formula> the total population size. The probabilities <inline-formula><alternatives><mml:math id="inf19"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑝</mml:mi></mml:mrow><mml:mrow><mml:mi>𝛼</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑛</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft19">\begin{document}$p_\alpha(n(t))$\end{document}</tex-math></alternatives></inline-formula> are influenced by fitness, as well as mutation, recombination, and the current frequency of each genotype (see Methods). Essentially, viruses that are fitter than the current population average are more likely to increase in frequency, while ones that are less fit are likely to decline. Mutations and recombination introduce genetic variation into the population. The population size <inline-formula><alternatives><mml:math id="inf20"><mml:semantics><mml:mrow><mml:mi>𝑁</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft20">\begin{document}$N$\end{document}</tex-math></alternatives></inline-formula> determines the relative stochasticity of the dynamics, with smaller populations having more random fluctuations than larger ones.</p><p>Following this model, we can then quantify the probability of any evolutionary history of the viral population (i.e., the distribution of viral genotypes over time) as a function of the selection coefficients (Methods).</p><p>Assuming that the population size <inline-formula><alternatives><mml:math id="inf21"><mml:semantics><mml:mrow><mml:mi>𝑁</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft21">\begin{document}$N$\end{document}</tex-math></alternatives></inline-formula> is large and the selection coefficients are small (such that <inline-formula><alternatives><mml:math id="inf22"><mml:semantics><mml:mrow><mml:mi>|</mml:mi><mml:mi>𝑠</mml:mi><mml:mi>|</mml:mi><mml:mi>≪</mml:mi><mml:mn>1</mml:mn></mml:mrow></mml:semantics></mml:math><tex-math id="inft22">\begin{document}$|s|\ll1$\end{document}</tex-math></alternatives></inline-formula>), we can write an analytical expression for the selection coefficients that best fit the viral dynamics observed in data (<xref ref-type="bibr" rid="bib86">Sohail et al., 2022</xref>; <xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref>):<disp-formula id="equ3"><label>(3)</label><alternatives><mml:math id="m3"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mover><mml:mi>s</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover></mml:mrow><mml:mo>=</mml:mo><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi>γ</mml:mi><mml:mi>I</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mrow><mml:mo>[</mml:mo><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>−</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:mrow><mml:mo>]</mml:mo></mml:mrow><mml:mspace width="thinmathspace"/><mml:mo>.</mml:mo></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t3">\begin{document}$$\displaystyle \begin{equation*} \hat{s} = \left(C_{\mathrm{int}} + \gamma I \right)^{-1} \left[\Delta x_{\mathrm{int}} - \Delta u_{\mathrm{int}} \right]\,. \end{equation*}$$\end{document}</tex-math></alternatives></disp-formula></p><p>Here, <inline-formula><alternatives><mml:math id="inf23"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝐶</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="normal"><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>t</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft23">\begin{document}$C_{\mathrm{int}}$\end{document}</tex-math></alternatives></inline-formula> is the covariance matrix of allele frequencies (i.e. the linkage disequilibrium matrix) integrated over time, and γ is a regularization parameter. The terms <inline-formula><alternatives><mml:math id="inf24"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft24">\begin{document}$\Delta x_{\mathrm{int}}$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf25"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft25">\begin{document}$\Delta u_{\mathrm{int}}$\end{document}</tex-math></alternatives></inline-formula> represent the net change in allele frequency and the total expected change in allele frequency due to spontaneous mutations alone, respectively (see Methods for details). Intuitively, this expression says that net allele frequency changes that cannot be explained by mutations are likely due to selection, either on that specific allele or the associated genetic background, which is quantified by <inline-formula><alternatives><mml:math id="inf26"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft26">\begin{document}$C_{\mathrm{int}}$\end{document}</tex-math></alternatives></inline-formula>. Alleles that have large, rapid changes in frequency are more likely to be under strong selection than those with smaller, slower frequency changes. Beyond HIV-1 (<xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref>), this approach has been successfully applied to study the evolution of SARS-CoV-2 (<xref ref-type="bibr" rid="bib52">Lee et al., 2025</xref>) and experimental evolution in bacteria (<xref ref-type="bibr" rid="bib55">Li and Barton, 2023</xref>; <xref ref-type="bibr" rid="bib56">Li and Barton, 2024</xref>).</p></sec><sec id="s2-3"><title>Broad patterns of HIV-1 selection</title><p>As described above, we used MPL (<xref ref-type="bibr" rid="bib86">Sohail et al., 2022</xref>; <xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref>) to infer the selection coefficients that best fit the viral dynamics observed in data from CH505 and CH848. While the great majority of HIV-1 mutations were inferred to be neutral (<inline-formula><alternatives><mml:math id="inf27"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mi>∼</mml:mi><mml:mn>0</mml:mn></mml:mrow></mml:semantics></mml:math><tex-math id="inft27">\begin{document}$s_i(a) \sim0$\end{document}</tex-math></alternatives></inline-formula>), a few mutations substantially increase viral fitness (<xref ref-type="fig" rid="fig1">Figure 1</xref>). Strongly beneficial mutations occurred in clusters along the genome and preferentially appeared in specific regions of Env (<xref ref-type="fig" rid="fig2">Figure 2</xref>).</p><fig-group><fig id="fig1" position="float"><label>Figure 1.</label><caption><title>Beneficial mutations occur in clusters along the genome.</title><p>Inferred fitness effects of HIV-1 mutations in CH505 (<bold>A</bold>) and CH848 (<bold>B</bold>). The position along the radius of each circle specifies the strength of selection: mutations plotted closer to the center are more deleterious, while those closer to the edge are more beneficial. For both individuals, clusters of beneficial mutations are observed in the variable loops of Env, some of which are associated with antibody escape. For CH848, a group of strongly beneficial mutations also appears in Nef.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig1-v1.tif"/></fig><fig id="fig1s1" position="float" specific-use="child-fig"><label>Figure 1—figure supplement 1.</label><caption><title>Weak correlation between sequence variability, as measured by entropy, and inferred selection.</title><p>To quantify sequence variability, we computed “site-dependent entropy” scores <inline-formula><alternatives><mml:math id="inf28"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:msub><mml:mi>H</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>−</mml:mo><mml:munderover><mml:mo>∑</mml:mo><mml:mrow><mml:mi>a</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>q</mml:mi></mml:mrow></mml:munderover><mml:mo fence="false" stretchy="false">⟨</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mi>log</mml:mi><mml:mo>⁡</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mo fence="false" stretchy="false">⟩</mml:mo><mml:mi>t</mml:mi></mml:msub></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft28">\begin{document}$H_i = -\sum_{a=1}^{q} \langle x_i(a, t) \log(x_i(a, t)) \rangle_t$\end{document}</tex-math></alternatives></inline-formula> for each site <inline-formula><alternatives><mml:math id="inf29"><mml:semantics><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft29">\begin{document}$i$\end{document}</tex-math></alternatives></inline-formula> in HIV-1 sequences from CH505 and CH848. In the expression for,<inline-formula><alternatives><mml:math id="inf30"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝐻</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft30">\begin{document}$H_i$\end{document}</tex-math></alternatives></inline-formula> <inline-formula><alternatives><mml:math id="inf31"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft31">\begin{document}$x_{i}(a,t)$\end{document}</tex-math></alternatives></inline-formula> represents the frequency of allele <inline-formula><alternatives><mml:math id="inf32"><mml:semantics><mml:mrow><mml:mi>𝑎</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft32">\begin{document}$a$\end{document}</tex-math></alternatives></inline-formula> at site <inline-formula><alternatives><mml:math id="inf33"><mml:semantics><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft33">\begin{document}$i$\end{document}</tex-math></alternatives></inline-formula> at time,<inline-formula><alternatives><mml:math id="inf34"><mml:semantics><mml:mrow><mml:mi>𝑡</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft34">\begin{document}$t$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf35"><mml:semantics><mml:mrow><mml:mi>⟨</mml:mi><mml:mo class="MathClass-bin" stretchy="false">⋅</mml:mo><mml:msub><mml:mrow><mml:mi>⟩</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑡</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft35">\begin{document}$\langle\cdot\rangle_t$\end{document}</tex-math></alternatives></inline-formula> denotes the average over time points. For both CH505 (<bold>A</bold>) and CH848 (<bold>B</bold>), we found no clear systematic association between the entropy values and beneficial inferred selection coefficients. Pearson’s <inline-formula><alternatives><mml:math id="inf36"><mml:semantics><mml:mrow><mml:mi>𝑟</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft36">\begin{document}$r$\end{document}</tex-math></alternatives></inline-formula> values between entropy and inferred selection coefficients are 0.32 and 0.30 for CH505 and CH848, respectively. In particular, large selection coefficients are not concentrated among sites with the highest entropy values. Among the mutations in the top 5% inferred selection coefficients, the <inline-formula><alternatives><mml:math id="inf37"><mml:semantics><mml:mrow><mml:mi>𝑟</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft37">\begin{document}$r$\end{document}</tex-math></alternatives></inline-formula> values are −0.01 and 0.11 for CH505 and CH848, respectively.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig1-figsupp1-v1.tif"/></fig></fig-group><fig-group><fig id="fig2" position="float"><label>Figure 2.</label><caption><title>Visualization of the effects of HIV-1 mutations in CH505 on the Env trimer.</title><p>(<bold>A</bold>) Side view of the Env trimer (<xref ref-type="bibr" rid="bib43">Jardine et al., 2016</xref>), with detail views of selection for mutations in the CH103 binding site (<bold>B</bold>) CH235 binding site (<bold>C</bold>) and sites associated with escape from autologous strain-specific antibodies (<bold>D</bold>). (<bold>E</bold>) Top view of the trimer, with detail views of variable loops (<bold>F-I</bold>) and the CD4 binding site (<bold>J</bold>). Generally, beneficial mutations appear more frequently near exposed regions at the top of the Env trimer, and deleterious mutations appear in more protected regions. Mutations near the V1/V2 apex can affect the binding and neutralization of antibodies targeting the CD4 binding site (<xref ref-type="bibr" rid="bib27">Gao et al., 2014</xref>).</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig2-v1.tif"/></fig><fig id="fig2s1" position="float" specific-use="child-fig"><label>Figure 2—figure supplement 1.</label><caption><title>CH848 exhibits similar spatial patterns of selection coefficients.</title><p>CH848 exhibits similar spatial patterns of selection coefficients; significantly strongly selected mutations are located at the apex, particularly on the edge of the Env protein. (<bold>A, B</bold>) Side and top views of the Env protein with inferred selection coefficient values. The apex region is enriched with moderately and strongly beneficial mutations. (<bold>C-F</bold>) Mutations that are presumably resistant to bnAbs and autologous nAbs are highlighted. The selection values in the autologous nAbs binding regions were slightly larger than those in the bnAbs binding regions. (<bold>G-K</bold>) Top views highlight the individual variable regions.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig2-figsupp1-v1.tif"/></fig></fig-group><p>To quantify patterns of selection in Env, we examined the top 2% of mutations inferred to be the most beneficial in CH505 and CH848. The fractions of nonsynonymous mutations within these subsets were 97% and 92% for CH505 and CH848, respectively. These fractions are significantly higher than chance expectations (<inline-formula><alternatives><mml:math id="inf38"><mml:semantics><mml:mrow><mml:mi>𝑝</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>6</mml:mn><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo><mml:mn>7</mml:mn><mml:mi>×</mml:mi><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>3</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft38">\begin{document}$p = 6.7\times10^{-3}$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf39"><mml:semantics><mml:mrow><mml:mn>5</mml:mn><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo><mml:mn>6</mml:mn><mml:mi>×</mml:mi><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>4</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft39">\begin{document}$5.6\times10^{-4}$\end{document}</tex-math></alternatives></inline-formula>, Fisher’s exact test; Methods), supporting the model’s ability to accurately infer fitness effects in this data. For CH505, we found 10.9-fold more strongly beneficial mutations in the first variable loop (V1) than expected by chance (<inline-formula><alternatives><mml:math id="inf40"><mml:semantics><mml:mrow><mml:mi>𝑝</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>2</mml:mn><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo><mml:mn>5</mml:mn><mml:mi>×</mml:mi><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>3</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft40">\begin{document}$p = 2.5 \times10^{-3}$\end{document}</tex-math></alternatives></inline-formula>). This is consistent with the presence of V1 mutations conferring resistance to autologous strain-specific antibodies (<xref ref-type="bibr" rid="bib27">Gao et al., 2014</xref>). Mutations in V4, a region targeted by CD8 + T cells (<xref ref-type="bibr" rid="bib27">Gao et al., 2014</xref>), were also 10.0-fold enriched in this subset (<inline-formula><alternatives><mml:math id="inf41"><mml:semantics><mml:mrow><mml:mi>𝑝</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>9</mml:mn><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo><mml:mn>0</mml:mn><mml:mi>×</mml:mi><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>5</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft41">\begin{document}$p = 9.0\times10^{-5}$\end{document}</tex-math></alternatives></inline-formula>). For CH848, mutations in V1, V3, and V5 were enriched by factors of 14.2, 6.3, and 19.1 among the top 2% most beneficial mutations (<inline-formula><alternatives><mml:math id="inf42"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mn>5.9</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>−</mml:mo><mml:mn>10</mml:mn></mml:mrow></mml:msup></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft42">\begin{document}$p = 5.9 \times 10^{-10}$\end{document}</tex-math></alternatives></inline-formula>, <inline-formula><alternatives><mml:math id="inf43"><mml:semantics><mml:mrow><mml:mn>6</mml:mn><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo><mml:mn>6</mml:mn><mml:mi>×</mml:mi><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>3</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft43">\begin{document}$6.6\times10^{-3}$\end{document}</tex-math></alternatives></inline-formula>, and <inline-formula><alternatives><mml:math id="inf44"><mml:semantics><mml:mrow><mml:mn>4</mml:mn><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo><mml:mn>8</mml:mn><mml:mi>×</mml:mi><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>6</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft44">\begin{document}$4.8\times10^{-6}$\end{document}</tex-math></alternatives></inline-formula>). Mutations in these regions were shown to play a role in resistance to DH270 and DH475 lineage antibodies (<xref ref-type="bibr" rid="bib10">Bonsignori et al., 2017</xref>). To test whether our results might be biased by overall sequence variability, we examined the relationship between our inferred selection coefficients and entropy, a common measure of sequence variability. Overall, we found only a modest correlation between selection and entropy, suggesting that the signs of selection that we observe are not due to increased sequence variability alone (<xref ref-type="fig" rid="fig1s1">Figure 1—figure supplement 1</xref>).</p><p>Reversions and mutations affecting N-linked glycosylation motifs were also likely to be beneficial. We define reversions as mutations where the transmitted/founder (TF) amino acid changes to match the subtype consensus sequence at the same site. Among the top 2% most beneficial mutations, reversions were enriched by factors of 19.9 and 17.8 for CH505 and CH848 viruses, respectively (<inline-formula><alternatives><mml:math id="inf45"><mml:semantics><mml:mrow><mml:mi>𝑝</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>2</mml:mn><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo><mml:mn>1</mml:mn><mml:mi>×</mml:mi><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>8</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft45">\begin{document}$p=2.1\times10^{-8}$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf46"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mn>8.5</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>−</mml:mo><mml:mn>13</mml:mn></mml:mrow></mml:msup></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft46">\begin{document}$8.5 \times 10^{-13}$\end{document}</tex-math></alternatives></inline-formula>), consistent with past work finding strong selection for reversions (<xref ref-type="bibr" rid="bib99">Zanini et al., 2015</xref>; <xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref>). For CH848, this group also includes several strongly selected mutations observed in Nef (<xref ref-type="fig" rid="fig1">Figure 1B</xref>), a protein that plays multiple roles during HIV-1 infection (<xref ref-type="bibr" rid="bib15">Das and Jameel, 2005</xref>; <xref ref-type="bibr" rid="bib4">Barton et al., 2019</xref>). Mutations affecting N-linked glycosylation motifs (i.e., by adding, removing, or shifting a glycosylation motif) were enriched by factors of 4.6 (<inline-formula><alternatives><mml:math id="inf47"><mml:semantics><mml:mrow><mml:mi>𝑝</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>7</mml:mn><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo><mml:mn>0</mml:mn><mml:mi>×</mml:mi><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>3</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft47">\begin{document}$p=7.0\times10^{-3}$\end{document}</tex-math></alternatives></inline-formula>) and 8.7 (<inline-formula><alternatives><mml:math id="inf48"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mn>1.4</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>−</mml:mo><mml:mn>10</mml:mn></mml:mrow></mml:msup></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft48">\begin{document}$p=1.4 \times 10^{-10}$\end{document}</tex-math></alternatives></inline-formula>). Changes in glycosylation patterns contributed to antibody escape for both CH505 and CH848 (<xref ref-type="bibr" rid="bib27">Gao et al., 2014</xref>; <xref ref-type="bibr" rid="bib10">Bonsignori et al., 2017</xref>).</p></sec><sec id="s2-4"><title>Selection for antibody escape</title><p>To quantify levels of selection for antibody escape, we computed selection coefficients for mutations that were observed to contribute to resistance to bnAbs as well as bnAb precursors and autologous strain-specific antibodies (<xref ref-type="supplementary-material" rid="supp1">Supplementary file 1</xref> and <xref ref-type="supplementary-material" rid="supp3">Supplementary file 3</xref>; <xref ref-type="bibr" rid="bib27">Gao et al., 2014</xref>; <xref ref-type="bibr" rid="bib66">McCurley et al., 2017</xref>; <xref ref-type="bibr" rid="bib46">Kong et al., 2019</xref>; <xref ref-type="bibr" rid="bib79">Saunders et al., 2022</xref>; <xref ref-type="bibr" rid="bib5">Bauer et al., 2023</xref>). We mapped the inferred selection coefficients to the Env protein structure (<xref ref-type="bibr" rid="bib57">Liao et al., 2013</xref>), highlighting the binding sites for bnAbs and resistance mutations for strain-specific antibodies, as well as important parts of Env (<xref ref-type="fig" rid="fig2">Figure 2</xref>, <xref ref-type="fig" rid="fig1s1">Figure 1—figure supplement 1</xref>). We also analyzed when these resistance mutations were first observed in each individual.</p><p>Overall, we observed stronger selection for escape from autologous strain-specific antibodies and/or changes in glycosylation during the first six months of infection (<xref ref-type="supplementary-material" rid="supp4">Supplementary file 4</xref> and <xref ref-type="supplementary-material" rid="supp5">Supplementary file 5</xref>). This was then followed by more modest selection for escape from bnAb lineages (<xref ref-type="fig" rid="fig3">Figure 3</xref>). For CH505, mutations that conferred resistance to the intermediate-breadth CH235 lineage (<xref ref-type="bibr" rid="bib27">Gao et al., 2014</xref>) were less beneficial than top mutations escaping from strain-specific antibodies (<xref ref-type="fig" rid="fig3">Figure 3A</xref>). In turn, resistance mutations for the broader CH103 lineage were less beneficial than CH235 resistance mutations (<xref ref-type="fig" rid="fig3">Figure 3A</xref>). CH848 is similar, with some highly beneficial mutations affecting glycosylation observed early in infection (<xref ref-type="fig" rid="fig3">Figure 3B</xref>). While a few mutations affecting DH270 appear strongly selected, these mutations appeared long before the DH270 lineage was detected (around 3.5 years after infection <xref ref-type="bibr" rid="bib10">Bonsignori et al., 2017</xref>). Thus, these mutations may have initially been selected for other reasons.</p><fig-group><fig id="fig3" position="float"><label>Figure 3.</label><caption><title>Trajectories and inferred selection coefficients for immune escape mutations and mutations affecting Env glycosylation.</title><p>(<bold>A</bold>) For CH505, early, strongly selected mutations include ones that escape from CD8 + T cells and autologous strain-specific antibodies (ssAbs). More moderately selected bnAb resistance mutations tend to arise later. Note that mutations that affect bnAb resistance can appear in the viral population before bnAbs are generated. Open circles and error bars reflect the mean and standard deviation of inferred selection coefficients in each category. (<bold>B</bold>) For CH848, mutations affecting glycosylation dominate the early phase of evolution, followed later by mutations affecting bnAb resistance. For easier visualization, frequency trajectories are shown with exponential smoothing with a time scale of <inline-formula><alternatives><mml:math id="inf49"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:mn>50</mml:mn></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft49">\begin{document}$t = 50$\end{document}</tex-math></alternatives></inline-formula> days. See <xref ref-type="fig" rid="fig2">Figure 2</xref>, <xref ref-type="fig" rid="fig2s1">Figure 2—figure supplement 1</xref> for a detailed view of mutation frequency trajectories by mutation type without smoothing.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig3-v1.tif"/></fig><fig id="fig3s1" position="float" specific-use="child-fig"><label>Figure 3—figure supplement 1.</label><caption><title>Frequencies of different types of HIV-1 mutations over time.</title><p>CH505 (<bold>A</bold>) and CH848 (<bold>B</bold>) mutation frequencies over time. Mutation types are the same as in <xref ref-type="fig" rid="fig3">Figure 3</xref> in the main text, but with all mutations affecting resistance to bnAb lineage antibodies grouped together.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig3-figsupp1-v1.tif"/></fig></fig-group></sec><sec id="s2-5"><title>Consistent patterns of selection in SHIV evolution</title><p>Simian-human immunodeficiency viruses (SHIVs) have numerous applications in HIV/AIDS research (<xref ref-type="bibr" rid="bib32">Hatziioannou and Evans, 2012</xref>; <xref ref-type="bibr" rid="bib54">Li et al., 2016</xref>). Recently, Roark and collaborators studied SHIV-antibody coevolution in rhesus macaques (RMs), which they compared with patterns of HIV-1 evolution (<xref ref-type="bibr" rid="bib75">Roark et al., 2021</xref>). Two of the SHIV constructs in this study included envelope sequences derived from CH505 and CH848 transmitted/founder (TF) viruses. There, it was found that 2 out of 10 RMs inoculated with SHIV.CH505 and 2 out of 6 RMs inoculated with SHIV.CH848 developed antibodies with substantial breadth.</p><p>To understand whether the patterns of HIV-1 selection observed in CH505 and CH848 are repeatable, and to search for viral factors that distinguish between individuals who develop bnAbs and those who do not, we analyzed SHIV.CH505 and SHIV.CH848 evolution in RMs (<xref ref-type="bibr" rid="bib75">Roark et al., 2021</xref>). To prevent spurious inferences, we first omitted data from RMs with &lt;3 sampling times or &lt;4 sequences in total (Methods). After processing, we examined evolutionary data from seven RMs inoculated with SHIV.CH505 and six RMs inoculated with SHIV.CH848 (<xref ref-type="supplementary-material" rid="supp6">Supplementary file 6</xref> and <xref ref-type="supplementary-material" rid="supp7">Supplementary file 7</xref>). We then computed selection coefficients for SHIV mutations within each RM. Reasoning that selective pressures across SHIV.CH505 and SHIV.CH848 viruses are likely to be similar, we also inferred two sets of joint selection coefficients that best describe SHIV evolution in SHIV.CH505- and SHIV.CH848-inoculated RMs, respectively (Methods).</p><p>As before, we examined the top 2% of SHIV.CH505 and SHIV.CH848 mutations that we inferred to be the most beneficial for the virus. Overall, we found consistent selection for reversions (17.9- and 14.2-fold enrichment, <inline-formula><alternatives><mml:math id="inf50"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mn>4.3</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>−</mml:mo><mml:mn>11</mml:mn></mml:mrow></mml:msup></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft50">\begin{document}$p = 4.3\times10^{-11}$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf51"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mn>1.2</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>−</mml:mo><mml:mn>11</mml:mn></mml:mrow></mml:msup></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft51">\begin{document}$1.2 \times 10^{-11}$\end{document}</tex-math></alternatives></inline-formula> for SHIV.CH505 and SHIV.CH848, respectively), with slightly attenuated enrichment in mutations that affect N-linked glycosylation (2.7- and 4.2-fold enrichment, <inline-formula><alternatives><mml:math id="inf52"><mml:semantics><mml:mrow><mml:mi>𝑝</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>5</mml:mn><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo><mml:mn>4</mml:mn><mml:mi>×</mml:mi><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft52">\begin{document}$p=5.4\times10^{-2}$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf53"><mml:semantics><mml:mrow><mml:mn>3</mml:mn><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo><mml:mn>4</mml:mn><mml:mi>×</mml:mi><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>6</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft53">\begin{document}$3.4\times10^{-6}$\end{document}</tex-math></alternatives></inline-formula>). However, there is a small subset of mutations that shift glycosylation sites by simultaneously disrupting one N-linked glycosylation motif and completing another, where highly beneficial mutations occur far more often than expected by chance (158.3- and 191.1-fold enrichment, <inline-formula><alternatives><mml:math id="inf54"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mn>1.7</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>−</mml:mo><mml:mn>4</mml:mn></mml:mrow></mml:msup></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft54">\begin{document}$p=1.7\times10^{-4}$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf55"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mn>7.9</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>−</mml:mo><mml:mn>11</mml:mn></mml:mrow></mml:msup></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft55">\begin{document}$7.9 \times 10^{-11}$\end{document}</tex-math></alternatives></inline-formula> for CH505 and SHIV.CH505, respectively; 118.7-fold and 90.4-fold enrichment, <inline-formula><alternatives><mml:math id="inf56"><mml:semantics><mml:mrow><mml:mi>𝑝</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>2</mml:mn><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo><mml:mn>0</mml:mn><mml:mi>×</mml:mi><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>4</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft56">\begin{document}$p=2.0\times10^{-4}$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf57"><mml:semantics><mml:mrow><mml:mn>2</mml:mn><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo><mml:mn>3</mml:mn><mml:mi>×</mml:mi><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>7</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft57">\begin{document}$2.3\times10^{-7}$\end{document}</tex-math></alternatives></inline-formula> for CH848 and SHIV.CH848).</p><p>Intuitively, one may expect that strongly beneficial SHIV mutations are more likely to be observed in samples from multiple RMs. However, we found that the number of RMs in which a mutation is observed is only weakly associated with the fitness effect of the mutation (<xref ref-type="fig" rid="fig4">Figure 4</xref>, <xref ref-type="fig" rid="fig4s1">Figure 4—figure supplement 1</xref>). While substantially deleterious SHIV mutations are rarely observed across multiple RMs, neutral and nearly neutral mutations are common. Thus, in this data set, it is not generally true that SHIV mutations observed in multiple hosts must significantly increase viral fitness.</p><fig-group><fig id="fig4" position="float"><label>Figure 4.</label><caption><title>Example trajectories and selection coefficients for SHIV mutations that affect viral load, bnAb recognition, or glycosylation.</title><p>(<bold>A</bold>) In RM5695, infected with SHIV.CH505, mutations known to increase viral load (<xref ref-type="bibr" rid="bib5">Bauer et al., 2023</xref>) and ones affecting glycosylation were rapidly selected. Mutations affecting resistance to broad antibodies (<xref ref-type="bibr" rid="bib75">Roark et al., 2021</xref>) arose later under moderate selection. Open circles and error bars reflect the mean and standard deviation of inferred selection coefficients in each category. (<bold>B</bold>) Slower but qualitatively similar evolutionary patterns were observed in RM6163, infected with SHIV.CH848. For easier visualization, frequency trajectories are shown with exponential smoothing with a time scale of <inline-formula><alternatives><mml:math id="inf58"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:mn>50</mml:mn></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft58">\begin{document}$t = 50$\end{document}</tex-math></alternatives></inline-formula> days.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig4-v1.tif"/></fig><fig id="fig4s1" position="float" specific-use="child-fig"><label>Figure 4—figure supplement 1.</label><caption><title>The number of RMs in which a SHIV mutation was observed is only weakly associated with its inferred fitness effect.</title><p>Weak association between the number of RMs in which a SHIV mutation was observed and its inferred fitness effect. Inferred selection coefficients for SHIV.CH505 (<bold>A</bold>) and SHIV.CH848 (<bold>B</bold>) mutations, sorted by the number of RMs in which the mutation was observed.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig4-figsupp1-v1.tif"/></fig></fig-group><p>We observed some differences between HIV-1 and SHIV in the precise locations of the most beneficial Env mutations. For example, mutations in V4 are highly enriched in CH505 due to a CD8 + T cell epitope in this region, but not in SHIV.CH505 (2.7-fold enrichment, <inline-formula><alternatives><mml:math id="inf59"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mn>0.13</mml:mn></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft59">\begin{document}$p=0.13$\end{document}</tex-math></alternatives></inline-formula>). For SHIV.CH848, beneficial mutations are modestly enriched in V1 and V5 (4.7- and 4.2-fold, <inline-formula><alternatives><mml:math id="inf60"><mml:semantics><mml:mrow><mml:mi>𝑝</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>4</mml:mn><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo><mml:mn>0</mml:mn><mml:mi>×</mml:mi><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>3</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft60">\begin{document}$p=4.0\times10^{-3}$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf61"><mml:semantics><mml:mrow><mml:mn>6</mml:mn><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo><mml:mn>7</mml:mn><mml:mi>×</mml:mi><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft61">\begin{document}$6.7\times10^{-2}$\end{document}</tex-math></alternatives></inline-formula>), as in CH848, but not for V3 (0.9-fold enrichment, <inline-formula><alternatives><mml:math id="inf62"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mn>0.22</mml:mn></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft62">\begin{document}$p=0.22$\end{document}</tex-math></alternatives></inline-formula>).</p><p>Despite some differences in the top mutations, patterns of selection over time in SHIV were very similar to those found for HIV-1. As before, highly beneficial mutations, including ones affecting glycosylation, tended to appear earlier in infection. This was followed by modestly beneficial mutations at later times, including ones involved in resistance to bnAbs in the RMs who developed antibodies with significant breadth (examples in <xref ref-type="fig" rid="fig4">Figure 4</xref>).</p></sec><sec id="s2-6"><title>Detection of SHIV mutations that increase viral load</title><p>A major goal of nonhuman primate studies with SHIV is to faithfully recover important aspects of HIV-1 infection in humans. However, due to the divergence of simian immunodeficiency viruses and HIV-1, SHIVs are not always well-adapted to replication in RMs (<xref ref-type="bibr" rid="bib5">Bauer et al., 2023</xref>). To combat this problem, a recent study identified six SHIV.CH505 mutations that increase viral load (VL) in RMs (<xref ref-type="bibr" rid="bib5">Bauer et al., 2023</xref>). These mutations result in viral kinetics that better mimic HIV-1 infection in humans.</p><p>Our analysis readily identifies the SHIV.CH505 mutations shown to increase VL. Five out of the top six SHIV.CH505 mutations with the largest average selection coefficients are associated with increased VL (<xref ref-type="supplementary-material" rid="supp8">Supplementary file 8</xref>). The final mutation identified by Bauer et al., N130D, is ranked tenth. We also find highly beneficial mutations in SHIV.CH848 that are distinct from those in SHIV.CH505 (<xref ref-type="supplementary-material" rid="supp9">Supplementary file 9</xref>). Highly ranked mutations identified here may be good experimental targets for future studies aimed at increasing SHIV.CH848 replication in vivo.</p></sec><sec id="s2-7"><title>Fitness agreement between HIV-1 and SHIV</title><p>Next, we explored the similarity in the overall viral fitness landscapes inferred for HIV-1 and SHIV, beyond just the top mutations. First, we computed the fitness of each SHIV sequence using the joint SHIV.CH505 and SHIV.CH848 selection coefficients inferred from RM data. Then, we computed fitness values for SHIV sequences using selection coefficients inferred from HIV-1 evolution in CH505 and CH848.</p><p>We observed a remarkable agreement between SHIV fitness values computed from these two sources (<xref ref-type="fig" rid="fig5">Figure 5</xref>). For both SHIV.CH505 and SHIV.CH848, the correlation between viral fitness estimated using data from humans (i.e. CH505 and CH848) and RMs is strongly and linearly correlated (Pearson’s <inline-formula><alternatives><mml:math id="inf63"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mn>0.96</mml:mn></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft63">\begin{document}$r=0.96$\end{document}</tex-math></alternatives></inline-formula> and 0.95, <inline-formula><alternatives><mml:math id="inf64"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>p</mml:mi><mml:mo>&lt;</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>−</mml:mo><mml:mn>20</mml:mn></mml:mrow></mml:msup></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft64">\begin{document}$p \lt 10^{-20}$\end{document}</tex-math></alternatives></inline-formula>). This implies that evolutionary pressures on the envelope protein SHIV-infected RMs are highly similar to those on HIV-1 in humans with the same TF Env. In fact, this relationship holds even beyond the SHIV sequences observed during infection. Fitness estimates for sequences with randomly shuffled sets of mutations are also strongly correlated (<xref ref-type="fig" rid="fig5s1">Figure 5—figure supplement 1</xref>). In contrast, the inferred fitness landscapes of CH505 and CH848, which share few mutations in common, are poorly correlated (<xref ref-type="fig" rid="fig5s2">Figure 5—figure supplement 2</xref>). This suggests that the similarities between viral fitness values in humans and RMs are not artifacts of the model, but rather stem from similarities in underlying evolutionary drivers.</p><fig-group><fig id="fig5" position="float"><label>Figure 5.</label><caption><title>Inferred fitness landscapes in HIV-1 and SHIV are highly similar.</title><p>(<bold>A</bold>) Fitness of SHIV.CH505 sequences relative to the TF sequence across 7 RMs, including 2 that developed bnAbs, 1 that developed tier 2 nAbs that lacked a critical mutation for breadth, and 4 that did not develop broad antibody responses, evaluated using fitness effects of mutations using data from CH505 and using RM data. The fitness values are strongly correlated, indicating the similarity of Env fitness landscapes inferred using HIV-1 or SHIV data. Values are normalized such that the fitness gain of the TF sequence is zero. (<bold>B</bold>) Fitness values for SHIV.CH848 sequences also show strong agreement between CH848 and SHIV.CH848 landscapes.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig5-v1.tif"/></fig><fig id="fig5s1" position="float" specific-use="child-fig"><label>Figure 5—figure supplement 1.</label><caption><title>Randomized sequences show broad similarity between HIV-1 and SHIV fitness landscapes.</title><p>Broad similarity between HIV-1 and SHIV fitness landscapes with the same TF Env sequence. (<bold>A</bold>) Fitness estimates for a sample of artificial Env sequences, obtained by independently shuffling observed amino acids in SHIV.CH505 sequences at each residue. This random sequence ensemble conserves single-residue frequencies, but not correlations between mutations. Even on these artificial sequences, the fitness estimates using a model trained on HIV-1 data strongly agree with the SHIV model (Pearson’s <inline-formula><alternatives><mml:math id="inf65"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mn>0.84</mml:mn></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft65">\begin{document}$r=0.84$\end{document}</tex-math></alternatives></inline-formula>, <inline-formula><alternatives><mml:math id="inf66"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>p</mml:mi><mml:mo>&lt;</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>−</mml:mo><mml:mn>20</mml:mn></mml:mrow></mml:msup></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft66">\begin{document}$p \lt 10^{-20}$\end{document}</tex-math></alternatives></inline-formula>). This implies that the similarity of the fitness landscapes is not confined to the specific genotypes observed in HIV-1 or SHIV evolution, but also extends to more distant sequences. (<bold>B</bold>) Similar results also hold for fitness landscapes based on CH848 and SHIV.CH848 data (Pearson’s <inline-formula><alternatives><mml:math id="inf67"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>R</mml:mi><mml:mo>=</mml:mo><mml:mn>0.74</mml:mn></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft67">\begin{document}$R=0.74$\end{document}</tex-math></alternatives></inline-formula>, <inline-formula><alternatives><mml:math id="inf68"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>p</mml:mi><mml:mo>&lt;</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>−</mml:mo><mml:mn>20</mml:mn></mml:mrow></mml:msup></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft68">\begin{document}$p \lt 10^{-20}$\end{document}</tex-math></alternatives></inline-formula>).</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig5-figsupp1-v1.tif"/></fig><fig id="fig5s2" position="float" specific-use="child-fig"><label>Figure 5—figure supplement 2.</label><caption><title>Little correlation in fitness values estimated from evolutionarily distant sequences.</title><p>Comparison between estimated fitness values for HIV-1 sequences using fitness landscapes learned from CH505 and CH848 data. There is little correlation between the inferred landscapes. Furthermore, the CH505 landscape captures little variation in fitness for CH848 sequences (and vice versa). 199 mutations are shared between CH505 and CH848, among 868 and 1406 total Env mutations, respectively.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig5-figsupp2-v1.tif"/></fig></fig-group></sec><sec id="s2-8"><title>Evolutionary dynamics forecast antibody breadth</title><p>Given the similarity of HIV-1 and SHIV evolution, we sought to identify evolutionary features that distinguish between hosts who develop broad antibody responses and those who do not. <xref ref-type="fig" rid="fig5">Figure 5</xref> shows that SHIV sequences from hosts with bnAbs often reach higher fitness values than those in hosts with only narrow-spectrum antibodies. We hypothesized that stronger selective pressures on the virus might drive viral diversification, stimulating the development of antibody breadth. Past studies have associated higher viral loads with bnAb development and observed viral diversification around the time of bnAb emergence (<xref ref-type="bibr" rid="bib57">Liao et al., 2013</xref>; <xref ref-type="bibr" rid="bib67">Moore et al., 2015</xref>; <xref ref-type="bibr" rid="bib50">Landais and Moore, 2018</xref>). Computational studies and experiments have also shown that sequential exposure to diverse antigens can induce cross-reactive antibodies (<xref ref-type="bibr" rid="bib93">Wang et al., 2015</xref>; <xref ref-type="bibr" rid="bib20">Escolano et al., 2016</xref>; <xref ref-type="bibr" rid="bib88">Sprenger et al., 2020</xref>).</p><p>To further quantify SHIV evolutionary dynamics, we computed the average fitness gain of viral populations in each RM over time. We observed a striking difference in SHIV fitness gains between RMs that developed broad antibody responses and those that did not (<xref ref-type="fig" rid="fig6">Figure 6</xref>). In particular, SHIV fitness increased rapidly before the development of antibody breadth. SHIV fitness gains in RM5695, which developed exceptionally broad and potent antibodies (<xref ref-type="bibr" rid="bib75">Roark et al., 2021</xref>), were especially rapid and dramatic. These fitness differences were not attributable to bnAb resistance mutations, which were only moderately selected and generally appeared after bnAbs developed.</p><fig-group><fig id="fig6" position="float"><label>Figure 6.</label><caption><title>Rapid SHIV fitness gains precede the development of broadly neutralizing antibodies.</title><p>For both SHIV.CH505 (<bold>A</bold>) and SHIV.CH848 (<bold>B</bold>), viral fitness gains over time display distinct patterns in RM hosts that developed bnAbs versus those that did not. Notably, the differences in SHIV fitness gains between hosts with and without broad antibody responses appear before the development of antibody breadth and cannot be attributed to selection for bnAb resistance mutations. RM6072 is an unusual case, exhibiting antibody development that was highly similar to CH505. Although RM6072 developed tier 2 nAbs, they lacked key mutations critical for breadth (<xref ref-type="bibr" rid="bib75">Roark et al., 2021</xref>). Points and error bars show the mean and standard deviation of fitness gains across SHIV samples in each RM at each time.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig6-v1.tif"/></fig><fig id="fig6s1" position="float" specific-use="child-fig"><label>Figure 6—figure supplement 1.</label><caption><title>Contributions of different types of SHIV mutations to viral fitness gains over time.</title><p>SHIV.CH505 (<bold>A</bold>) and SHIV.CH848 (<bold>B</bold>) mutations were grouped into four categories to assess their contributions to SHIV fitness gains over time. For SHIV.CH505, the mutations N334S, H417R, K302N, Y330H, N279D, and N130D are classified as viral load (VL) enhancing mutations, following <xref ref-type="bibr" rid="bib5">Bauer et al., 2023</xref>. For both SHIV.CH505 and SHIV.CH848, we then separated out the contributions of known antibody resistance mutations, including mutations that affect N-linked glycosylation motifs. We then computed the collective fitness contributions from subsets of mutations that affect N-linked glycosylation motifs that were not known to affect resistance to specific antibodies and reversions to the HIV-1 subtype consensus sequence. Each mutation appears in only one category in this figure, sorted in the order above. For example, a mutation that affects an N-linked glycosylation motif and which is a reversion to the subtype consensus sequence, but which has not been established to affect resistance to a specific antibody, would have its contribution to fitness counted in the glycan category.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig6-figsupp1-v1.tif"/></fig><fig id="fig6s2" position="float" specific-use="child-fig"><label>Figure 6—figure supplement 2.</label><caption><title>Distribution of inferred epistatic interactions.</title><p>Most of the inferred epistatic interactions concentrate around zero, with only a small fraction exhibiting moderately larger absolute values. Distribution of inferred epistatic interactions for CH505 (<bold>A</bold>) CH848 (<bold>B</bold>) SHIV.CH505 (<bold>C</bold>) and SHIV.CH848 (<bold>D</bold>).</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig6-figsupp2-v1.tif"/></fig><fig id="fig6s3" position="float" specific-use="child-fig"><label>Figure 6—figure supplement 3.</label><caption><title>Similarity between effective selection coefficients obtained from the epistatic model and selection coefficients in the additive model.</title><p>Effective selection coefficients obtained from the epistatic model align well with the selection coefficients in the additive model. We compared selection coefficients from the additive model analyzed throughout the manuscript to the effective selection coefficients from the epistatic model for CH505 (<bold>A</bold>) and CH848 (<bold>B</bold>). Intuitively, the effective selection coefficient is defined as the average difference in fitness when a particular mutation is replaced by the TF nucleotide/amino acid. For definiteness, let <inline-formula><alternatives><mml:math id="inf69"><mml:semantics><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft69">\begin{document}$g$\end{document}</tex-math></alternatives></inline-formula> represent an arbitrary sequence and let <inline-formula><alternatives><mml:math id="inf70"><mml:semantics><mml:mrow><mml:msup><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mo class="MathClass-bin" stretchy="false">∗</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft70">\begin{document}$g^{i*}$\end{document}</tex-math></alternatives></inline-formula> represent a sequence that is identical to <inline-formula><alternatives><mml:math id="inf71"><mml:semantics><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft71">\begin{document}$g$\end{document}</tex-math></alternatives></inline-formula>, except that the nucleotide/amino acid at site <inline-formula><alternatives><mml:math id="inf72"><mml:semantics><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft72">\begin{document}$i$\end{document}</tex-math></alternatives></inline-formula> has been replaced by the TF one. The effective selection coefficient is then defined as <inline-formula><alternatives><mml:math id="inf73"><mml:semantics><mml:mrow><mml:msubsup><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="normal"><mml:mi>@</mml:mi></mml:mstyle><mml:mi>@</mml:mi><mml:mi>𝑒</mml:mi><mml:mi>𝑓</mml:mi><mml:mi>𝑓</mml:mi></mml:mrow></mml:msubsup><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mi>⟨</mml:mi><mml:mi>𝐹</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑔</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mi>𝐹</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msup><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mo class="MathClass-bin" stretchy="false">∗</mml:mo></mml:mrow></mml:msup><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:msub><mml:mrow><mml:mi>⟩</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑔</mml:mi><mml:mi>∈</mml:mi><mml:mstyle mathvariant="normal"><mml:mi>@</mml:mi></mml:mstyle><mml:mi>@</mml:mi><mml:mi>𝑑</mml:mi><mml:mi>𝑎</mml:mi><mml:mi>𝑡</mml:mi><mml:mi>𝑎</mml:mi><mml:mi>|</mml:mi><mml:msub><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mi>𝑎</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft73">\begin{document}$s_i^{\mathrm@@{eff}}(a) = \langleF(g) - F(g^{i*}) \rangle_{g \in\mathrm@@{data}| g_i=a}$\end{document}</tex-math></alternatives></inline-formula>, where the average runs over all the sequences in the data set that have mutant allele <inline-formula><alternatives><mml:math id="inf74"><mml:semantics><mml:mrow><mml:mi>𝑎</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft74">\begin{document}$a$\end{document}</tex-math></alternatives></inline-formula> at site. <inline-formula><alternatives><mml:math id="inf75"><mml:semantics><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft75">\begin{document}$i$\end{document}</tex-math></alternatives></inline-formula> Similarly, we compared selection from the additive and epistatic models for SHIV.CH505 (<bold>C</bold>) and SHIV.CH848 (<bold>D</bold>).</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig6-figsupp3-v1.tif"/></fig><fig id="fig6s4" position="float" specific-use="child-fig"><label>Figure 6—figure supplement 4.</label><caption><title>Comparison between fitness values in the additive and epistatic models.</title><p>Fitness values are consistent between the additive and epistatic models. Comparison of the fitness values obtained from the additive and epistatic models for CH505 (<bold>A</bold>), CH848 (<bold>B</bold>), SHIV.CH505 (<bold>C</bold>), and SHIV.CH848 (<bold>D</bold>), respectively.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig6-figsupp4-v1.tif"/></fig><fig id="fig6s5" position="float" specific-use="child-fig"><label>Figure 6—figure supplement 5.</label><caption><title>Robustness of the inferred selection coefficients using bootstrap resampling.</title><p>Selection coefficients are robust to finite sampling noise. Selection coefficients from the full and bootstrap-resampled data are compared for CH505 (<bold>A</bold>), CH848 (<bold>B</bold>), SHIV.CH505 (<bold>C</bold>), and SHIV.CH848 (<bold>D</bold>). Each point and error bar represents the mean and confidence interval, respectively, based on 10 independently inferred selection coefficients from bootstrap samples. The bootstrap samples are obtained by uniformly resampling the same number of sequences from the sequence ensemble for each subject at each time point.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-105466-fig6-figsupp5-v1.tif"/></fig></fig-group><p>One outlier in this pattern is RM6072, infected with SHIV.CH505. Antibody development in RM6072 followed a path that was remarkably similar to CH505, including a lineage of antibodies, DH650, directed toward the CD4 binding site of Env (<xref ref-type="bibr" rid="bib75">Roark et al., 2021</xref>). However, resistance to the DH650 lineage is conferred by a strongly selected mutation that adds a glycan at site 234 (T234N, with an inferred selection coefficient of 4.5%). Broadly neutralizing antibodies similar to DH650 are able to accommodate this glycan due to shorter and/or more flexible light chains (<xref ref-type="bibr" rid="bib100">Zhou et al., 2013</xref>; <xref ref-type="bibr" rid="bib75">Roark et al., 2021</xref>), but DH650 cannot. Antibody evolution in RM6072 thus proceeded along a clear pathway toward bnAb development but lacked critical mutations to achieve breadth.</p><p>Next, we quantified how different types of SHIV mutations contributed to viral fitness gains over time. We examined contributions from VL-enhancing mutations (<xref ref-type="bibr" rid="bib5">Bauer et al., 2023</xref>), antibody escape mutations (<xref ref-type="bibr" rid="bib5">Bauer et al., 2023</xref>; <xref ref-type="bibr" rid="bib75">Roark et al., 2021</xref>), other mutations affecting Env glycosylation, and reversions to subtype consensus. We found increased fitness gains across all types of mutations in RMs that developed broad antibody responses, compared to those that did not (<xref ref-type="fig" rid="fig6s1">Figure 6—figure supplement 1</xref>). VL-enhancing mutations, known antibody resistance mutations, and reversions typically made the largest contributions to viral fitness.</p></sec><sec id="s2-9"><title>Robustness of inferred selection to changes in the fitness model and finite sampling</title><p>In the analysis above, we used a simple model where the net fitness effect of multiple mutations is simply equal to the sum of their individual effects. Recently, methods have also been developed that can infer epistatic fitness effects from data, which include pairwise interactions between mutations (<xref ref-type="bibr" rid="bib86">Sohail et al., 2022</xref>; <xref ref-type="bibr" rid="bib84">Shimagaki and Barton, 2025b</xref>). We reanalyzed these data to examine how inferred fitness changes when epistasis is included in the model, using the approach of Shimagaki and Barton (2025; Methods). Overall, the inferred epistatic interactions were modest (<xref ref-type="fig" rid="fig6s2">Figure 6—figure supplement 2</xref>). In CH505, we found that the CD4 binding site, V1 (especially sites 136–146 in HXB2 numbering) and V5 regions were modestly but significantly enriched in the most beneficial (top 1%) of epistatic interactions (2.5-, 1.2-, and 1.8-fold enrichment with <inline-formula><alternatives><mml:math id="inf76"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mn>1.0</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>−</mml:mo><mml:mn>21</mml:mn></mml:mrow></mml:msup><mml:mo>,</mml:mo><mml:mn>6.3</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>−</mml:mo><mml:mn>6</mml:mn></mml:mrow></mml:msup></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft76">\begin{document}$p=1.0 \times 10^{-21}, 6.3 \times 10^{-6}$\end{document}</tex-math></alternatives></inline-formula> and 6.3 × 10<sup>-5</sup>, respectively). Epistatic interactions between N280S/V281A and E275K/V281G, which confer resistance to CH235 (<xref ref-type="bibr" rid="bib27">Gao et al., 2014</xref>), ranked in the top 6.5% and 13.0% of interactions. In CH848, we found 1.3-, 1.5-, and 2.3-fold enrichment in strong beneficial epistatic interactions in the CD4 binding site, V4, and V5 regions, respectively (<inline-formula><alternatives><mml:math id="inf77"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mn>4.0</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>−</mml:mo><mml:mn>6</mml:mn></mml:mrow></mml:msup><mml:mo>,</mml:mo><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mn>2.5</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>−</mml:mo><mml:mn>14</mml:mn></mml:mrow></mml:msup></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft77">\begin{document}$p=4.0 \times 10^{-6}, p=2.5 \times 10^{-14}$\end{document}</tex-math></alternatives></inline-formula> and 3.2 × 10<sup>-19</sup>).</p><p>To compare the typical fitness effects of individual mutations in the model with epistasis to those in the additive model, we computed effective selection coefficients for the epistatic model. For each mutant allele <inline-formula><alternatives><mml:math id="inf78"><mml:semantics><mml:mrow><mml:mi>𝑎</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft78">\begin{document}$a$\end{document}</tex-math></alternatives></inline-formula> at each site <inline-formula><alternatives><mml:math id="inf79"><mml:semantics><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft79">\begin{document}$i$\end{document}</tex-math></alternatives></inline-formula>, we computed the average difference in fitness between sequences in the data set with the mutation and hypothetical sequences that are the same as those in the data, except with the mutant allele <inline-formula><alternatives><mml:math id="inf80"><mml:semantics><mml:mrow><mml:mi>𝑎</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft80">\begin{document}$a$\end{document}</tex-math></alternatives></inline-formula> reverted to the TF one. In this way, the effective selection coefficient measures the typical effect of each mutation in the data set, while also accounting for epistatic interactions with the sequence background. We found that the effective selection coefficients were highly correlated with the selection coefficients from the additive model (<xref ref-type="fig" rid="fig6s3">Figure 6—figure supplement 3</xref>). We also found strong agreement between the additive and epistatic model fitness values for each sequence in both HIV-1 and SHIV data (<xref ref-type="fig" rid="fig6s4">Figure 6—figure supplement 4</xref>).</p><p>Finite sampling of sequence data could also affect our analyses. To further test the robustness of our results, we inferred selection coefficients using bootstrap resampling, where we resample sequences from the original ensemble, maintaining the same number of sequences for each time point and subject. The selection coefficients from the bootstrap samples are consistent with the original data (see <xref ref-type="fig" rid="fig6s5">Figure 6—figure supplement 5</xref> for a typical example), with Pearson’s <inline-formula><alternatives><mml:math id="inf81"><mml:semantics><mml:mrow><mml:mi>𝑟</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft81">\begin{document}$r$\end{document}</tex-math></alternatives></inline-formula> values of around 0.85 for HIV-1 data sets and 0.95 for SHIV data sets, respectively.</p></sec></sec><sec id="s3" sec-type="discussion"><title>Discussion</title><p>HIV-1 evolves under complex selective pressures within individual hosts, balancing replicative efficiency with immune evasion. Here, we quantitatively studied the evolution of HIV-1 and SHIV (featuring HIV-1-derived Env sequences) across multiple hosts, including some who developed broad antibody responses against the virus. Our study highlighted how different classes of mutations (e.g. mutations affecting T cell escape or Env glycosylation) affect fitness in vivo. In both HIV-1 and SHIV, we found strong selection for reversions to subtype consensus and some mutations that affected N-linked glycosylation motifs or resistance to autologous strain-specific antibodies. Few CD8 + T cell epitopes were identified in this data set, but the T cell escape mutations that we did observe were highly beneficial for the virus. Consistent with past work studying VRC26 escape in CAP256, we observed more modest selection for bnAb resistance mutations (<xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref>).</p><p>Overall, we found striking similarities between Env evolution in humans and RMs. Importantly, these parallels extend beyond the observation of repetitive mutations: the number of hosts in which a mutation was observed was only weakly associated with the mutation’s fitness effect (<xref ref-type="fig" rid="fig4s1">Figure 4—figure supplement 1</xref>). Our inferred Env fitness values in humans and RMs were highly correlated, indicating that the functional and immune constraints shaping Env evolution in HIV-1 and SHIV infection are very similar. Our findings, therefore, reinforce SHIV as a model system that closely mirrors HIV-1 infection.</p><p>We discovered that the speed of SHIV fitness gains was clearly higher in RMs that developed broad antibody responses than in those with narrow-spectrum antibodies. Fitness gains in the viral population preceded the development of bnAbs, and they were not driven by bnAb resistance mutations. This suggests that rapid changes in the viral population are a cause rather than a consequence of antibody breadth. While our sample is limited to 13 RMs and two founder Env sequences, we find a clear separation between RMs that did or did not develop antibody breadth. Thus, the dynamics of viral fitness may serve as a quantitative signal associated with bnAb development.</p><p>The induction of bnAbs is a major goal of HIV-1 vaccine design (<xref ref-type="bibr" rid="bib35">Haynes et al., 2023</xref>). Both computational (<xref ref-type="bibr" rid="bib93">Wang et al., 2015</xref>; <xref ref-type="bibr" rid="bib81">Shaffer et al., 2016</xref>; <xref ref-type="bibr" rid="bib88">Sprenger et al., 2020</xref>; <xref ref-type="bibr" rid="bib70">Nourmohammad et al., 2016</xref>) and experimental (<xref ref-type="bibr" rid="bib18">Dosenovic et al., 2015</xref>; <xref ref-type="bibr" rid="bib20">Escolano et al., 2016</xref>; <xref ref-type="bibr" rid="bib98">Williams et al., 2023</xref>) studies, as well as observations from individuals who developed bnAbs (<xref ref-type="bibr" rid="bib27">Gao et al., 2014</xref>; <xref ref-type="bibr" rid="bib57">Liao et al., 2013</xref>; <xref ref-type="bibr" rid="bib10">Bonsignori et al., 2017</xref>), suggest that the co-evolution of antibodies and HIV-1 is important to stimulate broad antibody responses. Our results could thus inform HIV-1 vaccine research. While precise immune responses and viral escape pathways can differ across individuals, the quantitative similarity in viral evolutionary constraints across humans and RMs suggests that SHIV data can provide a valuable source of information about Env variants that contribute to bnAb development, especially when detailed longitudinal data from humans does not exist. While the concept of sequential immunization is well-established (<xref ref-type="bibr" rid="bib71">Pancera et al., 2010</xref>; <xref ref-type="bibr" rid="bib33">Haynes et al., 2012</xref>; <xref ref-type="bibr" rid="bib45">Klein et al., 2013</xref>; <xref ref-type="bibr" rid="bib93">Wang et al., 2015</xref>; <xref ref-type="bibr" rid="bib20">Escolano et al., 2016</xref>), our findings also suggest a possible new design principle. Immunogens could be engineered to reproduce the dynamics of viral population change that are associated with rapid fitness gains, which we found to precede the emergence of bnAbs. This emphasis on broader, population-level dynamics could complement investigations of the molecular details of virus and antibody coevolution.</p><p>As noted above, Roark and collaborators also performed a detailed comparison of HIV-1 and SHIV evolution with the same TF Env sequences (<xref ref-type="bibr" rid="bib75">Roark et al., 2021</xref>). One of their main conclusions was that most Env mutations were selected for escape from CD8<sup>+</sup> T cells or antibodies. We found that many antibody resistance mutations identified by Roark et al. are also positively selected in our analysis. Mutations at sites 166 and 169 were shown to confer resistance to a V2 apex bnAb, RHA1, isolated in RM5695 (<xref ref-type="bibr" rid="bib75">Roark et al., 2021</xref>). We inferred moderately positive selection coefficients of 0.49% and 0.43% for R166K and R169K, respectively. The same mutations were found in RM6070, which also developed V2 apex bnAbs, with a selective advantage of 1.7% (<xref ref-type="supplementary-material" rid="supp10">Supplementary file 10</xref>). Mutations conferring resistance to autologous strain-specific nAbs were identified at multiple sites by Roark and colleagues: 130, 234, 279, 281, 302, 330, and 334 in RM6072, which developed antibody responses targeting the CD4 binding site (DH650) and V3 (DH647 and DH648) regions. Mutations Y330H and N334S, which confer resistance to V3 autologous nAbs, were detected in all RMs infected with SHIV.CH505, with selective advantages of 3.0% and 4.6% in RM6072, and 1.7% and 3.2% on average across RMs, respectively. Overall, we found that mutations conferring resistance to autologous strain-specific antibodies were common and more strongly selected than bnAb resistance mutations (<xref ref-type="supplementary-material" rid="supp10">Supplementary file 10</xref> and <xref ref-type="supplementary-material" rid="supp11">Supplementary file 11</xref>).</p><p>We note that our conclusions about the phenotypic effects of HIV-1 mutations under selection are constrained by the available data. While we observed strong selection for strain-specific antibody resistance mutations, these results could also be affected by the effects of these mutations on viral replication independent of immune escape. In particular, many ssAb resistance mutations are also reversions to the subtype consensus sequence, which have often been observed to improve viral fitness (<xref ref-type="bibr" rid="bib99">Zanini et al., 2015</xref>; <xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref>). For example, N334S, K302N, and T234N are all reversions. These are among the most beneficial mutations inferred for SHIV.CH505 (<xref ref-type="supplementary-material" rid="supp8">Supplementary file 8</xref>). In future work, it would be interesting to attempt to fully separate the fitness effects of mutations due to antibody escape and intrinsic replication (<xref ref-type="bibr" rid="bib28">Gao and Barton, 2025</xref>). Although we have systematically compiled information about mutations known to affect antibody resistance and glycosylation, this data is necessarily incomplete. Some of the strongly beneficial mutations with unknown functional effects that we observe could therefore reflect escape from unmapped immune responses.</p><p>There are additional methodological and technical limitations that should be considered in the interpretation of our results. Most notably, we assume that the viral fitness landscape is static in time. While we do not expect selection for effective replication (‘intrinsic’ fitness) to change substantially over time, pressure for immune escape could vary along with the immune responses that drive them. In prior work, we have found that constant selection coefficients typically reflect the average fitness effect of a mutation when its true contribution to fitness is time-varying (<xref ref-type="bibr" rid="bib28">Gao and Barton, 2025</xref>; <xref ref-type="bibr" rid="bib52">Lee et al., 2025</xref>). This may not adequately describe mutational effects that undergo large or rapid shifts in time. Future work should also examine temporal patterns in selection for individual mutations.</p><p>While we found a strong relationship between viral fitness dynamics and the emergence of bnAbs, it may not be true that the former stimulates the latter. For example, bnAbs may have been present within each host before they were experimentally detected. Rapid viral fitness gains within hosts that developed broad antibody responses could then have been driven by undetected bnAb lineages. However, we did not find strong selection for known bnAb resistance mutations, and in at least one case (RM5695), rapid fitness gains (roughly 2 weeks after infection) substantially preceded bnAb detection (16 weeks). Still, given the limited size of the data set that we studied, it is unclear the extent to which our results will transfer to larger and broader data sets.</p><p>Among other analyses, Roark et al. used LASSIE (<xref ref-type="bibr" rid="bib40">Hraber et al., 2015</xref>) to identify putative sites under selection (<xref ref-type="supplementary-material" rid="supp12">Supplementary file 12</xref> and <xref ref-type="supplementary-material" rid="supp13">Supplementary file 13</xref>). This method works by identifying sites where non-TF alleles reach high frequencies. We found modest overlap between the sites under selection as identified by LASSIE and the mutations that we inferred to be the most strongly selected. For SHIV.CH505, the E640D mutation at site 640 identified by LASSIE is ranked second among 664 mutations in our analysis, and mutations at the remaining 5 sites identified by LASSIE are all within the top 20% of mutations that we infer to be the most beneficial. For SHIV.CH848, the R363Q mutation that is ranked first in our analysis appears at one of the 17 sites identified by LASSIE. Some mutations at the majority of these 17 sites fall within the top 20% most beneficial mutations in our analysis, but some are outliers. In particular, we infer both S291A/P to be somewhat deleterious, with S291P ranked 810th out of 863 mutations.</p><p>Beyond the specific context of HIV-1 and bnAb development, our study also provides insight into viral evolution across hosts and related host species. Parallels between the HIV-1 and SHIV fitness landscapes that we infer suggest that there are strong constraints on viral protein function, with few paths to significantly higher fitness. This is consistent with the ideas of methods that use sequence statistics across multiple individuals and hosts to predict the fitness effects of mutations (<xref ref-type="bibr" rid="bib25">Ferguson et al., 2013</xref>; <xref ref-type="bibr" rid="bib63">Mann et al., 2014</xref>; <xref ref-type="bibr" rid="bib51">Lässig et al., 2017</xref>; <xref ref-type="bibr" rid="bib61">Łuksza and Lässig, 2014</xref>; <xref ref-type="bibr" rid="bib3">Barton et al., 2016</xref> <xref ref-type="bibr" rid="bib60">Louie et al., 2018</xref> <xref ref-type="bibr" rid="bib37">Hie et al., 2021</xref>). However, the relationship between the number of individuals in which a mutation was observed and its inferred fitness effect was fairly weak. This suggests that mutational biases and/or sequence space accessibility may play significant roles in short-term viral evolution, even for highly mutable viruses such as HIV-1 and SHIV. As described above, high-frequency mutations were also not necessarily highly beneficial. While the recombination rate of HIV-1 is high, correlations between mutations persist, making it difficult to unambiguously interpret frequency changes as signs of selection (<xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref>).</p><p>Our results also point to strong similarities in the immune environment across closely related host species, including preferential targeting of specific parts of viral surface proteins by antibodies. This is supported by the enrichment of beneficial mutations within variable loop regions and at sites that affect the glycosylation of Env. However, despite these constraints, there may still exist a large number of neutral or nearly-neutral mutational paths that remain unexplored.</p><p>Overall, our findings support the potential predictability of viral evolution, at least over short time scales. While there are contingencies in evolution – for example, disparate host immune responses or strong epistatic constraints between mutations – these are not so pervasive that they completely change the effective viral fitness landscape or paths of evolution across hosts, given the same founder virus sequence. Similar observations of parallel evolution in HIV-1 have been reported in monozygotic twins infected by the same founder virus (<xref ref-type="bibr" rid="bib19">Draenert et al., 2006</xref>), common patterns of immune escape across hosts (<xref ref-type="bibr" rid="bib12">Choisy et al., 2004</xref>; <xref ref-type="bibr" rid="bib3">Barton et al., 2016</xref>) and drug resistance (<xref ref-type="bibr" rid="bib96">Wensing et al., 2016</xref>; <xref ref-type="bibr" rid="bib22">Feder et al., 2014</xref>; <xref ref-type="bibr" rid="bib23">Feder et al., 2016</xref>; <xref ref-type="bibr" rid="bib24">Feder et al., 2021</xref>), and long-term experimental evolution (<xref ref-type="bibr" rid="bib8">Bons et al., 2020</xref>). Our results thus contribute to a growing body of research identifying predictable features in viral evolution. Understanding such features could ultimately inform practical applications such as anticipating the emergence of drug resistance or designing vaccines to limit likely pathways of escape.</p></sec><sec id="s4" sec-type="methods"><title>Methods</title><sec id="s4-1"><title>Data</title><p>We retrieved HIV-1 sequences from CH505 (703010505) and CH848 (703010848) from the HIV sequence database at Los Alamos National Laboratory (LANL) (<xref ref-type="bibr" rid="bib58">Los Alamos National Laboratory, 2023a</xref>). The rhesus macaque (RM) SHIV sequences (<xref ref-type="bibr" rid="bib75">Roark et al., 2021</xref>) were obtained from GenBank (<xref ref-type="bibr" rid="bib6">Benson et al., 2012</xref>). We then co-aligned SHIV.CH505 and SHIV.CH848 sequences with CH505 and CH848 HIV-1 sequences, respectively, using HIValign (<xref ref-type="bibr" rid="bib59">Los Alamos National Laboratory, 2023b</xref>).</p><sec id="s4-1-1"><title>CH505</title><p>CH505 developed two distinct lineages of CD4 binding site (CD4bs) bnAbs, CH103 and CH235 (<xref ref-type="bibr" rid="bib27">Gao et al., 2014</xref>; <xref ref-type="bibr" rid="bib47">Kreer et al., 2023</xref>). CH103 antibodies were detectable by 14 weeks after infection and further developed neutralization breadth between 41–92 weeks (<xref ref-type="bibr" rid="bib57">Liao et al., 2013</xref>). IC50 values of CH235 against the TF virus were 6.5-fold lower than those of CH103 (<xref ref-type="bibr" rid="bib27">Gao et al., 2014</xref>). CH235 lineages could neutralize autologous viruses at week 30. However, viruses that acquired mutations at loop D from 53 to 100 weeks escaped CH235 neutralization (<xref ref-type="bibr" rid="bib27">Gao et al., 2014</xref>). Although the neutralization breadth of CH235 was not as broad as that of CH103, this lineage played a critical role; escaping mutations from the CH235 lineage stimulated the development of another lineage with broader neutralization depth (<xref ref-type="bibr" rid="bib27">Gao et al., 2014</xref>). Mutations in loop D enabled the virus to escape from CH235, but these sequential mutations in loop D, such as E275K, N279D, and V281S, favorably bound to the mature CH103 and continuously increased the binding affinity between mature CH103 and loop D (<xref ref-type="bibr" rid="bib27">Gao et al., 2014</xref>). Gradually, CH103 matured, developing a broader neutralization breadth.</p></sec><sec id="s4-1-2"><title>CH848</title><p>CH848 developed DH270, a bnAb that targets the glycosylated site adjacent to the third variable loop (V3). DH270 was detectable three and a half years after infection (<xref ref-type="bibr" rid="bib10">Bonsignori et al., 2017</xref>). Similar to the CH505 case, the CH848 case exhibited cooperative virus and antibody coevolution. The earlier antibody lineages, DH272 and DH475, could neutralize autologous viruses until week 51 and weeks 15–39, respectively. The virus escaped from DH272 and DH475 afterward, with escape mutations including a longer V1V2 loop. DH270 then developed, with potent and broad neutralization breadth (<xref ref-type="bibr" rid="bib10">Bonsignori et al., 2017</xref>).</p></sec><sec id="s4-1-3"><title>Rhesus macaques</title><p>Chimeric viruses, SHIVs, were constructed by bearing the transmitted/founder (TF) Env from three HIV-1 patients, including CH505 and CH848 (<xref ref-type="bibr" rid="bib75">Roark et al., 2021</xref>). In some RMs, SHIV developed similar patterns of mutations to those observed in human donors. In our analysis, we considered RMs with SHIV sequences sampled at at least three points in time. This yielded a set of 7 RMs and 6 RMs for SHIV.CH505 and SHIV.CH848, respectively. The <xref ref-type="supplementary-material" rid="supp6">Supplementary file 6</xref> and <xref ref-type="supplementary-material" rid="supp7">Supplementary file 7</xref> summarize the number of sequences, time points, and the development of bnAbs for each individual in the SHIV cases as well as HIV-1 cases.</p></sec></sec><sec id="s4-2"><title>Sequence data processing</title><sec id="s4-2-1"><title>Data quality control</title><p>To focus our analysis on functional sequences, we removed sequences with more than 200 gaps. To eliminate rare insertions or possible alignment errors, we also masked sites where gaps occurred in more than 95% of sequences within each individual host. To limit errors in virus frequencies, we only considered data from time points with four or more sequences.</p></sec><sec id="s4-2-2"><title>Identifying reversions</title><p>A mutation is classified as a reversion if the new (mutant) nucleotide matches with the nucleotide at the same site in the HIV-1 consensus sequence from the same subtype. Here, all viruses were subtype C, so we compared with the subtype C consensus sequence as defined by LANL.</p></sec><sec id="s4-2-3"><title>Identifying mutations that affect N-linked glycosylation</title><p>To identify mutations that affect glycosylation, we search for Env mutations that modify the N-linked glycosylation motif Asn-X-Ser/Thr, where X can be any amino acid except proline. We identified three types of mutations affecting glycosylation: ‘shields’, which complete a previously incomplete glycosylation motif, ‘holes’, which disrupt an existing glycosylation motif, and ‘shifts’, which simultaneously complete one N-linked glycosylation motif and disrupt another.</p></sec><sec id="s4-2-4"><title>Enrichment analysis</title><p>We used fold enrichment values and Fisher’s exact test to quantify the excess or lack of mutations. For a particular subset of mutations (for example, the top <inline-formula><alternatives><mml:math id="inf82"><mml:semantics><mml:mrow><mml:mi>𝑥</mml:mi><mml:mi>%</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft82">\begin{document}$x\%$\end{document}</tex-math></alternatives></inline-formula> beneficial mutations), we first computed the number of mutations in that subset that do (<inline-formula><alternatives><mml:math id="inf83"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>sel</mml:mtext></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft83">\begin{document}$n_{\text{sel}}$\end{document}</tex-math></alternatives></inline-formula>) and do not (<inline-formula><alternatives><mml:math id="inf84"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑁</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>sel</mml:mtext></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft84">\begin{document}$N_{\text{sel}}$\end{document}</tex-math></alternatives></inline-formula>) have a particular property (e.g. nonsynonymous mutations in the CD4 binding site). We then computed the total number of mutations that do and do not have the property (<inline-formula><alternatives><mml:math id="inf85"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>null</mml:mtext></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft85">\begin{document}$n_{\text{null}}$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf86"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑁</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>null</mml:mtext></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft86">\begin{document}$N_{\text{null}}$\end{document}</tex-math></alternatives></inline-formula>, respectively) across the entire data set. The fold enrichment value is then <inline-formula><alternatives><mml:math id="inf87"><mml:semantics><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>sel</mml:mtext></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-bin" stretchy="false">∕</mml:mo><mml:msub><mml:mrow><mml:mi>𝑁</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>sel</mml:mtext></mml:mstyle></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>null</mml:mtext></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-bin" stretchy="false">∕</mml:mo><mml:msub><mml:mrow><mml:mi>𝑁</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>null</mml:mtext></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:semantics></mml:math><tex-math id="inft87">\begin{document}$\frac{n_{\text{sel}}/N_{\text{sel}}}{n_{\text{null}}/N_{\text{null}}} $\end{document}</tex-math></alternatives></inline-formula>. The term <inline-formula><alternatives><mml:math id="inf88"><mml:semantics><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>sel</mml:mtext></mml:mstyle></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑁</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>sel</mml:mtext></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:semantics></mml:math><tex-math id="inft88">\begin{document}$ \frac{n_{\text{sel}}}{N_{\text{sel}}} $\end{document}</tex-math></alternatives></inline-formula> quantifies the fraction of mutations having specific properties across the selected mutations, while the denominator <inline-formula><alternatives><mml:math id="inf89"><mml:semantics><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>null</mml:mtext></mml:mstyle></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑁</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>null</mml:mtext></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:semantics></mml:math><tex-math id="inft89">\begin{document}$\frac{n_{\text{null}}}{N_{\text{null}}}$\end{document}</tex-math></alternatives></inline-formula> is the fraction of all mutations that have the property. Fisher’s exact <inline-formula><alternatives><mml:math id="inf90"><mml:semantics><mml:mrow><mml:mi>𝑝</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft90">\begin{document}$ p $\end{document}</tex-math></alternatives></inline-formula> values are computed from the 2 × 2 table with <inline-formula><alternatives><mml:math id="inf91"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>sel</mml:mtext></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft91">\begin{document}$ n_{\text{sel}} $\end{document}</tex-math></alternatives></inline-formula>, <inline-formula><alternatives><mml:math id="inf92"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>null</mml:mtext></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>sel</mml:mtext></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft92">\begin{document}$ n_{\text{null}} - n_{\text{sel}} $\end{document}</tex-math></alternatives></inline-formula> in the first row, and <inline-formula><alternatives><mml:math id="inf93"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑁</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>sel</mml:mtext></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>sel</mml:mtext></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft93">\begin{document}$ N_{\text{sel}} - n_{\text{sel}} $\end{document}</tex-math></alternatives></inline-formula>, <inline-formula><alternatives><mml:math id="inf94"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑁</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>null</mml:mtext></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:msub><mml:mrow><mml:mi>𝑁</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>sel</mml:mtext></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>null</mml:mtext></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:msub><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>sel</mml:mtext></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft94">\begin{document}$ N_{\text{null}} - N_{\text{sel}} - (n_{\text{null}} - n_{\text{sel}}) $\end{document}</tex-math></alternatives></inline-formula> in the second row (<xref ref-type="bibr" rid="bib78">Ruxton and Neuhäuser, 2010</xref>).</p></sec></sec><sec id="s4-3"><title>Inferring fitness effects of mutations</title><p>In this section, we describe the inference framework used to infer the fitness effects of mutations (selection coefficients) from temporal genetic data.</p><sec id="s4-3-1"><title>Evolutionary model</title><p>We model viral evolution with the Wright-Fisher (WF) model, a fundamental model in population genetics (<xref ref-type="bibr" rid="bib21">Ewens, 2004</xref>). In this model, a population of <inline-formula><alternatives><mml:math id="inf95"><mml:semantics><mml:mrow><mml:mi>𝑁</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft95">\begin{document}$N$\end{document}</tex-math></alternatives></inline-formula> individuals (viruses or infected cells, in our case) undergoes discrete rounds of selection, mutation, and replication. Each genotype <inline-formula><alternatives><mml:math id="inf96"><mml:semantics><mml:mrow><mml:mi>𝛼</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft96">\begin{document}$\alpha$\end{document}</tex-math></alternatives></inline-formula> is represented by a sequence <inline-formula><alternatives><mml:math id="inf97"><mml:semantics><mml:mrow><mml:msup><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow><mml:mrow><mml:mi>𝛼</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:msubsup><mml:mrow><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msubsup><mml:mrow><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msubsup><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑎</mml:mi></mml:mrow><mml:mrow><mml:mi>𝛼</mml:mi></mml:mrow></mml:msubsup><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>𝑞</mml:mi></mml:mrow></mml:msubsup><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>𝐿</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:semantics></mml:math><tex-math id="inft97">\begin{document}$g^\alpha= ((g_{i,a}^\alpha)_{a=1}^q)_{i=1}^L$\end{document}</tex-math></alternatives></inline-formula>, where <inline-formula><alternatives><mml:math id="inf98"><mml:semantics><mml:mrow><mml:msubsup><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑎</mml:mi></mml:mrow><mml:mrow><mml:mi>𝛼</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:semantics></mml:math><tex-math id="inft98">\begin{document}$g_{i,a}^\alpha$\end{document}</tex-math></alternatives></inline-formula> is equal to one if genotype <inline-formula><alternatives><mml:math id="inf99"><mml:semantics><mml:mrow><mml:mi>𝛼</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft99">\begin{document}$\alpha$\end{document}</tex-math></alternatives></inline-formula> has allele <inline-formula><alternatives><mml:math id="inf100"><mml:semantics><mml:mrow><mml:mi>𝑎</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft100">\begin{document}$a$\end{document}</tex-math></alternatives></inline-formula> at locus <inline-formula><alternatives><mml:math id="inf101"><mml:semantics><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft101">\begin{document}$i$\end{document}</tex-math></alternatives></inline-formula> and zero otherwise. Here, <inline-formula><alternatives><mml:math id="inf102"><mml:semantics><mml:mrow><mml:mi>𝐿</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft102">\begin{document}$L$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf103"><mml:semantics><mml:mrow><mml:mi>𝑞</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft103">\begin{document}$q$\end{document}</tex-math></alternatives></inline-formula> represent the length of the genetic sequence (number of loci) and the number of statues at each locus (i.e. number of nucleotides or amino acids), respectively. We use <inline-formula><alternatives><mml:math id="inf104"><mml:semantics><mml:mrow><mml:mi>𝑞</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>5</mml:mn></mml:mrow></mml:semantics></mml:math><tex-math id="inft104">\begin{document}$q=5$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf105"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>q</mml:mi><mml:mo>=</mml:mo><mml:mn>21</mml:mn></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft105">\begin{document}$q=21$\end{document}</tex-math></alternatives></inline-formula> for DNA and amino acid sequences, respectively, in real HIV-1 and SHIV data.</p><p>We define the fitness of an individual with genetic sequence <inline-formula><alternatives><mml:math id="inf106"><mml:semantics><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft106">\begin{document}$g$\end{document}</tex-math></alternatives></inline-formula> by<disp-formula id="equ4"><label>(4)</label><alternatives><mml:math id="m4"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mi>F</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>g</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>+</mml:mo><mml:munderover><mml:mo>∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>L</mml:mi></mml:munderover><mml:munderover><mml:mo>∑</mml:mo><mml:mrow><mml:mi>a</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>q</mml:mi></mml:munderover><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mi>g</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mspace width="thinmathspace"/><mml:mo>.</mml:mo></mml:mstyle></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t4">\begin{document}$$\displaystyle  F(g) = 1 + \sum_{i=1}^L\sum_{a=1}^q s_i(a) g_{i,a}\,.$$\end{document}</tex-math></alternatives></disp-formula></p><p>Here <inline-formula><alternatives><mml:math id="inf107"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft107">\begin{document}$s_i(a)$\end{document}</tex-math></alternatives></inline-formula> is a selection coefficient, quantifying the fitness effect of allele <inline-formula><alternatives><mml:math id="inf108"><mml:semantics><mml:mrow><mml:mi>𝑎</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft108">\begin{document}$a$\end{document}</tex-math></alternatives></inline-formula> at locus <inline-formula><alternatives><mml:math id="inf109"><mml:semantics><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft109">\begin{document}$i$\end{document}</tex-math></alternatives></inline-formula>. If <inline-formula><alternatives><mml:math id="inf110"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-rel" stretchy="false">&gt;</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:semantics></mml:math><tex-math id="inft110">\begin{document}$s_i(a) \gt 0$\end{document}</tex-math></alternatives></inline-formula>, the allele <inline-formula><alternatives><mml:math id="inf111"><mml:semantics><mml:mrow><mml:mi>𝑎</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft111">\begin{document}$a$\end{document}</tex-math></alternatives></inline-formula> is beneficial (enhancing replication), and if <inline-formula><alternatives><mml:math id="inf112"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-rel" stretchy="false">&lt;</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:semantics></mml:math><tex-math id="inft112">\begin{document}$s_i(a) \lt 0$\end{document}</tex-math></alternatives></inline-formula> it is deleterious (impairing replication). By convention, we set the selection coefficient for TF alleles to zero. Individuals with higher fitness values are more likely to replicate than those with lower fitness.</p><p>Mutations introduce new genotypes and drive the evolution of the population. Let us define <inline-formula><alternatives><mml:math id="inf113"><mml:semantics><mml:mrow><mml:msup><mml:mrow><mml:mi>𝜇</mml:mi></mml:mrow><mml:mrow><mml:mi>𝛼</mml:mi><mml:mi>𝛽</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft113">\begin{document}$\mu^{\alpha\beta}$\end{document}</tex-math></alternatives></inline-formula> as the probability of mutation from genotype <inline-formula><alternatives><mml:math id="inf114"><mml:semantics><mml:mrow><mml:mi>𝛼</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft114">\begin{document}$\alpha$\end{document}</tex-math></alternatives></inline-formula> to genotype <inline-formula><alternatives><mml:math id="inf115"><mml:semantics><mml:mrow><mml:mi>𝛽</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft115">\begin{document}$\beta$\end{document}</tex-math></alternatives></inline-formula> per replication cycle. Below, we will express this probability in terms of a mutation rate per site per round of replication. In the analysis of real data, we use asymmetric mutation rates estimated from intra-host HIV-1 data (<xref ref-type="bibr" rid="bib99">Zanini et al., 2015</xref>).</p><p>Given these parameters, the WF model describes the dynamics of the frequencies of different genotypes in the population over time. We write the frequency of genotype <inline-formula><alternatives><mml:math id="inf116"><mml:semantics><mml:mrow><mml:mi>𝛼</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft116">\begin{document}$\alpha$\end{document}</tex-math></alternatives></inline-formula> at time <inline-formula><alternatives><mml:math id="inf117"><mml:semantics><mml:mrow><mml:mi>𝑡</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft117">\begin{document}$t$\end{document}</tex-math></alternatives></inline-formula> as <inline-formula><alternatives><mml:math id="inf118"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑧</mml:mi></mml:mrow><mml:mrow><mml:mi>𝛼</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft118">\begin{document}$z_\alpha(t)$\end{document}</tex-math></alternatives></inline-formula>. Given that the frequency of genotypes in the population at time <inline-formula><alternatives><mml:math id="inf119"><mml:semantics><mml:mrow><mml:mi>𝑡</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft119">\begin{document}$t$\end{document}</tex-math></alternatives></inline-formula> is <inline-formula><alternatives><mml:math id="inf120"><mml:semantics><mml:mrow><mml:mi>𝑧</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mi>𝑧</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:msub><mml:mrow><mml:mi>𝑧</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mo>…</mml:mo><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:msub><mml:mrow><mml:mi>𝑧</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑀</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft120">\begin{document}$z(t) = (z_1(t), z_2(t), \ldots, z_M(t))$\end{document}</tex-math></alternatives></inline-formula>, where <inline-formula><alternatives><mml:math id="inf121"><mml:semantics><mml:mrow><mml:mi>𝑀</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft121">\begin{document}$M$\end{document}</tex-math></alternatives></inline-formula> is the total number of genotypes, the probability distribution of the frequency of genotypes in the next generation <inline-formula><alternatives><mml:math id="inf122"><mml:semantics><mml:mrow><mml:mi>𝑧</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-bin" stretchy="false">+</mml:mo><mml:mn>1</mml:mn><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft122">\begin{document}$z(t+1)$\end{document}</tex-math></alternatives></inline-formula> is<disp-formula id="equ5"><label>(5)</label><alternatives><mml:math id="m5"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mi>P</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>z</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>z</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>;</mml:mo><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>μ</mml:mi><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∏</mml:mo><mml:mrow><mml:mi>a</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>M</mml:mi></mml:mrow></mml:munderover><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mi>α</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>z</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mi>N</mml:mi><mml:msub><mml:mi>z</mml:mi><mml:mi>α</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup></mml:mrow><mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:mi>N</mml:mi><mml:msub><mml:mi>z</mml:mi><mml:mi>α</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">]</mml:mo><mml:mo>!</mml:mo></mml:mrow></mml:mfrac><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>.</mml:mo></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t5">\begin{document}$$\displaystyle P(z(t+1)|z(t); s, \mu, N) = \prod\limits_{a=1}^{M}{\left(\frac{p_\alpha(z(t))^{N z_\alpha(t+1)}}{ [N z_\alpha(t+1)]!} \right)}. $$\end{document}</tex-math></alternatives></disp-formula></p><p><inline-formula><alternatives><mml:math id="inf123"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:msub><mml:mi>p</mml:mi><mml:mi>α</mml:mi></mml:msub></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft123">\begin{document}$p_\alpha$\end{document}</tex-math></alternatives></inline-formula> here is<disp-formula id="equ6"><label>(6)</label><alternatives><mml:math id="m6"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:msub><mml:mi>p</mml:mi><mml:mi>α</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>z</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo><mml:mo>∝</mml:mo><mml:msup><mml:mi>F</mml:mi><mml:mi>α</mml:mi></mml:msup><mml:msub><mml:mi>z</mml:mi><mml:mi>α</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:munder><mml:mo>∑</mml:mo><mml:mrow><mml:mi>β</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo>≠</mml:mo><mml:mi>α</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:munder><mml:mo stretchy="false">[</mml:mo><mml:msup><mml:mi>μ</mml:mi><mml:mrow><mml:mi>β</mml:mi><mml:mi>α</mml:mi></mml:mrow></mml:msup><mml:msub><mml:mi>z</mml:mi><mml:mi>β</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>−</mml:mo><mml:msup><mml:mi>μ</mml:mi><mml:mrow><mml:mi>α</mml:mi><mml:mi>β</mml:mi></mml:mrow></mml:msup><mml:msub><mml:mi>z</mml:mi><mml:mi>α</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">]</mml:mo><mml:mspace width="thinmathspace"/><mml:mo>.</mml:mo></mml:mstyle></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t6">\begin{document}$$\displaystyle  p_\alpha(z(t)) \propto F ^\alpha z_\alpha+ \sum_{\beta(\neq\alpha)} [\mu^{\beta\alpha} z_\beta(t) - \mu^{\alpha\beta} z_\alpha(t)]\,.$$\end{document}</tex-math></alternatives></disp-formula></p><p>where <inline-formula><alternatives><mml:math id="inf124"><mml:semantics><mml:mrow><mml:msup><mml:mrow><mml:mi>𝐹</mml:mi></mml:mrow><mml:mrow><mml:mi>𝛼</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft124">\begin{document}$F^\alpha$\end{document}</tex-math></alternatives></inline-formula> is the fitness value of genotype α, based on <xref ref-type="disp-formula" rid="equ4">Equation 4</xref>. Across <inline-formula><alternatives><mml:math id="inf125"><mml:semantics><mml:mrow><mml:mi>𝐾</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft125">\begin{document}$K$\end{document}</tex-math></alternatives></inline-formula> generations, the probability of an entire evolutionary trajectory, defined by the vector of genotype frequencies at each time, is then<disp-formula id="equ7"><label>(7)</label><alternatives><mml:math id="m7"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mi>P</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mi>z</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:msubsup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mi>K</mml:mi></mml:msubsup><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>μ</mml:mi><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∏</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>K</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:munderover><mml:mrow><mml:mi>P</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>z</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>z</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>;</mml:mo><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>μ</mml:mi><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>.</mml:mo></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t7">\begin{document}$$\displaystyle P((z(t_k))_{k=0}^K|s, \mu, N) =\prod\limits_{k=0}^{K-1}{P(z(t_{k+1})|z(t_{k}); s, \mu, N)} .$$\end{document}</tex-math></alternatives></disp-formula></p></sec><sec id="s4-3-2"><title>Diffusion limit</title><p>When the population size is sufficiently large, the evolution of the population defined in <xref ref-type="disp-formula" rid="equ5">Equation 5</xref> can be reasonably well approximated by a Gaussian process, which is a solution to the Fokker-Planck (forward Kolmogorov) equation (<xref ref-type="bibr" rid="bib44">Kimura, 1964</xref>; <xref ref-type="bibr" rid="bib14">Crow, 2017</xref>).<disp-formula id="equ8"><label>(8)</label><alternatives><mml:math id="m8"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mi>P</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>z</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo>+</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>z</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>;</mml:mo><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>μ</mml:mi><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>∼</mml:mo><mml:mrow><mml:mi class="mathcal" mathvariant="script">N</mml:mi></mml:mrow><mml:mrow><mml:mo maxsize="1.623em" minsize="1.623em">(</mml:mo></mml:mrow><mml:mi>z</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mi>d</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mi>C</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>z</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mi>N</mml:mi><mml:mrow><mml:mo maxsize="1.623em" minsize="1.623em">)</mml:mo></mml:mrow><mml:mo>,</mml:mo></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t8">\begin{document}$$\displaystyle P(z(t+\Delta t)|z(t); s, \mu, N) \sim\mathcal{N}\Big(z(t)+\Delta t d(t), C(z(t))/N\Big),$$\end{document}</tex-math></alternatives></disp-formula></p><p>with the drift vector <inline-formula><alternatives><mml:math id="inf126"><mml:semantics><mml:mrow><mml:mi>𝑑</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft126">\begin{document}$d(t)$\end{document}</tex-math></alternatives></inline-formula> and the diffusion matrix <inline-formula><alternatives><mml:math id="inf127"><mml:semantics><mml:mrow><mml:mi>𝐶</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑧</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑡</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-bin" stretchy="false">∕</mml:mo><mml:mi>𝑁</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft127">\begin{document}$C(z(t))/N$\end{document}</tex-math></alternatives></inline-formula> such that<disp-formula id="equ9"><label>(9)</label><alternatives><mml:math id="m9"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mi>α</mml:mi><mml:mi>β</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>z</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false"><mml:mtr><mml:mtd><mml:mo>−</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>α</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>β</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mtd><mml:mtd><mml:mtext>for </mml:mtext><mml:mi>α</mml:mi><mml:mo>≠</mml:mo><mml:mi>β</mml:mi></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:msub><mml:mi>z</mml:mi><mml:mi>α</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mn>1</mml:mn><mml:mo>−</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>α</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:mtd><mml:mtd><mml:mtext>for </mml:mtext><mml:mi>α</mml:mi><mml:mo>=</mml:mo><mml:mi>β</mml:mi><mml:mtext> </mml:mtext><mml:mo>,</mml:mo></mml:mtd></mml:mtr></mml:mtable><mml:mo fence="true" stretchy="true" symmetric="true"/></mml:mrow></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t9">\begin{document}$$\displaystyle \begin{equation*} C_{\alpha\beta}(z(t)) = \begin{cases} - z_\alpha(t)z_\beta(t) &amp; \text{for } \alpha\neq\beta\\ z_\alpha(t)(1 - z_\alpha(t)) &amp; \text{for } \alpha=\beta~, \end{cases} \end{equation*}$$\end{document}</tex-math></alternatives></disp-formula></p><p>and<disp-formula id="equ10"><label>(10)</label><alternatives><mml:math id="m10"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mi>d</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mi>C</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>z</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo><mml:mi>s</mml:mi><mml:mo>+</mml:mo><mml:mi>u</mml:mi><mml:mtext> </mml:mtext><mml:mo>.</mml:mo></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t10">\begin{document}$$\displaystyle d(t) = C(z(t)) s + u~.$$\end{document}</tex-math></alternatives></disp-formula></p></sec><sec id="s4-3-3"><title>Dimensional reduction</title><p>While the WF process in genotype space provides valuable insights into genotype dynamics, the mathematical expressions are sometimes challenging to interpret. To obtain more intuitive expressions, we can project the dynamics onto the space of allele frequencies,<disp-formula id="equ11"><label>(11)</label><alternatives><mml:math id="m11"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:munder><mml:mo>∑</mml:mo><mml:mi>a</mml:mi></mml:munder><mml:msubsup><mml:mi>g</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>a</mml:mi></mml:mrow><mml:mi>α</mml:mi></mml:msubsup><mml:msub><mml:mi>z</mml:mi><mml:mi>α</mml:mi></mml:msub><mml:mspace width="thinmathspace"/><mml:mo>.</mml:mo></mml:mstyle></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t11">\begin{document}$$\displaystyle  x_i(a) = \sum_a g_{i,a}^\alpha z_\alpha\,.$$\end{document}</tex-math></alternatives></disp-formula></p><p>One can then find the drift vector <inline-formula><alternatives><mml:math id="inf128"><mml:semantics><mml:mrow><mml:mi>𝑑</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft128">\begin{document}$d$\end{document}</tex-math></alternatives></inline-formula> and diffusion matrix <inline-formula><alternatives><mml:math id="inf129"><mml:semantics><mml:mrow><mml:mi>𝐶</mml:mi><mml:mo class="MathClass-bin" stretchy="false">∕</mml:mo><mml:mi>𝑁</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft129">\begin{document}$C/N$\end{document}</tex-math></alternatives></inline-formula> in allele frequency space,<disp-formula id="equ12"><label>(12)</label><alternatives><mml:math id="m12"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:msub><mml:mi>d</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:munderover><mml:mo>∑</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo>≠</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mi>L</mml:mi></mml:munderover><mml:munderover><mml:mo>∑</mml:mo><mml:mrow><mml:mi>b</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>q</mml:mi></mml:munderover><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mspace width="thinmathspace"/><mml:mo>,</mml:mo></mml:mstyle></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t12">\begin{document}$$\displaystyle  d_i(a) = C_{ii}(a,a)s_i(a) + \sum_{j(\neq i)}^L\sum_{b=1}^qC_{ij}(a,b)s_j(b) + u_i(a)\,,$$\end{document}</tex-math></alternatives></disp-formula></p><p>and<disp-formula id="equ13"><label>(13)</label><alternatives><mml:math id="m13"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mtable columnalign="left left" rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false"><mml:mtr><mml:mtd><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>−</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mtd><mml:mtd><mml:mtext>for </mml:mtext><mml:mi>i</mml:mi><mml:mo>≠</mml:mo><mml:mi>j</mml:mi></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mn>1</mml:mn><mml:mo>−</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:mtd><mml:mtd><mml:mtext>for </mml:mtext><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mi>j</mml:mi><mml:mtext> </mml:mtext><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable><mml:mo fence="true" stretchy="true" symmetric="true"/></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t13">\begin{document}$$\displaystyle \begin{array}{ll}C_{ij}(a,b) = \begin{cases} x_{ij}(a,b) - x_i(a) x_j(b) &amp; \text{for } i \neq j\\ x_{i}(a)(1 - x_i(a)) &amp; \text{for } i = j~. \end{cases} \end{array}$$\end{document}</tex-math></alternatives></disp-formula></p><p>Here, <inline-formula><alternatives><mml:math id="inf130"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mi>𝑗</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑏</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft130">\begin{document}$x_{ij}(a,b)$\end{document}</tex-math></alternatives></inline-formula> is the frequency of individuals with alleles <inline-formula><alternatives><mml:math id="inf131"><mml:semantics><mml:mrow><mml:mi>𝑎</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft131">\begin{document}$a$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf132"><mml:semantics><mml:mrow><mml:mi>𝑏</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft132">\begin{document}$b$\end{document}</tex-math></alternatives></inline-formula> at loci <inline-formula><alternatives><mml:math id="inf133"><mml:semantics><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft133">\begin{document}$i$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf134"><mml:semantics><mml:mrow><mml:mi>𝑗</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft134">\begin{document}$j$\end{document}</tex-math></alternatives></inline-formula>, and <inline-formula><alternatives><mml:math id="inf135"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑢</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft135">\begin{document}$u_i(a)$\end{document}</tex-math></alternatives></inline-formula> is net expected change in frequency of allele <inline-formula><alternatives><mml:math id="inf136"><mml:semantics><mml:mrow><mml:mi>𝑎</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft136">\begin{document}$a$\end{document}</tex-math></alternatives></inline-formula> at <inline-formula><alternatives><mml:math id="inf137"><mml:semantics><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft137">\begin{document}$i$\end{document}</tex-math></alternatives></inline-formula> due to mutations, which is given explicitly in <xref ref-type="disp-formula" rid="equ17">Equation 17</xref> below. The first term in <xref ref-type="disp-formula" rid="equ12">Equation 12</xref> gives the expected change in the frequency <inline-formula><alternatives><mml:math id="inf138"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft138">\begin{document}$x_i(a)$\end{document}</tex-math></alternatives></inline-formula> due to the direct fitness effect <inline-formula><alternatives><mml:math id="inf139"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft139">\begin{document}$s_i(a)$\end{document}</tex-math></alternatives></inline-formula>, while the second term represents the contributions due to indirect or genetic linkage effects with other alleles <inline-formula><alternatives><mml:math id="inf140"><mml:semantics><mml:mrow><mml:mi>𝑗</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft140">\begin{document}$j$\end{document}</tex-math></alternatives></inline-formula>.</p></sec><sec id="s4-3-4"><title>Maximum path likelihood</title><p>Following recent work (<xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref>), we employed Bayes’ rule to find the selection coefficients that best explain the data. These are the coefficients that maximize the posterior distribution<disp-formula id="equ14"><label>(14)</label><alternatives><mml:math id="m14"><mml:semantics><mml:mrow><mml:mtable><mml:mtr><mml:mtd><mml:mstyle id="x1-27001r14" class="label"/><mml:msub><mml:mrow><mml:mi>𝑃</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>posterior</mml:mtext></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑠</mml:mi><mml:mi>|</mml:mi><mml:msub><mml:mrow><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑧</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mi>𝑡</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑘</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mi>𝑘</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mi>∝</mml:mi><mml:mi>𝑃</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑧</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mi>𝑡</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑘</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mi>𝑘</mml:mi></mml:mrow></mml:msub><mml:mi>|</mml:mi><mml:mi>𝑠</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mspace width="0.33em" class="nbsp"/><mml:msub><mml:mrow><mml:mi>𝑃</mml:mi></mml:mrow><mml:mrow><mml:mstyle class="text"><mml:mtext>prior</mml:mtext></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑠</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mspace width="0.17em" class="thinspace"/><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo></mml:mtd><mml:mtd><mml:mspace width="0.33em" class="nbsp"/></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:semantics></mml:math><tex-math id="t14">\begin{document}$$\displaystyle \begin{equation*} P_{\text{posterior}}(s | (z(t_k))_k) \proptoP((z(t_k))_k | s) \ P_{\text{prior}}(s)\,, \end{equation*}$$\end{document}</tex-math></alternatives></disp-formula></p><p>which is a product of the likelihood of the evolutionary trajectory observed in the data <xref ref-type="disp-formula" rid="equ7">Equation 7</xref> (under the diffusion limit <xref ref-type="disp-formula" rid="equ8">Equation 8</xref>) and a prior distribution for the selection coefficients. We chose a Gaussian prior distribution with zero mean and a covariance of <inline-formula><alternatives><mml:math id="inf141"><mml:semantics><mml:mrow><mml:mi>𝐼</mml:mi><mml:mo class="MathClass-bin" stretchy="false">∕</mml:mo><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑁</mml:mi><mml:mi>𝛾</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft141">\begin{document}$I/(N\gamma)$\end{document}</tex-math></alternatives></inline-formula>, where <inline-formula><alternatives><mml:math id="inf142"><mml:semantics><mml:mrow><mml:mi>𝐼</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft142">\begin{document}$I$\end{document}</tex-math></alternatives></inline-formula> is the identity matrix. This prior distribution penalizes the inferences of large selection coefficients when they are not well-supported by the data. The maximum a posteriori selection coefficients are then given by <xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref><disp-formula id="equ15"><label>(15)</label><alternatives><mml:math id="m15"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mover><mml:mi>s</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover></mml:mrow><mml:mo>=</mml:mo><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi>γ</mml:mi><mml:mi>I</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mrow><mml:mo>[</mml:mo><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>−</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:mrow><mml:mo>]</mml:mo></mml:mrow><mml:mspace width="thinmathspace"/><mml:mo>.</mml:mo></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t15">\begin{document}$$\displaystyle  \hat{s} = \left(C_{\mathrm{int}} + \gamma I \right)^{-1} \left[ \Delta x_{\mathrm{int}} - \Delta u_{\mathrm{int}} \right]\,. $$\end{document}</tex-math></alternatives></disp-formula></p><p>Here <inline-formula><alternatives><mml:math id="inf143"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝐶</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="normal"><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>t</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft143">\begin{document}$C_{\mathrm{int}}$\end{document}</tex-math></alternatives></inline-formula>, <inline-formula><alternatives><mml:math id="inf144"><mml:semantics><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="normal"><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>t</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft144">\begin{document}$\Deltax_{\mathrm{int}}$\end{document}</tex-math></alternatives></inline-formula>, and <inline-formula><alternatives><mml:math id="inf145"><mml:semantics><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mrow><mml:mi>𝑢</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="normal"><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>t</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft145">\begin{document}$\Deltau_{\mathrm{int}}$\end{document}</tex-math></alternatives></inline-formula> represent the covariance matrix, vector of frequency changes, and mutational flux integrated over the evolution<disp-formula id="equ16"><label>(16)</label><alternatives><mml:math id="m16"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mtable columnalign="left left" rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:mtd><mml:mtd><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>K</mml:mi></mml:mrow></mml:munderover><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mi>t</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mi>C</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:mtd><mml:mtd><mml:mo>=</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>K</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>−</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:mtd><mml:mtd><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>K</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:munderover><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mi>t</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mi>u</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:mstyle></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t16">\begin{document}$$\displaystyle  \begin{array}{ll} C_{\mathrm{int}} &amp;= \sum\limits_{k=0}^{K}{\Delta t_k C(x(t_k))} \\ \Delta x_{\mathrm{int}} &amp;= x(t_K) - x(t_0) \\ \Delta u_{\mathrm{int}} &amp;= \sum\limits_{k=0}^{K-1}{\Delta t_k u(t_k)}. \end{array}$$\end{document}</tex-math></alternatives></disp-formula></p><p>The mutational flux <inline-formula><alternatives><mml:math id="inf146"><mml:semantics><mml:mrow><mml:mi>𝑢</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft146">\begin{document}$u$\end{document}</tex-math></alternatives></inline-formula> is characterized by the rates of mutations from nucleotides <inline-formula><alternatives><mml:math id="inf147"><mml:semantics><mml:mrow><mml:mi>𝑏</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft147">\begin{document}$b$\end{document}</tex-math></alternatives></inline-formula> to <inline-formula><alternatives><mml:math id="inf148"><mml:semantics><mml:mrow><mml:mi>𝑎</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft148">\begin{document}$a$\end{document}</tex-math></alternatives></inline-formula>, denoted by <inline-formula><alternatives><mml:math id="inf149"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝜇</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑎</mml:mi><mml:mi>𝑏</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft149">\begin{document}$\mu_{ab}$\end{document}</tex-math></alternatives></inline-formula>, which are determined from longitudinal HIV-1 populations in untreated patients (<xref ref-type="bibr" rid="bib99">Zanini et al., 2015</xref>). The change of the <inline-formula><alternatives><mml:math id="inf150"><mml:semantics><mml:mrow><mml:mi>𝑎</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft150">\begin{document}$a$\end{document}</tex-math></alternatives></inline-formula> nucleotide frequency at locus <inline-formula><alternatives><mml:math id="inf151"><mml:semantics><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft151">\begin{document}$i$\end{document}</tex-math></alternatives></inline-formula> due to mutation is given by:<disp-formula id="equ17"><label>(17)</label><alternatives><mml:math id="m17"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>b</mml:mi></mml:mrow></mml:munder><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>μ</mml:mi><mml:mrow><mml:mi>a</mml:mi><mml:mi>b</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>−</mml:mo><mml:msub><mml:mi>μ</mml:mi><mml:mrow><mml:mi>b</mml:mi><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>.</mml:mo></mml:mstyle></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t17">\begin{document}$$\displaystyle  u_{i}(a) = \sum\limits_{b}{(\mu_{ab} x_{i}(b) - \mu_{ba} x_{i}(a))} . $$\end{document}</tex-math></alternatives></disp-formula></p><p>Inverting the integrated covariance matrix effectively reveals the underlying direct allele interactions and resolves the genetic linkage effects.</p><p>The shift in the covariance diagonal in <xref ref-type="disp-formula" rid="equ15">Equation 15</xref>, arising from the selection coefficients’ posterior distribution, reflects the uncertainty in the selection distribution. We used <inline-formula><alternatives><mml:math id="inf152"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>γ</mml:mi><mml:mo>=</mml:mo><mml:mn>10</mml:mn></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft152">\begin{document}$\gamma=10$\end{document}</tex-math></alternatives></inline-formula> for all data sets, but the model is robust to variation in the strength of regularization (<xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref>). For the mutation rates, we incorporated the transition probabilities among arbitrary DNA nucleotides, estimated from whole-genome deep sequencing of multiple untreated HIV-1 patients followed for 5–8 years post-infection (<xref ref-type="bibr" rid="bib99">Zanini et al., 2015</xref>).</p></sec><sec id="s4-3-5"><title>Integration of covariance</title><p>When the time interval of the observation <inline-formula><alternatives><mml:math id="inf153"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft153">\begin{document}$\Delta t$\end{document}</tex-math></alternatives></inline-formula> is sufficiently short, the trajectory of the allele frequency would be continuous and ideally it would be a smooth curve (<xref ref-type="bibr" rid="bib82">Shimagaki and Barton, 2023</xref>). To accurately estimate the covariance matrix, we employ piecewise linear interpolation for frequencies. Let <inline-formula><alternatives><mml:math id="inf154"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>τ</mml:mi><mml:mo>∈</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">]</mml:mo></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft154">\begin{document}$\tau\in[0,1]$\end{document}</tex-math></alternatives></inline-formula>, then the linear interpolation for a frequency vector can be expressed as:<disp-formula id="equ18"><label>(18)</label><alternatives><mml:math id="m18"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mtable columnalign="left left" rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msubsup><mml:mi>x</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:mi>k</mml:mi><mml:mo>,</mml:mo><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">]</mml:mo></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:mi>τ</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mn>1</mml:mn><mml:mo>−</mml:mo><mml:mi>τ</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:mi>τ</mml:mi><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo>+</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mtext> </mml:mtext><mml:mo>,</mml:mo></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:msubsup><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:mi>k</mml:mi><mml:mo>,</mml:mo><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">]</mml:mo></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:mi>τ</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mn>1</mml:mn><mml:mo>−</mml:mo><mml:mi>τ</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:mi>τ</mml:mi><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo>+</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mtext> </mml:mtext><mml:mo>,</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t18">\begin{document}$$\displaystyle \begin{array}{ll} x_i^{[k,k+1]}(\tau)=(1-\tau)x_i(t_k) + \tau x_i(t_{{k}+{1}})~,\\ x_{ij}^{[k,k+1]}(\tau)=(1-\tau)x_{ij}(t_k) + \tau x_{ij}(t_{{k}+{1}})~,\end{array}$$\end{document}</tex-math></alternatives></disp-formula></p><p>which yields,<disp-formula id="equ19"><alternatives><mml:math id="m19"><mml:semantics><mml:mrow><mml:mtable><mml:mtr><mml:mtd><mml:mtable class="aligned"><mml:mtr><mml:mtd columnalign="right"><mml:msubsup><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="normal"><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>t</mml:mi></mml:mstyle></mml:mrow></mml:msubsup></mml:mtd><mml:mtd columnalign="left"><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:munderover accentunder="false" accent="false"><mml:mrow><mml:mo>⎣</mml:mo></mml:mrow><mml:mrow><mml:mi>𝑘</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>𝐾</mml:mi><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:munderover><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mrow><mml:mi>𝑡</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑘</mml:mi></mml:mrow></mml:msub><mml:msubsup><mml:mrow><mml:mo>⎢ </mml:mo></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mi>𝑑</mml:mi><mml:mi>𝜏</mml:mi><mml:msubsup><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-open" stretchy="false">[</mml:mo><mml:mi>𝑘</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑘</mml:mi><mml:mo class="MathClass-bin" stretchy="false">+</mml:mo><mml:mn>1</mml:mn><mml:mo class="MathClass-close" stretchy="false">]</mml:mo></mml:mrow></mml:msubsup><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝜏</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mtd><mml:mtd columnalign="right"/></mml:mtr><mml:mtr><mml:mtd columnalign="right"><mml:msubsup><mml:mrow><mml:mi>𝐶</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mi>𝑗</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="normal"><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>t</mml:mi></mml:mstyle></mml:mrow></mml:msubsup></mml:mtd><mml:mtd columnalign="left"><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:munderover accentunder="false" accent="false"><mml:mrow><mml:mo>⎣</mml:mo></mml:mrow><mml:mrow><mml:mi>𝑘</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>𝐾</mml:mi><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:munderover><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mrow><mml:mi>𝑡</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑘</mml:mi></mml:mrow></mml:msub><mml:msubsup><mml:mrow><mml:mo>⎢ </mml:mo></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mi>𝑑</mml:mi><mml:mi>𝜏</mml:mi><mml:mrow><mml:mo fence="true" form="prefix"> (</mml:mo><mml:mrow><mml:msubsup><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mi>𝑗</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-open" stretchy="false">[</mml:mo><mml:mi>𝑘</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑘</mml:mi><mml:mo class="MathClass-bin" stretchy="false">+</mml:mo><mml:mn>1</mml:mn><mml:mo class="MathClass-close" stretchy="false">]</mml:mo></mml:mrow></mml:msubsup><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝜏</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:msubsup><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-open" stretchy="false">[</mml:mo><mml:mi>𝑘</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑘</mml:mi><mml:mo class="MathClass-bin" stretchy="false">+</mml:mo><mml:mn>1</mml:mn><mml:mo class="MathClass-close" stretchy="false">]</mml:mo></mml:mrow></mml:msubsup><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝜏</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:msubsup><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑗</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-open" stretchy="false">[</mml:mo><mml:mi>𝑘</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑘</mml:mi><mml:mo class="MathClass-bin" stretchy="false">+</mml:mo><mml:mn>1</mml:mn><mml:mo class="MathClass-close" stretchy="false">]</mml:mo></mml:mrow></mml:msubsup><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝜏</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow><mml:mo fence="true" form="postfix">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:mtd><mml:mtd/></mml:mtr></mml:mtable></mml:mrow></mml:semantics></mml:math><tex-math id="t19">\begin{document}$$\displaystyle x_i^{\mathrm{int}} &amp;= \sum_{k=0}^{K-1} \Delta t_k \int_0^1 d\tau\, x_i^{[k,k+1]}(\tau) \\C_{ij}^{\mathrm{int}} &amp;= \sum_{k=0}^{K-1} \Delta t_k \int_0^1 d\tau\,\left(x_{ij}^{[k,k+1]}(\tau) - x_i^{[k,k+1]}(\tau) x_j^{[k,k+1]}(\tau)\right)$$\end{document}</tex-math></alternatives></disp-formula></p><p>For simplicity in notation, we omitted nucleotide indices. The explicit expression of the integrated covariance is given in <xref ref-type="bibr" rid="bib85">Sohail et al., 2021</xref>; <xref ref-type="bibr" rid="bib82">Shimagaki and Barton, 2023</xref>.</p></sec></sec><sec id="s4-4"><title>Joint RM model</title><p>In addition to fitness models derived from SHIV data for individual RMs, we inferred a joint model under the assumption that virus evolution within each individual RM with the same TF virus is governed by a similar fitness landscape. This method improves inference accuracy from the WF process and deep mutational scanning data (<xref ref-type="bibr" rid="bib86">Sohail et al., 2022</xref>; <xref ref-type="bibr" rid="bib84">Shimagaki and Barton, 2025b</xref>; <xref ref-type="bibr" rid="bib38">Hong et al., 2024</xref>). The joint path likelihood for allele frequency trajectories across RMs with the same TF virus is then<disp-formula id="equ20"><label>(19)</label><alternatives><mml:math id="m20"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo></mml:mtd><mml:mtd><mml:mi/><mml:mo stretchy="false">(</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>x</mml:mi><mml:mi>α</mml:mi></mml:msup><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:msubsup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>K</mml:mi><mml:mi>α</mml:mi></mml:msub></mml:mrow></mml:msubsup><mml:msubsup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>R</mml:mi></mml:msubsup><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>μ</mml:mi><mml:mo>,</mml:mo><mml:mi>γ</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:munderover><mml:mo>∏</mml:mo><mml:mrow><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>R</mml:mi></mml:munderover><mml:munderover><mml:mo>∏</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>K</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:munderover><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>x</mml:mi><mml:mi>r</mml:mi></mml:msup><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:msup><mml:mi>x</mml:mi><mml:mi>r</mml:mi></mml:msup><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>;</mml:mo><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>μ</mml:mi><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mspace width="thickmathspace"/><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo><mml:mtext> </mml:mtext><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>s</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>γ</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mspace width="thinmathspace"/><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t20">\begin{document}$$\displaystyle \begin {aligned} p(&amp;((x^\alpha(t_k))_{k=0}^{K_\alpha})_{r=1}^R|s, \mu, \gamma) = \left(\prod_{r=1}^R \prod_{k=0}^{K-1} p_{\rm M}(x^r(t_{k+1})|x^r(t_{k}); s, \mu, N) \right) \;p(x(t_0))\ p(s|\gamma)\,. $$\end{document}</tex-math></alternatives></disp-formula></p><p>Here, <inline-formula><alternatives><mml:math id="inf155"><mml:semantics><mml:mrow><mml:msup><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑟</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft155">\begin{document}$x^r$\end{document}</tex-math></alternatives></inline-formula> is the allele frequency of the <inline-formula><alternatives><mml:math id="inf156"><mml:semantics><mml:mrow><mml:mi>𝑟</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft156">\begin{document}$r$\end{document}</tex-math></alternatives></inline-formula>-th individual and <inline-formula><alternatives><mml:math id="inf157"><mml:semantics><mml:mrow><mml:mi>𝑅</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft157">\begin{document}$R$\end{document}</tex-math></alternatives></inline-formula> is the number of replicate individuals (i.e. the number of RMs sharing the same TF virus). The initial state is <inline-formula><alternatives><mml:math id="inf158"><mml:semantics><mml:mrow><mml:mi>𝑝</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msup><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑟</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mi>𝑡</mml:mi></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mi>𝑝</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑥</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mi>𝑡</mml:mi></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft158">\begin{document}$p(x^r(t_0)) = p(x(t_0))$\end{document}</tex-math></alternatives></inline-formula> for all <inline-formula><alternatives><mml:math id="inf159"><mml:semantics><mml:mrow><mml:mi>𝑟</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft159">\begin{document}$r$\end{document}</tex-math></alternatives></inline-formula> for individuals with the same TF virus. The solution of the joint path likelihood is given by<disp-formula id="equ21"><label>(20)</label><alternatives><mml:math id="m21"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mover><mml:mi>s</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover></mml:mrow><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mover><mml:mi>C</mml:mi><mml:mo accent="false">¯</mml:mo></mml:mover><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi>γ</mml:mi><mml:mi>I</mml:mi><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mo stretchy="false">[</mml:mo><mml:msub><mml:mover><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mo accent="false">¯</mml:mo></mml:mover><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:msub><mml:mo>−</mml:mo><mml:msub><mml:mover><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>a</mml:mi><mml:mi>μ</mml:mi></mml:mrow><mml:mo accent="false">¯</mml:mo></mml:mover><mml:mrow><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">]</mml:mo><mml:mo>.</mml:mo></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t21">\begin{document}$$\displaystyle  \hat{s} = (\overline{C}_{\rm int} + \gamma I)^{-1} [\overline{\Delta x}_{\rm int} - \overline{\Delta a\mu}_{\rm int}].$$\end{document}</tex-math></alternatives></disp-formula></p><p>Here, the overbar denotes the sum over the replicate RMs.</p><p>We emphasize that the joint selection coefficients in <xref ref-type="disp-formula" rid="equ21">Equation 20</xref> are not the same as selection coefficients that are simply averaged across RMs with the same TF virus. The joint selection coefficients are more robust, as they are guided by the level of evidence within each individual rather than naive averaging.</p></sec><sec id="s4-5"><title>Geometrical interpretation of the fitness comparison</title><p>The Pearson values we utilized to compare the fitness landscapes denoted as <inline-formula><alternatives><mml:math id="inf160"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝐹</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑔</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-punc" stretchy="false">∶</mml:mo><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mi>𝐹</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑔</mml:mi><mml:mi>|</mml:mi><mml:mi>𝑠</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft160">\begin{document}$F_s(g):=F(g|s)$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf161"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝐹</mml:mi></mml:mrow><mml:mrow><mml:mi>ℎ</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑔</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-punc" stretchy="false">∶</mml:mo><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mi>𝐹</mml:mi><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑔</mml:mi><mml:mi>|</mml:mi><mml:mi>ℎ</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft161">\begin{document}$F_h(g):=F(g|h)$\end{document}</tex-math></alternatives></inline-formula> can be expressed by the following simple relation:<disp-formula id="equ22"><label>(21)</label><alternatives><mml:math id="m22"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mrow><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:msqrt><mml:mrow><mml:mi mathvariant="normal">V</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:msqrt><mml:msqrt><mml:mrow><mml:mi mathvariant="normal">V</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:msqrt></mml:mrow></mml:mfrac><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msup><mml:mi>s</mml:mi><mml:mi mathvariant="normal">⊤</mml:mi></mml:msup><mml:mi>C</mml:mi><mml:mi>h</mml:mi></mml:mrow><mml:mrow><mml:msqrt><mml:msup><mml:mi>s</mml:mi><mml:mi mathvariant="normal">⊤</mml:mi></mml:msup><mml:mi>C</mml:mi><mml:mi>s</mml:mi></mml:msqrt><mml:msqrt><mml:msup><mml:mi>h</mml:mi><mml:mi mathvariant="normal">⊤</mml:mi></mml:msup><mml:mi>C</mml:mi><mml:mi>h</mml:mi></mml:msqrt></mml:mrow></mml:mfrac><mml:mspace width="thinmathspace"/><mml:mo>.</mml:mo></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t22">\begin{document}$$\displaystyle r = \frac{\mathrm{Cov}(F_s, F_h)}{\sqrt{\mathrm{Var}(F_s)} \sqrt{\mathrm{Var}(F_h)} } = \frac{s^\top C h }{\sqrt{s^\top C s} \sqrt{h^\top C h}}\,. $$\end{document}</tex-math></alternatives></disp-formula></p><p>Here, <inline-formula><alternatives><mml:math id="inf162"><mml:semantics><mml:mrow><mml:mstyle mathvariant="normal"><mml:mi>C</mml:mi><mml:mi>o</mml:mi><mml:mi>v</mml:mi></mml:mstyle><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mi>𝐹</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:msub><mml:mrow><mml:mi>𝐹</mml:mi></mml:mrow><mml:mrow><mml:mi>ℎ</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft162">\begin{document}$\mathrm{Cov}(F_s, F_h)$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf163"><mml:semantics><mml:mrow><mml:mstyle mathvariant="normal"><mml:mi>V</mml:mi><mml:mi>a</mml:mi><mml:mi>r</mml:mi></mml:mstyle><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mi>𝐹</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft163">\begin{document}$\mathrm{Var}(F_s)$\end{document}</tex-math></alternatives></inline-formula> represent the covariance and variance values estimated from the samples being compared, <inline-formula><alternatives><mml:math id="inf164"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mi>𝐹</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msup><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:msub><mml:mrow><mml:mi>𝐹</mml:mi></mml:mrow><mml:mrow><mml:mi>ℎ</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msup><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mi>𝑛</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft164">\begin{document}$(F_s(g^n), F_h(g^n))_{n}$\end{document}</tex-math></alternatives></inline-formula>. <inline-formula><alternatives><mml:math id="inf165"><mml:semantics><mml:mrow><mml:mi>𝐶</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft165">\begin{document}$C$\end{document}</tex-math></alternatives></inline-formula> is the covariance matrix defined between arbitrary loci. The last equation can be interpreted as an angle between two vectors, <inline-formula><alternatives><mml:math id="inf166"><mml:semantics><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft166">\begin{document}$s$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf167"><mml:semantics><mml:mrow><mml:mi>ℎ</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft167">\begin{document}$h$\end{document}</tex-math></alternatives></inline-formula>, with a metric matrix <inline-formula><alternatives><mml:math id="inf168"><mml:semantics><mml:mrow><mml:mi>𝐶</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft168">\begin{document}$C$\end{document}</tex-math></alternatives></inline-formula>; if <inline-formula><alternatives><mml:math id="inf169"><mml:semantics><mml:mrow><mml:mi>𝑠</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mi>ℎ</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft169">\begin{document}$s=h$\end{document}</tex-math></alternatives></inline-formula>, the Pearson value clearly becomes 1. However, the ‘similarity’ also depends on how these vectors are projected by <inline-formula><alternatives><mml:math id="inf170"><mml:semantics><mml:mrow><mml:mi>𝐶</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft170">\begin{document}$C$\end{document}</tex-math></alternatives></inline-formula>; eigenmodes associated with larger variance of statistics will be more emphasized. The last expression readily implies an interpretation for the case of shuffled sequences; shuffling the sequences equates to diluting the covariance between loci, resulting in the metric matrix becoming a diagonal matrix. Removing the off-diagonal elements corresponds to lifting the constraints on the fitness landscape.</p></sec><sec id="s4-6"><title>Epistatic fitness model</title><p>We consider the following pairwise epistatic fitness function, which depends on epistatic interactions <inline-formula><alternatives><mml:math id="inf171"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mi>𝑗</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft171">\begin{document}$s_{ij}$\end{document}</tex-math></alternatives></inline-formula> across all possible pairs of loci:<disp-formula id="equ23"><label>(22)</label><alternatives><mml:math id="m23"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mi>F</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>g</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>+</mml:mo><mml:munderover><mml:mo>∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>L</mml:mi></mml:munderover><mml:munderover><mml:mo>∑</mml:mo><mml:mrow><mml:mi>a</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>q</mml:mi></mml:munderover><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mi>g</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:munder><mml:mo>∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>&lt;</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:munder><mml:munder><mml:mo>∑</mml:mo><mml:mrow><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:munder><mml:msub><mml:mi>s</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mi>g</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>g</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi></mml:mrow></mml:msub><mml:mspace width="thinmathspace"/><mml:mo>.</mml:mo></mml:mstyle></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t23">\begin{document}$$\displaystyle  F(g) = 1 + \sum_{i=1}^L\sum_{a=1}^q s_i(a) g_{i,a} + \sum_{i \lt j}\sum_{a,b=1} s_{ij}(a,b) g_{i,a} g_{j,b}\,.$$\end{document}</tex-math></alternatives></disp-formula></p><p>Our goal is to obtain the epistatic interactions <inline-formula><alternatives><mml:math id="inf172"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mi>𝑗</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑏</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft172">\begin{document}$s_{ij}(a,b)$\end{document}</tex-math></alternatives></inline-formula> as well as the selection coefficients <inline-formula><alternatives><mml:math id="inf173"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft173">\begin{document}$s_i(a)$\end{document}</tex-math></alternatives></inline-formula> from temporal genetic sequences.</p><p>The basic logic for inferring these fitness parameters parallels the additive case. The only practical difference is that epistatic interactions can influence the dynamics of additive and pairwise mutation frequencies. Under the diffusion limit, we obtain the following drift terms, which align with (12) in the additive model,<disp-formula id="equ24"><label>(23)</label><alternatives><mml:math id="m24"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mtable columnalign="left left" rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msub><mml:mi>d</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>L</mml:mi></mml:mrow></mml:munderover><mml:mrow><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>c</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>q</mml:mi></mml:mrow></mml:munderover><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>c</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>c</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mo>+</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>&lt;</mml:mo><mml:mi>l</mml:mi></mml:mrow><mml:mrow><mml:mi>L</mml:mi></mml:mrow></mml:munderover><mml:mrow><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>c</mml:mi><mml:mo>,</mml:mo><mml:mi>d</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>q</mml:mi></mml:mrow></mml:munderover><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>k</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>c</mml:mi><mml:mo>,</mml:mo><mml:mi>d</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>c</mml:mi><mml:mo>,</mml:mo><mml:mi>d</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mi>L</mml:mi></mml:mrow></mml:munderover><mml:mrow><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>c</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>L</mml:mi></mml:mrow></mml:munderover><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo>,</mml:mo><mml:mi>c</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>c</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mo>+</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>&lt;</mml:mo><mml:mi>l</mml:mi></mml:mrow><mml:mrow><mml:mi>L</mml:mi></mml:mrow></mml:munderover><mml:mrow><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>c</mml:mi><mml:mo>,</mml:mo><mml:mi>d</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>q</mml:mi></mml:mrow></mml:munderover><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi><mml:mi>k</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo>,</mml:mo><mml:mi>c</mml:mi><mml:mo>,</mml:mo><mml:mi>d</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>c</mml:mi><mml:mo>,</mml:mo><mml:mi>d</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:mstyle></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t24">\begin{document}$$\displaystyle  \begin{array}{ll}d_i(a) = \sum\limits_{k=1}^{L}{\sum\limits_{c=1}^{q}{C_{ik}(a,c)s_k(c)}} + \sum\limits_{k \lt l}^{L}{\sum\limits_{c,d=1}^{q}{C_{ikl}(a,c,d)s_{kl}(c,d) + u_i(a)}} \\ d_{ij}(a,b) = \sum\limits_{k}^{L}{\sum\limits_{c=1}^{L}{C_{ijk}(a,b,c)s_k(c)}} + \sum\limits_{k \lt l}^{L}{\sum\limits_{c,d=1}^{q}{C_{ijkl}(a,b,c,d)s_{kl}(c,d) + u_{ij}(a,b) + v_{ij}(a,b)}}.\end{array}$$\end{document}</tex-math></alternatives></disp-formula></p><p>and diffusion matrices,<disp-formula id="equ25"><label>(24)</label><alternatives><mml:math id="m25"><mml:semantics><mml:mrow><mml:mtable><mml:mtr><mml:mtd><mml:mstyle id="x1-31003r24" class="label"/><mml:mtable class="aligned"><mml:mtr><mml:mtd columnalign="right"><mml:msub><mml:mrow><mml:mi>𝐶</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mi>𝑘</mml:mi><mml:mi>𝑙</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑐</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑑</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mtd><mml:mtd columnalign="left"><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:msub><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mi>𝑘</mml:mi><mml:mi>𝑙</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑐</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑑</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:msub><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:msub><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑘</mml:mi><mml:mi>𝑙</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑐</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑑</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mtd><mml:mtd columnalign="right"/></mml:mtr><mml:mtr><mml:mtd columnalign="right"><mml:msub><mml:mrow><mml:mi>𝐶</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑗</mml:mi><mml:mi>𝑖</mml:mi><mml:mi>𝑘</mml:mi><mml:mi>𝑙</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑏</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑐</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑑</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mtd><mml:mtd columnalign="left"><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:msub><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mi>𝑗</mml:mi><mml:mi>𝑘</mml:mi><mml:mi>𝑙</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑏</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑐</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑑</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:msub><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mi>𝑗</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑎</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑏</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:msub><mml:mrow><mml:mi>𝑥</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑘</mml:mi><mml:mi>𝑙</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑐</mml:mi><mml:mo class="MathClass-punc" stretchy="false">,</mml:mo><mml:mi>𝑑</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mspace width="0.17em" class="thinspace"/><mml:mo class="MathClass-punc" stretchy="false">.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:mtd><mml:mtd><mml:mspace width="0.33em" class="nbsp"/></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:semantics></mml:math><tex-math id="t25">\begin{document}$$\displaystyle \begin{equation*} C_{ikl}(a,c,d) &amp;= x_{ikl}(a,c,d) - x_i(a) x_{kl}(c,d)\\ C_{jikl}(a,b,c,d) &amp;= x_{ijkl}(a,b,c,d) - x_{ij}(a,b) x_{kl}(c,d)\,. \end{equation*}$$\end{document}</tex-math></alternatives></disp-formula></p><p>Here, <inline-formula><alternatives><mml:math id="inf174"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑢</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft174">\begin{document}$u_i$\end{document}</tex-math></alternatives></inline-formula> and <inline-formula><alternatives><mml:math id="inf175"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑢</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mi>𝑗</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft175">\begin{document}$u_{ij}$\end{document}</tex-math></alternatives></inline-formula> represent the expected frequency changes due to mutations for additive and pairwise terms, while <inline-formula><alternatives><mml:math id="inf176"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑣</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft176">\begin{document}$v_i$\end{document}</tex-math></alternatives></inline-formula> represents the changes in pairwise frequencies due to recombination. These explicit expressions indicate that the <inline-formula><alternatives><mml:math id="inf177"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑢</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft177">\begin{document}$u_i$\end{document}</tex-math></alternatives></inline-formula> remains the same as in the additive fitness case; therefore, <xref ref-type="disp-formula" rid="equ17">Equation 17</xref> holds. The pairwise term is given as<disp-formula id="equ26"><label>(25)</label><alternatives><mml:math id="m26"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mtable columnalign="left left" rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mtd><mml:mtd><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>c</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>q</mml:mi></mml:mrow></mml:munderover><mml:mrow><mml:mrow><mml:mo maxsize="1.623em" minsize="1.623em">(</mml:mo></mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:msub><mml:mi>μ</mml:mi><mml:mrow><mml:mi>b</mml:mi><mml:mi>c</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>c</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>μ</mml:mi><mml:mrow><mml:mi>a</mml:mi><mml:mi>c</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>c</mml:mi><mml:mo>,</mml:mo><mml:mi>d</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">]</mml:mo><mml:mo>−</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:msub><mml:mi>μ</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>d</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>μ</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">]</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo maxsize="1.623em" minsize="1.623em">)</mml:mo></mml:mrow></mml:mrow><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:mstyle></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t26">\begin{document}$$\displaystyle  \begin{array}{ll} u_{ij}(a,b) &amp;= \sum\limits_{c=1}^{q}{\Big([\mu_{bc}x_{ij}(a,c)+ \mu_{ac}x_{ij}(c,d)] - [\mu_{cd} + \mu_{ca}]x_{ij}(a,b) \Big)}.\end{array}$$\end{document}</tex-math></alternatives></disp-formula></p><p>and the <inline-formula><alternatives><mml:math id="inf178"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑣</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi><mml:mi>𝑗</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft178">\begin{document}$v_{ij}$\end{document}</tex-math></alternatives></inline-formula> is expressed as<disp-formula id="equ27"><label>(26)</label><alternatives><mml:math id="m27"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mo>−</mml:mo><mml:mi>r</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>i</mml:mi><mml:mo>−</mml:mo><mml:mi>j</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t27">\begin{document}$$\displaystyle v_{ij}(a,b) = -r|i-j| C_{ij}(a,b),$$\end{document}</tex-math></alternatives></disp-formula></p><p>where <inline-formula><alternatives><mml:math id="inf179"><mml:semantics><mml:mrow><mml:mi>𝑟</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft179">\begin{document}$r$\end{document}</tex-math></alternatives></inline-formula> denotes the recombination rate. In this study, we set <inline-formula><alternatives><mml:math id="inf180"><mml:semantics><mml:mrow><mml:mi>𝑟</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>1</mml:mn><mml:msup><mml:mrow><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin" stretchy="false">−</mml:mo><mml:mn>5</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft180">\begin{document}$r=10^{-5}$\end{document}</tex-math></alternatives></inline-formula> . More detailed derivations are provided in previous studies (<xref ref-type="bibr" rid="bib86">Sohail et al., 2022</xref>; <xref ref-type="bibr" rid="bib84">Shimagaki and Barton, 2025b</xref>).</p><p>The technical challenge of the epistasis inference is that the diffusion matrix <inline-formula><alternatives><mml:math id="inf181"><mml:semantics><mml:mrow><mml:mi>𝐶</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft181">\begin{document}$C$\end{document}</tex-math></alternatives></inline-formula> involves third- and fourth-order interactions, and the number of matrix elements scales as <inline-formula><alternatives><mml:math id="inf182"><mml:semantics><mml:mrow><mml:mstyle mathvariant="script"><mml:mi>𝑂</mml:mi></mml:mstyle><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msup><mml:mrow><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑞</mml:mi><mml:mi>𝐿</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mn>4</mml:mn></mml:mrow></mml:msup><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft182">\begin{document}$\mathcal{O}((qL)^4)$\end{document}</tex-math></alternatives></inline-formula>, while the computational cost to invert it scales as <inline-formula><alternatives><mml:math id="inf183"><mml:semantics><mml:mrow><mml:mstyle mathvariant="script"><mml:mi>𝑂</mml:mi></mml:mstyle><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msup><mml:mrow><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑞</mml:mi><mml:mi>𝐿</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mn>6</mml:mn></mml:mrow></mml:msup><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft183">\begin{document}$\mathcal{O}((qL)^6)$\end{document}</tex-math></alternatives></inline-formula>. Recently, a more efficient computational method was proposed, reducing both the necessary memory usage and computational times by <inline-formula><alternatives><mml:math id="inf184"><mml:semantics><mml:mrow><mml:mstyle mathvariant="script"><mml:mi>𝑂</mml:mi></mml:mstyle><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msup><mml:mrow><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑞</mml:mi><mml:mi>𝐿</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft184">\begin{document}$\mathcal{O}((qL)^2)$\end{document}</tex-math></alternatives></inline-formula> (<xref ref-type="bibr" rid="bib84">Shimagaki and Barton, 2025b</xref>). The essential idea involves factorizing the higher-order covariance matrix using the rectangular matrix <inline-formula><alternatives><mml:math id="inf185"><mml:semantics><mml:mrow><mml:mi mathvariant="normal">Ξ</mml:mi><mml:mi>∈</mml:mi><mml:msup><mml:mrow><mml:mi>ℝ</mml:mi></mml:mrow><mml:mrow><mml:mi>𝐷</mml:mi><mml:mi>×</mml:mi><mml:mi>𝑑</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft185">\begin{document}$\Xi\in\mathbb{R}^{D\timesd}$\end{document}</tex-math></alternatives></inline-formula> such that <inline-formula><alternatives><mml:math id="inf186"><mml:semantics><mml:mrow><mml:mi>𝐶</mml:mi><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mi mathvariant="normal">Ξ</mml:mi><mml:msup><mml:mrow><mml:mi mathvariant="normal">Ξ</mml:mi></mml:mrow><mml:mrow><mml:mi>⊤</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math><tex-math id="inft186">\begin{document}$C=\Xi\Xi^\top$\end{document}</tex-math></alternatives></inline-formula>, where <inline-formula><alternatives><mml:math id="inf187"><mml:semantics><mml:mrow><mml:mi>𝐷</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft187">\begin{document}$D$\end{document}</tex-math></alternatives></inline-formula> scales as <inline-formula><alternatives><mml:math id="inf188"><mml:semantics><mml:mrow><mml:mstyle mathvariant="script"><mml:mi>𝑂</mml:mi></mml:mstyle><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msup><mml:mrow><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑞</mml:mi><mml:mi>𝐿</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft188">\begin{document}$\mathcal{O}((qL)^2)$\end{document}</tex-math></alternatives></inline-formula> while <inline-formula><alternatives><mml:math id="inf189"><mml:semantics><mml:mrow><mml:mi>𝑑</mml:mi><mml:mi>≪</mml:mi><mml:mi>𝐷</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft189">\begin{document}$d\llD$\end{document}</tex-math></alternatives></inline-formula>. This method resolves the linear equation without obtaining an explicit expression of <inline-formula><alternatives><mml:math id="inf190"><mml:semantics><mml:mrow><mml:mi>𝐶</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft190">\begin{document}$C$\end{document}</tex-math></alternatives></inline-formula> and avoids any computations involving more than <inline-formula><alternatives><mml:math id="inf191"><mml:semantics><mml:mrow><mml:mstyle mathvariant="script"><mml:mi>𝑂</mml:mi></mml:mstyle><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msup><mml:mrow><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:mi>𝑞</mml:mi><mml:mi>𝐿</mml:mi><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mo class="MathClass-close" stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math><tex-math id="inft191">\begin{document}$\mathcal{O}((qL)^2)$\end{document}</tex-math></alternatives></inline-formula> operations (<xref ref-type="bibr" rid="bib84">Shimagaki and Barton, 2025b</xref>).</p><sec id="s4-6-1"><title>Gauge transformation</title><p>Since constant shifts in fitness parameters do not affect relative fitness, it is always possible to transform fitness values without changing the resulting genotype distribution. For example, in the additive model, individual selection coefficients can be shifted as<disp-formula id="equ28"><alternatives><mml:math id="m28"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">←</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>−</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>g</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t28">\begin{document}$$\displaystyle s_i(a)\leftarrow s_i(a)-s_i(\tilde{g}_i ),$$\end{document}</tex-math></alternatives></disp-formula></p><p>where <inline-formula><alternatives><mml:math id="inf192"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow><mml:mo accent="true">~</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:semantics></mml:math><tex-math id="inft192">\begin{document}$\tilde{g}_i$\end{document}</tex-math></alternatives></inline-formula> is the allele of a chosen reference genotype <inline-formula><alternatives><mml:math id="inf193"><mml:semantics><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow><mml:mo accent="true">~</mml:mo></mml:mover></mml:mrow></mml:semantics></mml:math><tex-math id="inft193">\begin{document}$\tilde{g}$\end{document}</tex-math></alternatives></inline-formula> (e.g. the TF sequence) at site <inline-formula><alternatives><mml:math id="inf194"><mml:semantics><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:semantics></mml:math><tex-math id="inft194">\begin{document}$i$\end{document}</tex-math></alternatives></inline-formula>. This transformation preserves relative fitness, but it ensures that <inline-formula><alternatives><mml:math id="inf195"><mml:semantics><mml:mrow><mml:msub><mml:mrow><mml:mi>𝑠</mml:mi></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-open" stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>𝑔</mml:mi></mml:mrow><mml:mo accent="true">~</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>𝑖</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-close" stretchy="false">)</mml:mo><mml:mo class="MathClass-rel" stretchy="false">=</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:semantics></mml:math><tex-math id="inft195">\begin{document}$s_i(\tilde{g}_i) = 0$\end{document}</tex-math></alternatives></inline-formula>, making inferred selection coefficients more interpretable.</p><p>In statistical physics, such transformations, where model parameters are changed without altering the underlying probability distribution, are referred to as gauge transformations (<xref ref-type="bibr" rid="bib95">Weigt et al., 2009</xref>; <xref ref-type="bibr" rid="bib68">Morcos et al., 2011</xref>). Similar transformations have been employed in recent studies to improve interpretability and sparsity in epistatic models (<xref ref-type="bibr" rid="bib74">Rizzato et al., 2020</xref>). We can apply an analogous transformation to epistatic interactions:<disp-formula id="equ29"><label>(27)</label><alternatives><mml:math id="m29"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mtable columnalign="left left" rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">←</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>−</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>g</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:munder><mml:mo>∑</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>j</mml:mi><mml:mo>≠</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:munder><mml:mrow><mml:mo>[</mml:mo><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>g</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>−</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>g</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>g</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>]</mml:mo></mml:mrow><mml:mo>,</mml:mo></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:msub><mml:mi>s</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">←</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>−</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>g</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>−</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>g</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>g</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>g</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mspace width="thinmathspace"/><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:mstyle></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="t29">\begin{document}$$\displaystyle \begin{array}{ll} s_i(a) \leftarrow s_i(a) - s_i(\tilde{g}_i) + \sum_{j|j \neq i} \left[ s_{ij}(a, \tilde{g}_j) - s_{ij}(\tilde{g}_i, \tilde{g}_j) \right], \\ s_{ij}(a, b) \leftarrow s_{ij}(a, b) - s_{ij}(\tilde{g}_i, b) - s_{ij}(a, \tilde{g}_j) + s_{ij}(\tilde{g}_i, \tilde{g}_j) \,. \end{array}$$\end{document}</tex-math></alternatives></disp-formula></p><p>Under this transformation, any selection coefficients or epistatic terms involving TF alleles are zero by definition, while relative fitness remains unchanged.</p></sec><sec id="s4-6-2"><title>Regularization</title><p>Regularization is used to reduce the effective number of parameters in the fitness model. In our analysis, we applied strong regularization (<inline-formula><alternatives><mml:math id="inf196"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>γ</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mn>10</mml:mn></mml:mrow></mml:msup></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft196">\begin{document}$\gamma= 10^{10}$\end{document}</tex-math></alternatives></inline-formula>) to any selection or epistatic coefficients involving TF alleles, ensuring they are effectively zero under the gauge transformation. Following prior work (<xref ref-type="bibr" rid="bib84">Shimagaki and Barton, 2025b</xref>), we penalized epistatic interactions between loci more than 50 nucleotides apart on the reference sequence with the same strong regularization. We also used the same moderate regularization value of <inline-formula><alternatives><mml:math id="inf197"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>γ</mml:mi><mml:mo>=</mml:mo><mml:mn>50</mml:mn></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft197">\begin{document}$\gamma= 50$\end{document}</tex-math></alternatives></inline-formula> for all other epistatic terms and used <inline-formula><alternatives><mml:math id="inf198"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mi>γ</mml:mi><mml:mo>=</mml:mo><mml:mn>10</mml:mn></mml:mstyle></mml:mrow></mml:mstyle></mml:math><tex-math id="inft198">\begin{document}$\gamma=10$\end{document}</tex-math></alternatives></inline-formula> for selection coefficients, consistent with the additive model.</p></sec></sec></sec></body><back><sec sec-type="additional-information" id="s5"><title>Additional information</title><fn-group content-type="competing-interest"><title>Competing interests</title><fn fn-type="COI-statement" id="conf1"><p>No competing interests declared</p></fn></fn-group><fn-group content-type="author-contribution"><title>Author contributions</title><fn fn-type="con" id="con1"><p>Conceptualization, Data curation, Investigation, Visualization, Methodology, Writing – original draft, Writing – review and editing</p></fn><fn fn-type="con" id="con2"><p>Investigation, Writing – original draft, Writing – review and editing</p></fn><fn fn-type="con" id="con3"><p>Conceptualization, Data curation, Funding acquisition, Investigation, Visualization, Methodology, Writing – original draft, Project administration, Writing – review and editing</p></fn></fn-group></sec><sec sec-type="supplementary-material" id="s6"><title>Additional files</title><supplementary-material id="supp1"><label>Supplementary file 1.</label><caption><title>CH103 and CH235 resistance mutations.</title></caption><media xlink:href="elife-105466-supp1-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp2"><label>Supplementary file 2.</label><caption><title>Strain-specific antibody resistance mutations in CH505.</title></caption><media xlink:href="elife-105466-supp2-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp3"><label>Supplementary file 3.</label><caption><title>DH272, DH475, and strain-specific antibody resistance mutations in CH848.</title></caption><media xlink:href="elife-105466-supp3-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp4"><label>Supplementary file 4.</label><caption><title>Biological effects of the HIV-1 mutations inferred to be the most beneficial in CH505.</title></caption><media xlink:href="elife-105466-supp4-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp5"><label>Supplementary file 5.</label><caption><title>Biological effects of the HIV-1 mutations inferred to be the most beneficial in CH848.</title></caption><media xlink:href="elife-105466-supp5-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp6"><label>Supplementary file 6.</label><caption><title>CH505 and SHIV.CH505 sequence statistics.</title></caption><media xlink:href="elife-105466-supp6-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp7"><label>Supplementary file 7.</label><caption><title>CH848 and SHIV.CH848 sequence statistics.</title></caption><media xlink:href="elife-105466-supp7-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp8"><label>Supplementary file 8.</label><caption><title>Biological effects of strongly selected SHIV.CH505 mutations.</title></caption><media xlink:href="elife-105466-supp8-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp9"><label>Supplementary file 9.</label><caption><title>Biological effects of strongly selected SHIV.CH848 mutations.</title></caption><media xlink:href="elife-105466-supp9-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp10"><label>Supplementary file 10.</label><caption><title>Selective advantage of mutations that confer resistance to antibodies in SHIV.CH505.</title></caption><media xlink:href="elife-105466-supp10-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp11"><label>Supplementary file 11.</label><caption><title>Selective advantage of mutations that confer resistance to antibodies in SHIV.CH848.</title></caption><media xlink:href="elife-105466-supp11-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp12"><label>Supplementary file 12.</label><caption><title>List of selected sites using LASSIE in SHIV.CH505.</title></caption><media xlink:href="elife-105466-supp12-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp13"><label>Supplementary file 13.</label><caption><title>List of selected sites using LASSIE in SHIV.CH848.</title></caption><media xlink:href="elife-105466-supp13-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="mdar"><label>MDAR checklist</label><media xlink:href="elife-105466-mdarchecklist1-v1.docx" mimetype="application" mime-subtype="docx"/></supplementary-material></sec><sec sec-type="data-availability" id="s7"><title>Data availability</title><p>Data and code accompanying this manuscript is publicly available at the GitHub repository <ext-link ext-link-type="uri" xlink:href="https://github.com/bartonlab/paper-HIV-coevolution">https://github.com/bartonlab/paper-HIV-coevolution</ext-link> (copy archived at <xref ref-type="bibr" rid="bib83">Shimagaki and Barton, 2025a</xref>). This repository contains source files that process HIV-1 and SHIV sequences, infer selection coefficients, and identify and characterize mutations. The included Jupyter notebooks can be run to reproduce the figures presented here. The original HIV-1 sequences can be retrieved from the LANL database (<ext-link ext-link-type="uri" xlink:href="https://www.hiv.lanl.gov/content/index">https://www.hiv.lanl.gov/content/index</ext-link>), and SHIV sequences can be found at GenBank (<ext-link ext-link-type="uri" xlink:href="https://www.ncbi.nlm.nih.gov/">https://www.ncbi.nlm.nih.gov/</ext-link>).</p></sec><ack id="ack"><title>Acknowledgements</title><p>The work of KSS and JPB reported in this publication was supported by the National Institute of General Medical Sciences of the National Institutes of Health under Award Number R35GM138233.</p></ack><ref-list><title>References</title><ref id="bib1"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Allen</surname><given-names>TM</given-names></name><name><surname>Altfeld</surname><given-names>M</given-names></name><name><surname>Geer</surname><given-names>SC</given-names></name><name><surname>Kalife</surname><given-names>ET</given-names></name><name><surname>Moore</surname><given-names>C</given-names></name><name><surname>O’sullivan</surname><given-names>KM</given-names></name><name><surname>Desouza</surname><given-names>I</given-names></name><name><surname>Feeney</surname><given-names>ME</given-names></name><name><surname>Eldridge</surname><given-names>RL</given-names></name><name><surname>Maier</surname><given-names>EL</given-names></name><name><surname>Kaufmann</surname><given-names>DE</given-names></name><name><surname>Lahaie</surname><given-names>MP</given-names></name><name><surname>Reyor</surname><given-names>L</given-names></name><name><surname>Tanzi</surname><given-names>G</given-names></name><name><surname>Johnston</surname><given-names>MN</given-names></name><name><surname>Brander</surname><given-names>C</given-names></name><name><surname>Draenert</surname><given-names>R</given-names></name><name><surname>Rockstroh</surname><given-names>JK</given-names></name><name><surname>Jessen</surname><given-names>H</given-names></name><name><surname>Rosenberg</surname><given-names>ES</given-names></name><name><surname>Mallal</surname><given-names>SA</given-names></name><name><surname>Walker</surname><given-names>BD</given-names></name></person-group><year iso-8601-date="2005">2005</year><article-title>Selective escape from CD8+ T-cell responses represents a major driving force of human immunodeficiency virus type 1 (HIV-1) sequence diversity and reveals constraints on HIV-1 evolution</article-title><source>Journal of Virology</source><volume>79</volume><fpage>13239</fpage><lpage>13249</lpage><pub-id pub-id-type="doi">10.1128/JVI.79.21.13239-13249.2005</pub-id><pub-id pub-id-type="pmid">16227247</pub-id></element-citation></ref><ref id="bib2"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Altfeld</surname><given-names>M</given-names></name><name><surname>Allen</surname><given-names>TM</given-names></name></person-group><year iso-8601-date="2006">2006</year><article-title>Hitting HIV where it hurts: an alternative approach to HIV vaccine design</article-title><source>TRENDS in Immunology</source><volume>27</volume><fpage>504</fpage><lpage>510</lpage><pub-id pub-id-type="doi">10.1016/j.it.2006.09.007</pub-id><pub-id pub-id-type="pmid">16997629</pub-id></element-citation></ref><ref id="bib3"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Barton</surname><given-names>JP</given-names></name><name><surname>Goonetilleke</surname><given-names>N</given-names></name><name><surname>Butler</surname><given-names>TC</given-names></name><name><surname>Walker</surname><given-names>BD</given-names></name><name><surname>McMichael</surname><given-names>AJ</given-names></name><name><surname>Chakraborty</surname><given-names>AK</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>Relative rate and location of intra-host HIV evolution to evade cellular immunity are predictable</article-title><source>Nature Communications</source><volume>7</volume><elocation-id>11660</elocation-id><pub-id pub-id-type="doi">10.1038/ncomms11660</pub-id><pub-id pub-id-type="pmid">27212475</pub-id></element-citation></ref><ref id="bib4"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Barton</surname><given-names>JP</given-names></name><name><surname>Rajkoomar</surname><given-names>E</given-names></name><name><surname>Mann</surname><given-names>JK</given-names></name><name><surname>Murakowski</surname><given-names>DK</given-names></name><name><surname>Toyoda</surname><given-names>M</given-names></name><name><surname>Mahiti</surname><given-names>M</given-names></name><name><surname>Mwimanzi</surname><given-names>P</given-names></name><name><surname>Ueno</surname><given-names>T</given-names></name><name><surname>Chakraborty</surname><given-names>AK</given-names></name><name><surname>Ndung’u</surname><given-names>T</given-names></name></person-group><year iso-8601-date="2019">2019</year><article-title>Modelling and <italic>in vitro</italic> testing of the HIV-1 Nef fitness landscape</article-title><source>Virus Evolution</source><volume>5</volume><elocation-id>vez029</elocation-id><pub-id pub-id-type="doi">10.1093/ve/vez029</pub-id><pub-id pub-id-type="pmid">31392033</pub-id></element-citation></ref><ref id="bib5"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Bauer</surname><given-names>A</given-names></name><name><surname>Lindemuth</surname><given-names>E</given-names></name><name><surname>Marino</surname><given-names>FE</given-names></name><name><surname>Krause</surname><given-names>R</given-names></name><name><surname>Joy</surname><given-names>J</given-names></name><name><surname>Docken</surname><given-names>SS</given-names></name><name><surname>Mallick</surname><given-names>S</given-names></name><name><surname>McCormick</surname><given-names>K</given-names></name><name><surname>Holt</surname><given-names>C</given-names></name><name><surname>Georgiev</surname><given-names>I</given-names></name><name><surname>Felber</surname><given-names>B</given-names></name><name><surname>Keele</surname><given-names>BF</given-names></name><name><surname>Veazey</surname><given-names>R</given-names></name><name><surname>Davenport</surname><given-names>MP</given-names></name><name><surname>Li</surname><given-names>H</given-names></name><name><surname>Shaw</surname><given-names>GM</given-names></name><name><surname>Bar</surname><given-names>KJ</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>Adaptation of a transmitted/founder simian-human immunodeficiency virus for enhanced replication in rhesus macaques</article-title><source>PLOS Pathogens</source><volume>19</volume><elocation-id>e1011059</elocation-id><pub-id pub-id-type="doi">10.1371/journal.ppat.1011059</pub-id><pub-id pub-id-type="pmid">37399208</pub-id></element-citation></ref><ref id="bib6"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Benson</surname><given-names>DA</given-names></name><name><surname>Karsch-Mizrachi</surname><given-names>I</given-names></name><name><surname>Clark</surname><given-names>K</given-names></name><name><surname>Lipman</surname><given-names>DJ</given-names></name><name><surname>Ostell</surname><given-names>J</given-names></name><name><surname>Sayers</surname><given-names>EW</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>GenBank</article-title><source>Nucleic Acids Research</source><volume>40</volume><fpage>D48</fpage><lpage>D53</lpage><pub-id pub-id-type="doi">10.1093/nar/gkr1202</pub-id><pub-id pub-id-type="pmid">22144687</pub-id></element-citation></ref><ref id="bib7"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Bollback</surname><given-names>JP</given-names></name><name><surname>York</surname><given-names>TL</given-names></name><name><surname>Nielsen</surname><given-names>R</given-names></name></person-group><year iso-8601-date="2008">2008</year><article-title>Estimation of 2Nes from temporal allele frequency data</article-title><source>Genetics</source><volume>179</volume><fpage>497</fpage><lpage>502</lpage><pub-id pub-id-type="doi">10.1534/genetics.107.085019</pub-id><pub-id pub-id-type="pmid">18493066</pub-id></element-citation></ref><ref id="bib8"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Bons</surname><given-names>E</given-names></name><name><surname>Leemann</surname><given-names>C</given-names></name><name><surname>Metzner</surname><given-names>KJ</given-names></name><name><surname>Regoes</surname><given-names>RR</given-names></name></person-group><year iso-8601-date="2020">2020</year><article-title>Long-term experimental evolution of HIV-1 reveals effects of environment and mutational history</article-title><source>PLOS Biology</source><volume>18</volume><elocation-id>e3001010</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pbio.3001010</pub-id><pub-id pub-id-type="pmid">33370289</pub-id></element-citation></ref><ref id="bib9"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Bonsignori</surname><given-names>M</given-names></name><name><surname>Zhou</surname><given-names>T</given-names></name><name><surname>Sheng</surname><given-names>Z</given-names></name><name><surname>Chen</surname><given-names>L</given-names></name><name><surname>Gao</surname><given-names>F</given-names></name><name><surname>Joyce</surname><given-names>MG</given-names></name><name><surname>Ozorowski</surname><given-names>G</given-names></name><name><surname>Chuang</surname><given-names>G-Y</given-names></name><name><surname>Schramm</surname><given-names>CA</given-names></name><name><surname>Wiehe</surname><given-names>K</given-names></name><name><surname>Alam</surname><given-names>SM</given-names></name><name><surname>Bradley</surname><given-names>T</given-names></name><name><surname>Gladden</surname><given-names>MA</given-names></name><name><surname>Hwang</surname><given-names>K-K</given-names></name><name><surname>Iyengar</surname><given-names>S</given-names></name><name><surname>Kumar</surname><given-names>A</given-names></name><name><surname>Lu</surname><given-names>X</given-names></name><name><surname>Luo</surname><given-names>K</given-names></name><name><surname>Mangiapani</surname><given-names>MC</given-names></name><name><surname>Parks</surname><given-names>RJ</given-names></name><name><surname>Song</surname><given-names>H</given-names></name><name><surname>Acharya</surname><given-names>P</given-names></name><name><surname>Bailer</surname><given-names>RT</given-names></name><name><surname>Cao</surname><given-names>A</given-names></name><name><surname>Druz</surname><given-names>A</given-names></name><name><surname>Georgiev</surname><given-names>IS</given-names></name><name><surname>Kwon</surname><given-names>YD</given-names></name><name><surname>Louder</surname><given-names>MK</given-names></name><name><surname>Zhang</surname><given-names>B</given-names></name><name><surname>Zheng</surname><given-names>A</given-names></name><name><surname>Hill</surname><given-names>BJ</given-names></name><name><surname>Kong</surname><given-names>R</given-names></name><name><surname>Soto</surname><given-names>C</given-names></name><collab>NISC Comparative Sequencing Program</collab><name><surname>Mullikin</surname><given-names>JC</given-names></name><name><surname>Douek</surname><given-names>DC</given-names></name><name><surname>Montefiori</surname><given-names>DC</given-names></name><name><surname>Moody</surname><given-names>MA</given-names></name><name><surname>Shaw</surname><given-names>GM</given-names></name><name><surname>Hahn</surname><given-names>BH</given-names></name><name><surname>Kelsoe</surname><given-names>G</given-names></name><name><surname>Hraber</surname><given-names>PT</given-names></name><name><surname>Korber</surname><given-names>BT</given-names></name><name><surname>Boyd</surname><given-names>SD</given-names></name><name><surname>Fire</surname><given-names>AZ</given-names></name><name><surname>Kepler</surname><given-names>TB</given-names></name><name><surname>Shapiro</surname><given-names>L</given-names></name><name><surname>Ward</surname><given-names>AB</given-names></name><name><surname>Mascola</surname><given-names>JR</given-names></name><name><surname>Liao</surname><given-names>H-X</given-names></name><name><surname>Kwong</surname><given-names>PD</given-names></name><name><surname>Haynes</surname><given-names>BF</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>Maturation pathway from germline to broad HIV-1 neutralizer of a cd4-mimic antibody</article-title><source>Cell</source><volume>165</volume><fpage>449</fpage><lpage>463</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2016.02.022</pub-id><pub-id pub-id-type="pmid">26949186</pub-id></element-citation></ref><ref id="bib10"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Bonsignori</surname><given-names>M</given-names></name><name><surname>Kreider</surname><given-names>EF</given-names></name><name><surname>Fera</surname><given-names>D</given-names></name><name><surname>Meyerhoff</surname><given-names>RR</given-names></name><name><surname>Bradley</surname><given-names>T</given-names></name><name><surname>Wiehe</surname><given-names>K</given-names></name><name><surname>Alam</surname><given-names>SM</given-names></name><name><surname>Aussedat</surname><given-names>B</given-names></name><name><surname>Walkowicz</surname><given-names>WE</given-names></name><name><surname>Hwang</surname><given-names>K-K</given-names></name><name><surname>Saunders</surname><given-names>KO</given-names></name><name><surname>Zhang</surname><given-names>R</given-names></name><name><surname>Gladden</surname><given-names>MA</given-names></name><name><surname>Monroe</surname><given-names>A</given-names></name><name><surname>Kumar</surname><given-names>A</given-names></name><name><surname>Xia</surname><given-names>S-M</given-names></name><name><surname>Cooper</surname><given-names>M</given-names></name><name><surname>Louder</surname><given-names>MK</given-names></name><name><surname>McKee</surname><given-names>K</given-names></name><name><surname>Bailer</surname><given-names>RT</given-names></name><name><surname>Pier</surname><given-names>BW</given-names></name><name><surname>Jette</surname><given-names>CA</given-names></name><name><surname>Kelsoe</surname><given-names>G</given-names></name><name><surname>Williams</surname><given-names>WB</given-names></name><name><surname>Morris</surname><given-names>L</given-names></name><name><surname>Kappes</surname><given-names>J</given-names></name><name><surname>Wagh</surname><given-names>K</given-names></name><name><surname>Kamanga</surname><given-names>G</given-names></name><name><surname>Cohen</surname><given-names>MS</given-names></name><name><surname>Hraber</surname><given-names>PT</given-names></name><name><surname>Montefiori</surname><given-names>DC</given-names></name><name><surname>Trama</surname><given-names>A</given-names></name><name><surname>Liao</surname><given-names>H-X</given-names></name><name><surname>Kepler</surname><given-names>TB</given-names></name><name><surname>Moody</surname><given-names>MA</given-names></name><name><surname>Gao</surname><given-names>F</given-names></name><name><surname>Danishefsky</surname><given-names>SJ</given-names></name><name><surname>Mascola</surname><given-names>JR</given-names></name><name><surname>Shaw</surname><given-names>GM</given-names></name><name><surname>Hahn</surname><given-names>BH</given-names></name><name><surname>Harrison</surname><given-names>SC</given-names></name><name><surname>Korber</surname><given-names>BT</given-names></name><name><surname>Haynes</surname><given-names>BF</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>Staged induction of HIV-1 glycan-dependent broadly neutralizing antibodies</article-title><source>Science Translational Medicine</source><volume>9</volume><elocation-id>eaai7514</elocation-id><pub-id pub-id-type="doi">10.1126/scitranslmed.aai7514</pub-id><pub-id pub-id-type="pmid">28298420</pub-id></element-citation></ref><ref id="bib11"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Burton</surname><given-names>DR</given-names></name><name><surname>Hangartner</surname><given-names>L</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>Broadly neutralizing antibodies to HIV and their role in vaccine design</article-title><source>Annual Review of Immunology</source><volume>34</volume><fpage>635</fpage><lpage>659</lpage><pub-id pub-id-type="doi">10.1146/annurev-immunol-041015-055515</pub-id><pub-id pub-id-type="pmid">27168247</pub-id></element-citation></ref><ref id="bib12"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Choisy</surname><given-names>M</given-names></name><name><surname>Woelk</surname><given-names>CH</given-names></name><name><surname>Guégan</surname><given-names>J-F</given-names></name><name><surname>Robertson</surname><given-names>DL</given-names></name></person-group><year iso-8601-date="2004">2004</year><article-title>Comparative study of adaptive molecular evolution in different human immunodeficiency virus groups and subtypes</article-title><source>Journal of Virology</source><volume>78</volume><fpage>1962</fpage><lpage>1970</lpage><pub-id pub-id-type="doi">10.1128/jvi.78.4.1962-1970.2004</pub-id><pub-id pub-id-type="pmid">14747561</pub-id></element-citation></ref><ref id="bib13"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Cornelissen</surname><given-names>M</given-names></name><name><surname>Euler</surname><given-names>Z</given-names></name><name><surname>van den Kerkhof</surname><given-names>TLGM</given-names></name><name><surname>van Gils</surname><given-names>MJ</given-names></name><name><surname>Boeser-Nunnink</surname><given-names>BDM</given-names></name><name><surname>Kootstra</surname><given-names>NA</given-names></name><name><surname>Zorgdrager</surname><given-names>F</given-names></name><name><surname>Schuitemaker</surname><given-names>H</given-names></name><name><surname>Prins</surname><given-names>JM</given-names></name><name><surname>Sanders</surname><given-names>RW</given-names></name><name><surname>van der Kuyl</surname><given-names>AC</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>The neutralizing antibody response in an individual with triple HIV-1 infection remains directed at the first infecting subtype</article-title><source>AIDS Research and Human Retroviruses</source><volume>32</volume><fpage>1135</fpage><lpage>1142</lpage><pub-id pub-id-type="doi">10.1089/aid.2015.0324</pub-id><pub-id pub-id-type="pmid">26910384</pub-id></element-citation></ref><ref id="bib14"><element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Crow</surname><given-names>JF</given-names></name></person-group><year iso-8601-date="2017">2017</year><source>An Introduction to Population Genetics Theory</source><publisher-name>Scientific Publishers</publisher-name></element-citation></ref><ref id="bib15"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Das</surname><given-names>SR</given-names></name><name><surname>Jameel</surname><given-names>S</given-names></name></person-group><year iso-8601-date="2005">2005</year><article-title>Biology of the HIV Nef protein</article-title><source>The Indian Journal of Medical Research</source><volume>121</volume><fpage>315</fpage><lpage>332</lpage><pub-id pub-id-type="pmid">15817946</pub-id></element-citation></ref><ref id="bib16"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Doria-Rose</surname><given-names>NA</given-names></name><name><surname>Klein</surname><given-names>RM</given-names></name><name><surname>Daniels</surname><given-names>MG</given-names></name><name><surname>O’Dell</surname><given-names>S</given-names></name><name><surname>Nason</surname><given-names>M</given-names></name><name><surname>Lapedes</surname><given-names>A</given-names></name><name><surname>Bhattacharya</surname><given-names>T</given-names></name><name><surname>Migueles</surname><given-names>SA</given-names></name><name><surname>Wyatt</surname><given-names>RT</given-names></name><name><surname>Korber</surname><given-names>BT</given-names></name><name><surname>Mascola</surname><given-names>JR</given-names></name><name><surname>Connors</surname><given-names>M</given-names></name></person-group><year iso-8601-date="2010">2010</year><article-title>Breadth of human immunodeficiency virus-specific neutralizing activity in sera: clustering analysis and association with clinical variables</article-title><source>Journal of Virology</source><volume>84</volume><fpage>1631</fpage><lpage>1636</lpage><pub-id pub-id-type="doi">10.1128/JVI.01482-09</pub-id></element-citation></ref><ref id="bib17"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Doria-Rose</surname><given-names>NA</given-names></name><name><surname>Schramm</surname><given-names>CA</given-names></name><name><surname>Gorman</surname><given-names>J</given-names></name><name><surname>Moore</surname><given-names>PL</given-names></name><name><surname>Bhiman</surname><given-names>JN</given-names></name><name><surname>DeKosky</surname><given-names>BJ</given-names></name><name><surname>Ernandes</surname><given-names>MJ</given-names></name><name><surname>Georgiev</surname><given-names>IS</given-names></name><name><surname>Kim</surname><given-names>HJ</given-names></name><name><surname>Pancera</surname><given-names>M</given-names></name><name><surname>Staupe</surname><given-names>RP</given-names></name><name><surname>Altae-Tran</surname><given-names>HR</given-names></name><name><surname>Bailer</surname><given-names>RT</given-names></name><name><surname>Crooks</surname><given-names>ET</given-names></name><name><surname>Cupo</surname><given-names>A</given-names></name><name><surname>Druz</surname><given-names>A</given-names></name><name><surname>Garrett</surname><given-names>NJ</given-names></name><name><surname>Hoi</surname><given-names>KH</given-names></name><name><surname>Kong</surname><given-names>R</given-names></name><name><surname>Louder</surname><given-names>MK</given-names></name><name><surname>Longo</surname><given-names>NS</given-names></name><name><surname>McKee</surname><given-names>K</given-names></name><name><surname>Nonyane</surname><given-names>M</given-names></name><name><surname>O’Dell</surname><given-names>S</given-names></name><name><surname>Roark</surname><given-names>RS</given-names></name><name><surname>Rudicell</surname><given-names>RS</given-names></name><name><surname>Schmidt</surname><given-names>SD</given-names></name><name><surname>Sheward</surname><given-names>DJ</given-names></name><name><surname>Soto</surname><given-names>C</given-names></name><name><surname>Wibmer</surname><given-names>CK</given-names></name><name><surname>Yang</surname><given-names>Y</given-names></name><name><surname>Zhang</surname><given-names>Z</given-names></name><name><surname>Mullikin</surname><given-names>JC</given-names></name><name><surname>Binley</surname><given-names>JM</given-names></name><name><surname>Sanders</surname><given-names>RW</given-names></name><name><surname>Wilson</surname><given-names>IA</given-names></name><name><surname>Moore</surname><given-names>JP</given-names></name><name><surname>Ward</surname><given-names>AB</given-names></name><name><surname>Georgiou</surname><given-names>G</given-names></name><name><surname>Williamson</surname><given-names>C</given-names></name><name><surname>Abdool Karim</surname><given-names>SS</given-names></name><name><surname>Morris</surname><given-names>L</given-names></name><name><surname>Kwong</surname><given-names>PD</given-names></name><name><surname>Shapiro</surname><given-names>L</given-names></name><name><surname>Mascola</surname><given-names>JR</given-names></name><collab>NISC Comparative Sequencing</collab></person-group><year iso-8601-date="2014">2014</year><article-title>Developmental pathway for potent V1V2-directed HIV-neutralizing antibodies</article-title><source>Nature</source><volume>509</volume><fpage>55</fpage><lpage>62</lpage><pub-id pub-id-type="doi">10.1038/nature13036</pub-id></element-citation></ref><ref id="bib18"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Dosenovic</surname><given-names>P</given-names></name><name><surname>von Boehmer</surname><given-names>L</given-names></name><name><surname>Escolano</surname><given-names>A</given-names></name><name><surname>Jardine</surname><given-names>J</given-names></name><name><surname>Freund</surname><given-names>NT</given-names></name><name><surname>Gitlin</surname><given-names>AD</given-names></name><name><surname>McGuire</surname><given-names>AT</given-names></name><name><surname>Kulp</surname><given-names>DW</given-names></name><name><surname>Oliveira</surname><given-names>T</given-names></name><name><surname>Scharf</surname><given-names>L</given-names></name><name><surname>Pietzsch</surname><given-names>J</given-names></name><name><surname>Gray</surname><given-names>MD</given-names></name><name><surname>Cupo</surname><given-names>A</given-names></name><name><surname>van Gils</surname><given-names>MJ</given-names></name><name><surname>Yao</surname><given-names>K-H</given-names></name><name><surname>Liu</surname><given-names>C</given-names></name><name><surname>Gazumyan</surname><given-names>A</given-names></name><name><surname>Seaman</surname><given-names>MS</given-names></name><name><surname>Björkman</surname><given-names>PJ</given-names></name><name><surname>Sanders</surname><given-names>RW</given-names></name><name><surname>Moore</surname><given-names>JP</given-names></name><name><surname>Stamatatos</surname><given-names>L</given-names></name><name><surname>Schief</surname><given-names>WR</given-names></name><name><surname>Nussenzweig</surname><given-names>MC</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>Immunization for HIV-1 broadly neutralizing antibodies in human ig knockin mice</article-title><source>Cell</source><volume>161</volume><fpage>1505</fpage><lpage>1515</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2015.06.003</pub-id><pub-id pub-id-type="pmid">26091035</pub-id></element-citation></ref><ref id="bib19"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Draenert</surname><given-names>R</given-names></name><name><surname>Allen</surname><given-names>TM</given-names></name><name><surname>Liu</surname><given-names>Y</given-names></name><name><surname>Wrin</surname><given-names>T</given-names></name><name><surname>Chappey</surname><given-names>C</given-names></name><name><surname>Verrill</surname><given-names>CL</given-names></name><name><surname>Sirera</surname><given-names>G</given-names></name><name><surname>Eldridge</surname><given-names>RL</given-names></name><name><surname>Lahaie</surname><given-names>MP</given-names></name><name><surname>Ruiz</surname><given-names>L</given-names></name><name><surname>Clotet</surname><given-names>B</given-names></name><name><surname>Petropoulos</surname><given-names>CJ</given-names></name><name><surname>Walker</surname><given-names>BD</given-names></name><name><surname>Martinez-Picado</surname><given-names>J</given-names></name></person-group><year iso-8601-date="2006">2006</year><article-title>Constraints on HIV-1 evolution and immunodominance revealed in monozygotic adult twins infected with the same virus</article-title><source>The Journal of Experimental Medicine</source><volume>203</volume><fpage>529</fpage><lpage>539</lpage><pub-id pub-id-type="doi">10.1084/jem.20052116</pub-id></element-citation></ref><ref id="bib20"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Escolano</surname><given-names>A</given-names></name><name><surname>Steichen</surname><given-names>JM</given-names></name><name><surname>Dosenovic</surname><given-names>P</given-names></name><name><surname>Kulp</surname><given-names>DW</given-names></name><name><surname>Golijanin</surname><given-names>J</given-names></name><name><surname>Sok</surname><given-names>D</given-names></name><name><surname>Freund</surname><given-names>NT</given-names></name><name><surname>Gitlin</surname><given-names>AD</given-names></name><name><surname>Oliveira</surname><given-names>T</given-names></name><name><surname>Araki</surname><given-names>T</given-names></name><name><surname>Lowe</surname><given-names>S</given-names></name><name><surname>Chen</surname><given-names>ST</given-names></name><name><surname>Heinemann</surname><given-names>J</given-names></name><name><surname>Yao</surname><given-names>K-H</given-names></name><name><surname>Georgeson</surname><given-names>E</given-names></name><name><surname>Saye-Francisco</surname><given-names>KL</given-names></name><name><surname>Gazumyan</surname><given-names>A</given-names></name><name><surname>Adachi</surname><given-names>Y</given-names></name><name><surname>Kubitz</surname><given-names>M</given-names></name><name><surname>Burton</surname><given-names>DR</given-names></name><name><surname>Schief</surname><given-names>WR</given-names></name><name><surname>Nussenzweig</surname><given-names>MC</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>Sequential immunization elicits broadly neutralizing anti-HIV-1 antibodies in ig knockin mice</article-title><source>Cell</source><volume>166</volume><fpage>1445</fpage><lpage>1458</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2016.07.030</pub-id><pub-id pub-id-type="pmid">27610569</pub-id></element-citation></ref><ref id="bib21"><element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Ewens</surname><given-names>WJ</given-names></name></person-group><year iso-8601-date="2004">2004</year><source>Mathematical Population Genetics: Theoretical Introduction</source><publisher-name>Springer</publisher-name><pub-id pub-id-type="doi">10.1007/978-0-387-21822-9</pub-id></element-citation></ref><ref id="bib22"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Feder</surname><given-names>AF</given-names></name><name><surname>Kryazhimskiy</surname><given-names>S</given-names></name><name><surname>Plotkin</surname><given-names>JB</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Identifying signatures of selection in genetic time series</article-title><source>Genetics</source><volume>196</volume><fpage>509</fpage><lpage>522</lpage><pub-id pub-id-type="doi">10.1534/genetics.113.158220</pub-id><pub-id pub-id-type="pmid">24318534</pub-id></element-citation></ref><ref id="bib23"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Feder</surname><given-names>AF</given-names></name><name><surname>Rhee</surname><given-names>SY</given-names></name><name><surname>Holmes</surname><given-names>SP</given-names></name><name><surname>Shafer</surname><given-names>RW</given-names></name><name><surname>Petrov</surname><given-names>DA</given-names></name><name><surname>Pennings</surname><given-names>PS</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>More effective drugs lead to harder selective sweeps in the evolution of drug resistance in HIV-1</article-title><source>eLife</source><volume>5</volume><elocation-id>e10670</elocation-id><pub-id pub-id-type="doi">10.7554/eLife.10670</pub-id><pub-id pub-id-type="pmid">26882502</pub-id></element-citation></ref><ref id="bib24"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Feder</surname><given-names>AF</given-names></name><name><surname>Harper</surname><given-names>KN</given-names></name><name><surname>Brumme</surname><given-names>CJ</given-names></name><name><surname>Pennings</surname><given-names>PS</given-names></name></person-group><year iso-8601-date="2021">2021</year><article-title>Understanding patterns of HIV multi-drug resistance through models of temporal and spatial drug heterogeneity</article-title><source>eLife</source><volume>10</volume><elocation-id>e69032</elocation-id><pub-id pub-id-type="doi">10.7554/eLife.69032</pub-id><pub-id pub-id-type="pmid">34473060</pub-id></element-citation></ref><ref id="bib25"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ferguson</surname><given-names>AL</given-names></name><name><surname>Mann</surname><given-names>JK</given-names></name><name><surname>Omarjee</surname><given-names>S</given-names></name><name><surname>Ndung’u</surname><given-names>T</given-names></name><name><surname>Walker</surname><given-names>BD</given-names></name><name><surname>Chakraborty</surname><given-names>AK</given-names></name></person-group><year iso-8601-date="2013">2013</year><article-title>Translating HIV sequences into quantitative fitness landscapes predicts viral vulnerabilities for rational immunogen design</article-title><source>Immunity</source><volume>38</volume><fpage>606</fpage><lpage>617</lpage><pub-id pub-id-type="doi">10.1016/j.immuni.2012.11.022</pub-id><pub-id pub-id-type="pmid">23521886</pub-id></element-citation></ref><ref id="bib26"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Foll</surname><given-names>M</given-names></name><name><surname>Poh</surname><given-names>Y-P</given-names></name><name><surname>Renzette</surname><given-names>N</given-names></name><name><surname>Ferrer-Admetlla</surname><given-names>A</given-names></name><name><surname>Bank</surname><given-names>C</given-names></name><name><surname>Shim</surname><given-names>H</given-names></name><name><surname>Malaspinas</surname><given-names>A-S</given-names></name><name><surname>Ewing</surname><given-names>G</given-names></name><name><surname>Liu</surname><given-names>P</given-names></name><name><surname>Wegmann</surname><given-names>D</given-names></name><name><surname>Caffrey</surname><given-names>DR</given-names></name><name><surname>Zeldovich</surname><given-names>KB</given-names></name><name><surname>Bolon</surname><given-names>DN</given-names></name><name><surname>Wang</surname><given-names>JP</given-names></name><name><surname>Kowalik</surname><given-names>TF</given-names></name><name><surname>Schiffer</surname><given-names>CA</given-names></name><name><surname>Finberg</surname><given-names>RW</given-names></name><name><surname>Jensen</surname><given-names>JD</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Influenza virus drug resistance: a time-sampled population genetics perspective</article-title><source>PLOS Genetics</source><volume>10</volume><elocation-id>e1004185</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pgen.1004185</pub-id><pub-id pub-id-type="pmid">24586206</pub-id></element-citation></ref><ref id="bib27"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Gao</surname><given-names>F</given-names></name><name><surname>Bonsignori</surname><given-names>M</given-names></name><name><surname>Liao</surname><given-names>H-X</given-names></name><name><surname>Kumar</surname><given-names>A</given-names></name><name><surname>Xia</surname><given-names>S-M</given-names></name><name><surname>Lu</surname><given-names>X</given-names></name><name><surname>Cai</surname><given-names>F</given-names></name><name><surname>Hwang</surname><given-names>K-K</given-names></name><name><surname>Song</surname><given-names>H</given-names></name><name><surname>Zhou</surname><given-names>T</given-names></name><name><surname>Lynch</surname><given-names>RM</given-names></name><name><surname>Alam</surname><given-names>SM</given-names></name><name><surname>Moody</surname><given-names>MA</given-names></name><name><surname>Ferrari</surname><given-names>G</given-names></name><name><surname>Berrong</surname><given-names>M</given-names></name><name><surname>Kelsoe</surname><given-names>G</given-names></name><name><surname>Shaw</surname><given-names>GM</given-names></name><name><surname>Hahn</surname><given-names>BH</given-names></name><name><surname>Montefiori</surname><given-names>DC</given-names></name><name><surname>Kamanga</surname><given-names>G</given-names></name><name><surname>Cohen</surname><given-names>MS</given-names></name><name><surname>Hraber</surname><given-names>P</given-names></name><name><surname>Kwong</surname><given-names>PD</given-names></name><name><surname>Korber</surname><given-names>BT</given-names></name><name><surname>Mascola</surname><given-names>JR</given-names></name><name><surname>Kepler</surname><given-names>TB</given-names></name><name><surname>Haynes</surname><given-names>BF</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Cooperation of B cell lineages in induction of HIV-1-broadly neutralizing antibodies</article-title><source>Cell</source><volume>158</volume><fpage>481</fpage><lpage>491</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2014.06.022</pub-id><pub-id pub-id-type="pmid">25065977</pub-id></element-citation></ref><ref id="bib28"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Gao</surname><given-names>Y</given-names></name><name><surname>Barton</surname><given-names>JP</given-names></name></person-group><year iso-8601-date="2025">2025</year><article-title>A binary trait model reveals the fitness effects of HIV-1 escape from T cell responses</article-title><source>PNAS</source><volume>122</volume><elocation-id>e2405379122</elocation-id><pub-id pub-id-type="doi">10.1073/pnas.2405379122</pub-id></element-citation></ref><ref id="bib29"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Garcia</surname><given-names>V</given-names></name><name><surname>Regoes</surname><given-names>RR</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>The effect of interference on the CD8(+) T cell escape rates in HIV</article-title><source>Frontiers in Immunology</source><volume>5</volume><elocation-id>661</elocation-id><pub-id pub-id-type="doi">10.3389/fimmu.2014.00661</pub-id><pub-id pub-id-type="pmid">25628620</pub-id></element-citation></ref><ref id="bib30"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Garcia</surname><given-names>V</given-names></name><name><surname>Feldman</surname><given-names>MW</given-names></name><name><surname>Regoes</surname><given-names>RR</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>Investigating the consequences of interference between multiple CD8+ T cell escape mutations in early HIV infection</article-title><source>PLOS Computational Biology</source><volume>12</volume><elocation-id>e1004721</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pcbi.1004721</pub-id><pub-id pub-id-type="pmid">26829720</pub-id></element-citation></ref><ref id="bib31"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Gray</surname><given-names>ES</given-names></name><name><surname>Madiga</surname><given-names>MC</given-names></name><name><surname>Hermanus</surname><given-names>T</given-names></name><name><surname>Moore</surname><given-names>PL</given-names></name><name><surname>Wibmer</surname><given-names>CK</given-names></name><name><surname>Tumba</surname><given-names>NL</given-names></name><name><surname>Werner</surname><given-names>L</given-names></name><name><surname>Mlisana</surname><given-names>K</given-names></name><name><surname>Sibeko</surname><given-names>S</given-names></name><name><surname>Williamson</surname><given-names>C</given-names></name><name><surname>Abdool Karim</surname><given-names>SS</given-names></name><name><surname>Morris</surname><given-names>L</given-names></name><collab>and the CAPRISA002 Study Team</collab></person-group><year iso-8601-date="2011">2011</year><article-title>The neutralization breadth of HIV-1 develops incrementally over four years and is associated with CD4 <sup>+</sup> T cell decline and high viral load during acute infection</article-title><source>Journal of Virology</source><volume>85</volume><fpage>4828</fpage><lpage>4840</lpage><pub-id pub-id-type="doi">10.1128/JVI.00198-11</pub-id></element-citation></ref><ref id="bib32"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hatziioannou</surname><given-names>T</given-names></name><name><surname>Evans</surname><given-names>DT</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>Animal models for HIV/AIDS research</article-title><source>Nature Reviews. Microbiology</source><volume>10</volume><fpage>852</fpage><lpage>867</lpage><pub-id pub-id-type="doi">10.1038/nrmicro2911</pub-id><pub-id pub-id-type="pmid">23154262</pub-id></element-citation></ref><ref id="bib33"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Haynes</surname><given-names>BF</given-names></name><name><surname>Kelsoe</surname><given-names>G</given-names></name><name><surname>Harrison</surname><given-names>SC</given-names></name><name><surname>Kepler</surname><given-names>TB</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>B-cell-lineage immunogen design in vaccine development with HIV-1 as a case study</article-title><source>Nature Biotechnology</source><volume>30</volume><fpage>423</fpage><lpage>433</lpage><pub-id pub-id-type="doi">10.1038/nbt.2197</pub-id><pub-id pub-id-type="pmid">22565972</pub-id></element-citation></ref><ref id="bib34"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Haynes</surname><given-names>BF</given-names></name><name><surname>Shaw</surname><given-names>GM</given-names></name><name><surname>Korber</surname><given-names>B</given-names></name><name><surname>Kelsoe</surname><given-names>G</given-names></name><name><surname>Sodroski</surname><given-names>J</given-names></name><name><surname>Hahn</surname><given-names>BH</given-names></name><name><surname>Borrow</surname><given-names>P</given-names></name><name><surname>McMichael</surname><given-names>AJ</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>HIV-host interactions: implications for vaccine design</article-title><source>Cell Host &amp; Microbe</source><volume>19</volume><fpage>292</fpage><lpage>303</lpage><pub-id pub-id-type="doi">10.1016/j.chom.2016.02.002</pub-id></element-citation></ref><ref id="bib35"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Haynes</surname><given-names>BF</given-names></name><name><surname>Wiehe</surname><given-names>K</given-names></name><name><surname>Borrow</surname><given-names>P</given-names></name><name><surname>Saunders</surname><given-names>KO</given-names></name><name><surname>Korber</surname><given-names>B</given-names></name><name><surname>Wagh</surname><given-names>K</given-names></name><name><surname>McMichael</surname><given-names>AJ</given-names></name><name><surname>Kelsoe</surname><given-names>G</given-names></name><name><surname>Hahn</surname><given-names>BH</given-names></name><name><surname>Alt</surname><given-names>F</given-names></name><name><surname>Shaw</surname><given-names>GM</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>Strategies for HIV-1 vaccines that induce broadly neutralizing antibodies</article-title><source>Nature Reviews. Immunology</source><volume>23</volume><fpage>142</fpage><lpage>158</lpage><pub-id pub-id-type="doi">10.1038/s41577-022-00753-w</pub-id><pub-id pub-id-type="pmid">35962033</pub-id></element-citation></ref><ref id="bib36"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>He</surname><given-names>Z</given-names></name><name><surname>Dai</surname><given-names>X</given-names></name><name><surname>Lyu</surname><given-names>W</given-names></name><name><surname>Beaumont</surname><given-names>M</given-names></name><name><surname>Yu</surname><given-names>F</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>Estimating temporally variable selection intensity from ancient DNA Data</article-title><source>Molecular Biology and Evolution</source><volume>40</volume><elocation-id>msad008</elocation-id><pub-id pub-id-type="doi">10.1093/molbev/msad008</pub-id><pub-id pub-id-type="pmid">36661852</pub-id></element-citation></ref><ref id="bib37"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hie</surname><given-names>B</given-names></name><name><surname>Zhong</surname><given-names>ED</given-names></name><name><surname>Berger</surname><given-names>B</given-names></name><name><surname>Bryson</surname><given-names>B</given-names></name></person-group><year iso-8601-date="2021">2021</year><article-title>Learning the language of viral evolution and escape</article-title><source>Science</source><volume>371</volume><fpage>284</fpage><lpage>288</lpage><pub-id pub-id-type="doi">10.1126/science.abd7331</pub-id><pub-id pub-id-type="pmid">33446556</pub-id></element-citation></ref><ref id="bib38"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hong</surname><given-names>Z</given-names></name><name><surname>Shimagaki</surname><given-names>KS</given-names></name><name><surname>Barton</surname><given-names>JP</given-names></name></person-group><year iso-8601-date="2024">2024</year><article-title>popDMS infers mutation effects from deep mutational scanning data</article-title><source>Bioinformatics</source><volume>40</volume><elocation-id>btae499</elocation-id><pub-id pub-id-type="doi">10.1093/bioinformatics/btae499</pub-id><pub-id pub-id-type="pmid">39115383</pub-id></element-citation></ref><ref id="bib39"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hraber</surname><given-names>P</given-names></name><name><surname>Seaman</surname><given-names>MS</given-names></name><name><surname>Bailer</surname><given-names>RT</given-names></name><name><surname>Mascola</surname><given-names>JR</given-names></name><name><surname>Montefiori</surname><given-names>DC</given-names></name><name><surname>Korber</surname><given-names>BT</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Prevalence of broadly neutralizing antibody responses during chronic HIV-1 infection</article-title><source>AIDS</source><volume>28</volume><fpage>163</fpage><lpage>169</lpage><pub-id pub-id-type="doi">10.1097/QAD.0000000000000106</pub-id><pub-id pub-id-type="pmid">24361678</pub-id></element-citation></ref><ref id="bib40"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hraber</surname><given-names>P</given-names></name><name><surname>Korber</surname><given-names>B</given-names></name><name><surname>Wagh</surname><given-names>K</given-names></name><name><surname>Giorgi</surname><given-names>EE</given-names></name><name><surname>Bhattacharya</surname><given-names>T</given-names></name><name><surname>Gnanakaran</surname><given-names>S</given-names></name><name><surname>Lapedes</surname><given-names>AS</given-names></name><name><surname>Learn</surname><given-names>GH</given-names></name><name><surname>Kreider</surname><given-names>EF</given-names></name><name><surname>Li</surname><given-names>Y</given-names></name><name><surname>Shaw</surname><given-names>GM</given-names></name><name><surname>Hahn</surname><given-names>BH</given-names></name><name><surname>Montefiori</surname><given-names>DC</given-names></name><name><surname>Alam</surname><given-names>SM</given-names></name><name><surname>Bonsignori</surname><given-names>M</given-names></name><name><surname>Moody</surname><given-names>MA</given-names></name><name><surname>Liao</surname><given-names>H-X</given-names></name><name><surname>Gao</surname><given-names>F</given-names></name><name><surname>Haynes</surname><given-names>BF</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>Longitudinal antigenic sequences and sites from intra-Host Evolution (LASSIE) identifies immune-selected HIV Variants</article-title><source>Viruses</source><volume>7</volume><fpage>5443</fpage><lpage>5475</lpage><pub-id pub-id-type="doi">10.3390/v7102881</pub-id><pub-id pub-id-type="pmid">26506369</pub-id></element-citation></ref><ref id="bib41"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Illingworth</surname><given-names>CJR</given-names></name><name><surname>Mustonen</surname><given-names>V</given-names></name></person-group><year iso-8601-date="2011">2011</year><article-title>Distinguishing driver and passenger mutations in an evolutionary history categorized by interference</article-title><source>Genetics</source><volume>189</volume><fpage>989</fpage><lpage>1000</lpage><pub-id pub-id-type="doi">10.1534/genetics.111.133975</pub-id><pub-id pub-id-type="pmid">21900272</pub-id></element-citation></ref><ref id="bib42"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Illingworth</surname><given-names>CJR</given-names></name><name><surname>Mustonen</surname><given-names>V</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>A method to infer positive selection from marker dynamics in an asexual population</article-title><source>Bioinformatics</source><volume>28</volume><fpage>831</fpage><lpage>837</lpage><pub-id pub-id-type="doi">10.1093/bioinformatics/btr722</pub-id><pub-id pub-id-type="pmid">22223745</pub-id></element-citation></ref><ref id="bib43"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Jardine</surname><given-names>JG</given-names></name><name><surname>Sok</surname><given-names>D</given-names></name><name><surname>Julien</surname><given-names>J-P</given-names></name><name><surname>Briney</surname><given-names>B</given-names></name><name><surname>Sarkar</surname><given-names>A</given-names></name><name><surname>Liang</surname><given-names>C-H</given-names></name><name><surname>Scherer</surname><given-names>EA</given-names></name><name><surname>Henry Dunand</surname><given-names>CJ</given-names></name><name><surname>Adachi</surname><given-names>Y</given-names></name><name><surname>Diwanji</surname><given-names>D</given-names></name><name><surname>Hsueh</surname><given-names>J</given-names></name><name><surname>Jones</surname><given-names>M</given-names></name><name><surname>Kalyuzhniy</surname><given-names>O</given-names></name><name><surname>Kubitz</surname><given-names>M</given-names></name><name><surname>Spencer</surname><given-names>S</given-names></name><name><surname>Pauthner</surname><given-names>M</given-names></name><name><surname>Saye-Francisco</surname><given-names>KL</given-names></name><name><surname>Sesterhenn</surname><given-names>F</given-names></name><name><surname>Wilson</surname><given-names>PC</given-names></name><name><surname>Galloway</surname><given-names>DM</given-names></name><name><surname>Stanfield</surname><given-names>RL</given-names></name><name><surname>Wilson</surname><given-names>IA</given-names></name><name><surname>Burton</surname><given-names>DR</given-names></name><name><surname>Schief</surname><given-names>WR</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>Minimally Mutated HIV-1 broadly neutralizing antibodies to guide reductionist vaccine design</article-title><source>PLOS Pathogens</source><volume>12</volume><elocation-id>e1005815</elocation-id><pub-id pub-id-type="doi">10.1371/journal.ppat.1005815</pub-id><pub-id pub-id-type="pmid">27560183</pub-id></element-citation></ref><ref id="bib44"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Kimura</surname><given-names>M</given-names></name></person-group><year iso-8601-date="1964">1964</year><article-title>Diffusion models in population genetics</article-title><source>Journal of Applied Probability</source><volume>1</volume><fpage>177</fpage><lpage>232</lpage><pub-id pub-id-type="doi">10.2307/3211856</pub-id></element-citation></ref><ref id="bib45"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Klein</surname><given-names>F</given-names></name><name><surname>Mouquet</surname><given-names>H</given-names></name><name><surname>Dosenovic</surname><given-names>P</given-names></name><name><surname>Scheid</surname><given-names>JF</given-names></name><name><surname>Scharf</surname><given-names>L</given-names></name><name><surname>Nussenzweig</surname><given-names>MC</given-names></name></person-group><year iso-8601-date="2013">2013</year><article-title>Antibodies in HIV-1 vaccine development and therapy</article-title><source>Science</source><volume>341</volume><fpage>1199</fpage><lpage>1204</lpage><pub-id pub-id-type="doi">10.1126/science.1241144</pub-id><pub-id pub-id-type="pmid">24031012</pub-id></element-citation></ref><ref id="bib46"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Kong</surname><given-names>R</given-names></name><name><surname>Duan</surname><given-names>H</given-names></name><name><surname>Sheng</surname><given-names>Z</given-names></name><name><surname>Xu</surname><given-names>K</given-names></name><name><surname>Acharya</surname><given-names>P</given-names></name><name><surname>Chen</surname><given-names>X</given-names></name><name><surname>Cheng</surname><given-names>C</given-names></name><name><surname>Dingens</surname><given-names>AS</given-names></name><name><surname>Gorman</surname><given-names>J</given-names></name><name><surname>Sastry</surname><given-names>M</given-names></name><name><surname>Shen</surname><given-names>C-H</given-names></name><name><surname>Zhang</surname><given-names>B</given-names></name><name><surname>Zhou</surname><given-names>T</given-names></name><name><surname>Chuang</surname><given-names>G-Y</given-names></name><name><surname>Chao</surname><given-names>CW</given-names></name><name><surname>Gu</surname><given-names>Y</given-names></name><name><surname>Jafari</surname><given-names>AJ</given-names></name><name><surname>Louder</surname><given-names>MK</given-names></name><name><surname>O’Dell</surname><given-names>S</given-names></name><name><surname>Rowshan</surname><given-names>AP</given-names></name><name><surname>Viox</surname><given-names>EG</given-names></name><name><surname>Wang</surname><given-names>Y</given-names></name><name><surname>Choi</surname><given-names>CW</given-names></name><name><surname>Corcoran</surname><given-names>MM</given-names></name><name><surname>Corrigan</surname><given-names>AR</given-names></name><name><surname>Dandey</surname><given-names>VP</given-names></name><name><surname>Eng</surname><given-names>ET</given-names></name><name><surname>Geng</surname><given-names>H</given-names></name><name><surname>Foulds</surname><given-names>KE</given-names></name><name><surname>Guo</surname><given-names>Y</given-names></name><name><surname>Kwon</surname><given-names>YD</given-names></name><name><surname>Lin</surname><given-names>B</given-names></name><name><surname>Liu</surname><given-names>K</given-names></name><name><surname>Mason</surname><given-names>RD</given-names></name><name><surname>Nason</surname><given-names>MC</given-names></name><name><surname>Ohr</surname><given-names>TY</given-names></name><name><surname>Ou</surname><given-names>L</given-names></name><name><surname>Rawi</surname><given-names>R</given-names></name><name><surname>Sarfo</surname><given-names>EK</given-names></name><name><surname>Schön</surname><given-names>A</given-names></name><name><surname>Todd</surname><given-names>JP</given-names></name><name><surname>Wang</surname><given-names>S</given-names></name><name><surname>Wei</surname><given-names>H</given-names></name><name><surname>Wu</surname><given-names>W</given-names></name><collab>NISC Comparative Sequencing Program</collab><name><surname>Mullikin</surname><given-names>JC</given-names></name><name><surname>Bailer</surname><given-names>RT</given-names></name><name><surname>Doria-Rose</surname><given-names>NA</given-names></name><name><surname>Karlsson Hedestam</surname><given-names>GB</given-names></name><name><surname>Scorpio</surname><given-names>DG</given-names></name><name><surname>Overbaugh</surname><given-names>J</given-names></name><name><surname>Bloom</surname><given-names>JD</given-names></name><name><surname>Carragher</surname><given-names>B</given-names></name><name><surname>Potter</surname><given-names>CS</given-names></name><name><surname>Shapiro</surname><given-names>L</given-names></name><name><surname>Kwong</surname><given-names>PD</given-names></name><name><surname>Mascola</surname><given-names>JR</given-names></name></person-group><year iso-8601-date="2019">2019</year><article-title>Antibody lineages with vaccine-induced antigen-binding hotspots develop broad HIV neutralization</article-title><source>Cell</source><volume>178</volume><fpage>567</fpage><lpage>584</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2019.06.030</pub-id><pub-id pub-id-type="pmid">31348886</pub-id></element-citation></ref><ref id="bib47"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Kreer</surname><given-names>C</given-names></name><name><surname>Lupo</surname><given-names>C</given-names></name><name><surname>Ercanoglu</surname><given-names>MS</given-names></name><name><surname>Gieselmann</surname><given-names>L</given-names></name><name><surname>Spisak</surname><given-names>N</given-names></name><name><surname>Grossbach</surname><given-names>J</given-names></name><name><surname>Schlotz</surname><given-names>M</given-names></name><name><surname>Schommers</surname><given-names>P</given-names></name><name><surname>Gruell</surname><given-names>H</given-names></name><name><surname>Dold</surname><given-names>L</given-names></name><name><surname>Beyer</surname><given-names>A</given-names></name><name><surname>Nourmohammad</surname><given-names>A</given-names></name><name><surname>Mora</surname><given-names>T</given-names></name><name><surname>Walczak</surname><given-names>AM</given-names></name><name><surname>Klein</surname><given-names>F</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>Probabilities of developing HIV-1 bNAb sequence features in uninfected and chronically infected individuals</article-title><source>Nature Communications</source><volume>14</volume><elocation-id>7137</elocation-id><pub-id pub-id-type="doi">10.1038/s41467-023-42906-y</pub-id><pub-id pub-id-type="pmid">37932288</pub-id></element-citation></ref><ref id="bib48"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Kwong</surname><given-names>PD</given-names></name><name><surname>Mascola</surname><given-names>JR</given-names></name><name><surname>Nabel</surname><given-names>GJ</given-names></name></person-group><year iso-8601-date="2013">2013</year><article-title>Broadly neutralizing antibodies and the search for an HIV-1 vaccine: the end of the beginning</article-title><source>Nature Reviews. Immunology</source><volume>13</volume><fpage>693</fpage><lpage>701</lpage><pub-id pub-id-type="doi">10.1038/nri3516</pub-id><pub-id pub-id-type="pmid">23969737</pub-id></element-citation></ref><ref id="bib49"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Lacerda</surname><given-names>M</given-names></name><name><surname>Seoighe</surname><given-names>C</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Population genetics inference for longitudinally-sampled mutants under strong selection</article-title><source>Genetics</source><volume>198</volume><fpage>1237</fpage><lpage>1250</lpage><pub-id pub-id-type="doi">10.1534/genetics.114.167957</pub-id><pub-id pub-id-type="pmid">25213172</pub-id></element-citation></ref><ref id="bib50"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Landais</surname><given-names>E</given-names></name><name><surname>Moore</surname><given-names>PL</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>Development of broadly neutralizing antibodies in HIV-1 infected elite neutralizers</article-title><source>Retrovirology</source><volume>15</volume><elocation-id>61</elocation-id><pub-id pub-id-type="doi">10.1186/s12977-018-0443-0</pub-id><pub-id pub-id-type="pmid">30185183</pub-id></element-citation></ref><ref id="bib51"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Lässig</surname><given-names>M</given-names></name><name><surname>Mustonen</surname><given-names>V</given-names></name><name><surname>Walczak</surname><given-names>AM</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>Predicting evolution</article-title><source>Nature Ecology &amp; Evolution</source><volume>1</volume><elocation-id>0077</elocation-id><pub-id pub-id-type="doi">10.1038/s41559-017-0077</pub-id></element-citation></ref><ref id="bib52"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Lee</surname><given-names>B</given-names></name><name><surname>Quadeer</surname><given-names>AA</given-names></name><name><surname>Sohail</surname><given-names>MS</given-names></name><name><surname>Finney</surname><given-names>E</given-names></name><name><surname>Ahmed</surname><given-names>SF</given-names></name><name><surname>McKay</surname><given-names>MR</given-names></name><name><surname>Barton</surname><given-names>JP</given-names></name></person-group><year iso-8601-date="2025">2025</year><article-title>Inferring effects of mutations on SARS-CoV-2 transmission from genomic surveillance data</article-title><source>Nature Communications</source><volume>16</volume><elocation-id>441</elocation-id><pub-id pub-id-type="doi">10.1038/s41467-024-55593-0</pub-id></element-citation></ref><ref id="bib53"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Li</surname><given-names>B</given-names></name><name><surname>Gladden</surname><given-names>AD</given-names></name><name><surname>Altfeld</surname><given-names>M</given-names></name><name><surname>Kaldor</surname><given-names>JM</given-names></name><name><surname>Cooper</surname><given-names>DA</given-names></name><name><surname>Kelleher</surname><given-names>AD</given-names></name><name><surname>Allen</surname><given-names>TM</given-names></name></person-group><year iso-8601-date="2007">2007</year><article-title>Rapid reversion of sequence polymorphisms dominates early human immunodeficiency virus type 1 Evolution</article-title><source>Journal of Virology</source><volume>81</volume><fpage>193</fpage><lpage>201</lpage><pub-id pub-id-type="doi">10.1128/JVI.01231-06</pub-id></element-citation></ref><ref id="bib54"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Li</surname><given-names>H</given-names></name><name><surname>Wang</surname><given-names>S</given-names></name><name><surname>Kong</surname><given-names>R</given-names></name><name><surname>Ding</surname><given-names>W</given-names></name><name><surname>Lee</surname><given-names>F-H</given-names></name><name><surname>Parker</surname><given-names>Z</given-names></name><name><surname>Kim</surname><given-names>E</given-names></name><name><surname>Learn</surname><given-names>GH</given-names></name><name><surname>Hahn</surname><given-names>P</given-names></name><name><surname>Policicchio</surname><given-names>B</given-names></name><name><surname>Brocca-Cofano</surname><given-names>E</given-names></name><name><surname>Deleage</surname><given-names>C</given-names></name><name><surname>Hao</surname><given-names>X</given-names></name><name><surname>Chuang</surname><given-names>G-Y</given-names></name><name><surname>Gorman</surname><given-names>J</given-names></name><name><surname>Gardner</surname><given-names>M</given-names></name><name><surname>Lewis</surname><given-names>MG</given-names></name><name><surname>Hatziioannou</surname><given-names>T</given-names></name><name><surname>Santra</surname><given-names>S</given-names></name><name><surname>Apetrei</surname><given-names>C</given-names></name><name><surname>Pandrea</surname><given-names>I</given-names></name><name><surname>Alam</surname><given-names>SM</given-names></name><name><surname>Liao</surname><given-names>H-X</given-names></name><name><surname>Shen</surname><given-names>X</given-names></name><name><surname>Tomaras</surname><given-names>GD</given-names></name><name><surname>Farzan</surname><given-names>M</given-names></name><name><surname>Chertova</surname><given-names>E</given-names></name><name><surname>Keele</surname><given-names>BF</given-names></name><name><surname>Estes</surname><given-names>JD</given-names></name><name><surname>Lifson</surname><given-names>JD</given-names></name><name><surname>Doms</surname><given-names>RW</given-names></name><name><surname>Montefiori</surname><given-names>DC</given-names></name><name><surname>Haynes</surname><given-names>BF</given-names></name><name><surname>Sodroski</surname><given-names>JG</given-names></name><name><surname>Kwong</surname><given-names>PD</given-names></name><name><surname>Hahn</surname><given-names>BH</given-names></name><name><surname>Shaw</surname><given-names>GM</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>Envelope residue 375 substitutions in simian-human immunodeficiency viruses enhance CD4 binding and replication in rhesus macaques</article-title><source>PNAS</source><volume>113</volume><fpage>E3413</fpage><lpage>E3422</lpage><pub-id pub-id-type="doi">10.1073/pnas.1606636113</pub-id><pub-id pub-id-type="pmid">27247400</pub-id></element-citation></ref><ref id="bib55"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Li</surname><given-names>Y</given-names></name><name><surname>Barton</surname><given-names>JP</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>Estimating linkage disequilibrium and selection from allele frequency trajectories</article-title><source>GENETICS</source><volume>223</volume><elocation-id>iyac189</elocation-id><pub-id pub-id-type="doi">10.1093/genetics/iyac189</pub-id></element-citation></ref><ref id="bib56"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Li</surname><given-names>Y</given-names></name><name><surname>Barton</surname><given-names>JP</given-names></name></person-group><year iso-8601-date="2024">2024</year><article-title>Correlated allele frequency changes reveal clonal structure and selection in temporal genetic data</article-title><source>Molecular Biology and Evolution</source><volume>41</volume><elocation-id>msae060</elocation-id><pub-id pub-id-type="doi">10.1093/molbev/msae060</pub-id><pub-id pub-id-type="pmid">38507665</pub-id></element-citation></ref><ref id="bib57"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Liao</surname><given-names>H-X</given-names></name><name><surname>Lynch</surname><given-names>R</given-names></name><name><surname>Zhou</surname><given-names>T</given-names></name><name><surname>Gao</surname><given-names>F</given-names></name><name><surname>Alam</surname><given-names>SM</given-names></name><name><surname>Boyd</surname><given-names>SD</given-names></name><name><surname>Fire</surname><given-names>AZ</given-names></name><name><surname>Roskin</surname><given-names>KM</given-names></name><name><surname>Schramm</surname><given-names>CA</given-names></name><name><surname>Zhang</surname><given-names>Z</given-names></name><name><surname>Zhu</surname><given-names>J</given-names></name><name><surname>Shapiro</surname><given-names>L</given-names></name><collab>NISC Comparative Sequencing Program</collab><name><surname>Mullikin</surname><given-names>JC</given-names></name><name><surname>Gnanakaran</surname><given-names>S</given-names></name><name><surname>Hraber</surname><given-names>P</given-names></name><name><surname>Wiehe</surname><given-names>K</given-names></name><name><surname>Kelsoe</surname><given-names>G</given-names></name><name><surname>Yang</surname><given-names>G</given-names></name><name><surname>Xia</surname><given-names>S-M</given-names></name><name><surname>Montefiori</surname><given-names>DC</given-names></name><name><surname>Parks</surname><given-names>R</given-names></name><name><surname>Lloyd</surname><given-names>KE</given-names></name><name><surname>Scearce</surname><given-names>RM</given-names></name><name><surname>Soderberg</surname><given-names>KA</given-names></name><name><surname>Cohen</surname><given-names>M</given-names></name><name><surname>Kamanga</surname><given-names>G</given-names></name><name><surname>Louder</surname><given-names>MK</given-names></name><name><surname>Tran</surname><given-names>LM</given-names></name><name><surname>Chen</surname><given-names>Y</given-names></name><name><surname>Cai</surname><given-names>F</given-names></name><name><surname>Chen</surname><given-names>S</given-names></name><name><surname>Moquin</surname><given-names>S</given-names></name><name><surname>Du</surname><given-names>X</given-names></name><name><surname>Joyce</surname><given-names>MG</given-names></name><name><surname>Srivatsan</surname><given-names>S</given-names></name><name><surname>Zhang</surname><given-names>B</given-names></name><name><surname>Zheng</surname><given-names>A</given-names></name><name><surname>Shaw</surname><given-names>GM</given-names></name><name><surname>Hahn</surname><given-names>BH</given-names></name><name><surname>Kepler</surname><given-names>TB</given-names></name><name><surname>Korber</surname><given-names>BTM</given-names></name><name><surname>Kwong</surname><given-names>PD</given-names></name><name><surname>Mascola</surname><given-names>JR</given-names></name><name><surname>Haynes</surname><given-names>BF</given-names></name></person-group><year iso-8601-date="2013">2013</year><article-title>Co-evolution of a broadly neutralizing HIV-1 antibody and founder virus</article-title><source>Nature</source><volume>496</volume><fpage>469</fpage><lpage>476</lpage><pub-id pub-id-type="doi">10.1038/nature12053</pub-id><pub-id pub-id-type="pmid">23552890</pub-id></element-citation></ref><ref id="bib58"><element-citation publication-type="web"><person-group person-group-type="author"><collab>Los Alamos National Laboratory</collab></person-group><year iso-8601-date="2023">2023a</year><article-title>Hiv sequence database</article-title><ext-link ext-link-type="uri" xlink:href="https://www.hiv.lanl.gov">https://www.hiv.lanl.gov</ext-link><date-in-citation iso-8601-date="2023-03-20">March 20, 2023</date-in-citation></element-citation></ref><ref id="bib59"><element-citation publication-type="web"><person-group person-group-type="author"><collab>Los Alamos National Laboratory</collab></person-group><year iso-8601-date="2023">2023b</year><article-title>Hivalign: Hiv sequence alignment tool</article-title><ext-link ext-link-type="uri" xlink:href="https://www.hiv.lanl.gov/content/sequence/VIRALIGN/viralign.html">https://www.hiv.lanl.gov/content/sequence/VIRALIGN/viralign.html</ext-link><date-in-citation iso-8601-date="2016-02-24">February 24, 2016</date-in-citation></element-citation></ref><ref id="bib60"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Louie</surname><given-names>RHY</given-names></name><name><surname>Kaczorowski</surname><given-names>KJ</given-names></name><name><surname>Barton</surname><given-names>JP</given-names></name><name><surname>Chakraborty</surname><given-names>AK</given-names></name><name><surname>McKay</surname><given-names>MR</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>Fitness landscape of the human immunodeficiency virus envelope protein that is targeted by antibodies</article-title><source>PNAS</source><volume>115</volume><fpage>E564</fpage><lpage>E573</lpage><pub-id pub-id-type="doi">10.1073/pnas.1717765115</pub-id><pub-id pub-id-type="pmid">29311326</pub-id></element-citation></ref><ref id="bib61"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Łuksza</surname><given-names>M</given-names></name><name><surname>Lässig</surname><given-names>M</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>A predictive fitness model for influenza</article-title><source>Nature</source><volume>507</volume><fpage>57</fpage><lpage>61</lpage><pub-id pub-id-type="doi">10.1038/nature13087</pub-id></element-citation></ref><ref id="bib62"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Malaspinas</surname><given-names>AS</given-names></name><name><surname>Malaspinas</surname><given-names>O</given-names></name><name><surname>Evans</surname><given-names>SN</given-names></name><name><surname>Slatkin</surname><given-names>M</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>Estimating allele age and selection coefficient from time-serial data</article-title><source>Genetics</source><volume>192</volume><fpage>599</fpage><lpage>607</lpage><pub-id pub-id-type="doi">10.1534/genetics.112.140939</pub-id><pub-id pub-id-type="pmid">22851647</pub-id></element-citation></ref><ref id="bib63"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Mann</surname><given-names>JK</given-names></name><name><surname>Barton</surname><given-names>JP</given-names></name><name><surname>Ferguson</surname><given-names>AL</given-names></name><name><surname>Omarjee</surname><given-names>S</given-names></name><name><surname>Walker</surname><given-names>BD</given-names></name><name><surname>Chakraborty</surname><given-names>A</given-names></name><name><surname>Ndung’u</surname><given-names>T</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>The fitness landscape of HIV-1 gag: advanced modeling approaches and validation of model predictions by in vitro testing</article-title><source>PLOS Computational Biology</source><volume>10</volume><elocation-id>e1003776</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pcbi.1003776</pub-id><pub-id pub-id-type="pmid">25102049</pub-id></element-citation></ref><ref id="bib64"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Mathieson</surname><given-names>I</given-names></name><name><surname>McVean</surname><given-names>G</given-names></name></person-group><year iso-8601-date="2013">2013</year><article-title>Estimating selection coefficients in spatially structured populations from time series data of allele frequencies</article-title><source>Genetics</source><volume>193</volume><fpage>973</fpage><lpage>984</lpage><pub-id pub-id-type="doi">10.1534/genetics.112.147611</pub-id><pub-id pub-id-type="pmid">23307902</pub-id></element-citation></ref><ref id="bib65"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Mathieson</surname><given-names>I</given-names></name><name><surname>Terhorst</surname><given-names>J</given-names></name></person-group><year iso-8601-date="2022">2022</year><article-title>Direct detection of natural selection in Bronze Age Britain</article-title><source>Genome Research</source><volume>32</volume><fpage>2057</fpage><lpage>2067</lpage><pub-id pub-id-type="doi">10.1101/gr.276862.122</pub-id><pub-id pub-id-type="pmid">36316157</pub-id></element-citation></ref><ref id="bib66"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>McCurley</surname><given-names>NP</given-names></name><name><surname>Domi</surname><given-names>A</given-names></name><name><surname>Basu</surname><given-names>R</given-names></name><name><surname>Saunders</surname><given-names>KO</given-names></name><name><surname>LaBranche</surname><given-names>CC</given-names></name><name><surname>Montefiori</surname><given-names>DC</given-names></name><name><surname>Haynes</surname><given-names>BF</given-names></name><name><surname>Robinson</surname><given-names>HL</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>HIV transmitted/founder vaccines elicit autologous tier 2 neutralizing antibodies for the CD4 binding site</article-title><source>PLOS ONE</source><volume>12</volume><elocation-id>e0177863</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pone.0177863</pub-id><pub-id pub-id-type="pmid">29020058</pub-id></element-citation></ref><ref id="bib67"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Moore</surname><given-names>PL</given-names></name><name><surname>Williamson</surname><given-names>C</given-names></name><name><surname>Morris</surname><given-names>L</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>Virological features associated with the development of broadly neutralizing antibodies to HIV-1</article-title><source>Trends in Microbiology</source><volume>23</volume><fpage>204</fpage><lpage>211</lpage><pub-id pub-id-type="doi">10.1016/j.tim.2014.12.007</pub-id><pub-id pub-id-type="pmid">25572881</pub-id></element-citation></ref><ref id="bib68"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Morcos</surname><given-names>F</given-names></name><name><surname>Pagnani</surname><given-names>A</given-names></name><name><surname>Lunt</surname><given-names>B</given-names></name><name><surname>Bertolino</surname><given-names>A</given-names></name><name><surname>Marks</surname><given-names>DS</given-names></name><name><surname>Sander</surname><given-names>C</given-names></name><name><surname>Zecchina</surname><given-names>R</given-names></name><name><surname>Onuchic</surname><given-names>JN</given-names></name><name><surname>Hwa</surname><given-names>T</given-names></name><name><surname>Weigt</surname><given-names>M</given-names></name></person-group><year iso-8601-date="2011">2011</year><article-title>Direct-coupling analysis of residue coevolution captures native contacts across many protein families</article-title><source>PNAS</source><volume>108</volume><fpage>E1293</fpage><lpage>E1301</lpage><pub-id pub-id-type="doi">10.1073/pnas.1111471108</pub-id></element-citation></ref><ref id="bib69"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Neher</surname><given-names>RA</given-names></name><name><surname>Leitner</surname><given-names>T</given-names></name></person-group><year iso-8601-date="2010">2010</year><article-title>Recombination rate and selection strength in HIV intra-patient evolution</article-title><source>PLOS Computational Biology</source><volume>6</volume><elocation-id>e1000660</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pcbi.1000660</pub-id><pub-id pub-id-type="pmid">20126527</pub-id></element-citation></ref><ref id="bib70"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Nourmohammad</surname><given-names>A</given-names></name><name><surname>Otwinowski</surname><given-names>J</given-names></name><name><surname>Plotkin</surname><given-names>JB</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>Host-pathogen coevolution and the emergence of broadly neutralizing antibodies in chronic infections</article-title><source>PLOS Genetics</source><volume>12</volume><elocation-id>e1006171</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pgen.1006171</pub-id><pub-id pub-id-type="pmid">27442127</pub-id></element-citation></ref><ref id="bib71"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Pancera</surname><given-names>M</given-names></name><name><surname>McLellan</surname><given-names>JS</given-names></name><name><surname>Wu</surname><given-names>X</given-names></name><name><surname>Zhu</surname><given-names>J</given-names></name><name><surname>Changela</surname><given-names>A</given-names></name><name><surname>Schmidt</surname><given-names>SD</given-names></name><name><surname>Yang</surname><given-names>Y</given-names></name><name><surname>Zhou</surname><given-names>T</given-names></name><name><surname>Phogat</surname><given-names>S</given-names></name><name><surname>Mascola</surname><given-names>JR</given-names></name><name><surname>Kwong</surname><given-names>PD</given-names></name></person-group><year iso-8601-date="2010">2010</year><article-title>Crystal Structure of PG16 and chimeric dissection with somatically related pg9: structure-function analysis of two quaternary-specific antibodies that effectively neutralize HIV-1</article-title><source>Journal of Virology</source><volume>84</volume><fpage>8098</fpage><lpage>8110</lpage><pub-id pub-id-type="doi">10.1128/JVI.00966-10</pub-id></element-citation></ref><ref id="bib72"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Pandit</surname><given-names>A</given-names></name><name><surname>de Boer</surname><given-names>RJ</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Reliable reconstruction of HIV-1 whole genome haplotypes reveals clonal interference and genetic hitchhiking among immune escape variants</article-title><source>Retrovirology</source><volume>11</volume><elocation-id>56</elocation-id><pub-id pub-id-type="doi">10.1186/1742-4690-11-56</pub-id></element-citation></ref><ref id="bib73"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Paris</surname><given-names>C</given-names></name><name><surname>Servin</surname><given-names>B</given-names></name><name><surname>Boitard</surname><given-names>S</given-names></name></person-group><year iso-8601-date="2019">2019</year><article-title>Inference of selection from genetic time series using various parametric approximations to the wright-fisher model</article-title><source>G3: Genes, Genomes, Genetics</source><volume>9</volume><fpage>4073</fpage><lpage>4086</lpage><pub-id pub-id-type="doi">10.1534/g3.119.400778</pub-id></element-citation></ref><ref id="bib74"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Rizzato</surname><given-names>F</given-names></name><name><surname>Coucke</surname><given-names>A</given-names></name><name><surname>de Leonardis</surname><given-names>E</given-names></name><name><surname>Barton</surname><given-names>JP</given-names></name><name><surname>Tubiana</surname><given-names>J</given-names></name><name><surname>Monasson</surname><given-names>R</given-names></name><name><surname>Cocco</surname><given-names>S</given-names></name></person-group><year iso-8601-date="2020">2020</year><article-title>Inference of compressed Potts graphical models</article-title><source>Physical Review E</source><volume>101</volume><elocation-id>012309</elocation-id><pub-id pub-id-type="doi">10.1103/PhysRevE.101.012309</pub-id></element-citation></ref><ref id="bib75"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Roark</surname><given-names>RS</given-names></name><name><surname>Li</surname><given-names>H</given-names></name><name><surname>Williams</surname><given-names>WB</given-names></name><name><surname>Chug</surname><given-names>H</given-names></name><name><surname>Mason</surname><given-names>RD</given-names></name><name><surname>Gorman</surname><given-names>J</given-names></name><name><surname>Wang</surname><given-names>S</given-names></name><name><surname>Lee</surname><given-names>F-H</given-names></name><name><surname>Rando</surname><given-names>J</given-names></name><name><surname>Bonsignori</surname><given-names>M</given-names></name><name><surname>Hwang</surname><given-names>K-K</given-names></name><name><surname>Saunders</surname><given-names>KO</given-names></name><name><surname>Wiehe</surname><given-names>K</given-names></name><name><surname>Moody</surname><given-names>MA</given-names></name><name><surname>Hraber</surname><given-names>PT</given-names></name><name><surname>Wagh</surname><given-names>K</given-names></name><name><surname>Giorgi</surname><given-names>EE</given-names></name><name><surname>Russell</surname><given-names>RM</given-names></name><name><surname>Bibollet-Ruche</surname><given-names>F</given-names></name><name><surname>Liu</surname><given-names>W</given-names></name><name><surname>Connell</surname><given-names>J</given-names></name><name><surname>Smith</surname><given-names>AG</given-names></name><name><surname>DeVoto</surname><given-names>J</given-names></name><name><surname>Murphy</surname><given-names>AI</given-names></name><name><surname>Smith</surname><given-names>J</given-names></name><name><surname>Ding</surname><given-names>W</given-names></name><name><surname>Zhao</surname><given-names>C</given-names></name><name><surname>Chohan</surname><given-names>N</given-names></name><name><surname>Okumura</surname><given-names>M</given-names></name><name><surname>Rosario</surname><given-names>C</given-names></name><name><surname>Ding</surname><given-names>Y</given-names></name><name><surname>Lindemuth</surname><given-names>E</given-names></name><name><surname>Bauer</surname><given-names>AM</given-names></name><name><surname>Bar</surname><given-names>KJ</given-names></name><name><surname>Ambrozak</surname><given-names>D</given-names></name><name><surname>Chao</surname><given-names>CW</given-names></name><name><surname>Chuang</surname><given-names>G-Y</given-names></name><name><surname>Geng</surname><given-names>H</given-names></name><name><surname>Lin</surname><given-names>BC</given-names></name><name><surname>Louder</surname><given-names>MK</given-names></name><name><surname>Nguyen</surname><given-names>R</given-names></name><name><surname>Zhang</surname><given-names>B</given-names></name><name><surname>Lewis</surname><given-names>MG</given-names></name><name><surname>Raymond</surname><given-names>DD</given-names></name><name><surname>Doria-Rose</surname><given-names>NA</given-names></name><name><surname>Schramm</surname><given-names>CA</given-names></name><name><surname>Douek</surname><given-names>DC</given-names></name><name><surname>Roederer</surname><given-names>M</given-names></name><name><surname>Kepler</surname><given-names>TB</given-names></name><name><surname>Kelsoe</surname><given-names>G</given-names></name><name><surname>Mascola</surname><given-names>JR</given-names></name><name><surname>Kwong</surname><given-names>PD</given-names></name><name><surname>Korber</surname><given-names>BT</given-names></name><name><surname>Harrison</surname><given-names>SC</given-names></name><name><surname>Haynes</surname><given-names>BF</given-names></name><name><surname>Hahn</surname><given-names>BH</given-names></name><name><surname>Shaw</surname><given-names>GM</given-names></name></person-group><year iso-8601-date="2021">2021</year><article-title>Recapitulation of HIV-1 Env-antibody coevolution in macaques leading to neutralization breadth</article-title><source>Science</source><volume>371</volume><elocation-id>eabd2638</elocation-id><pub-id pub-id-type="doi">10.1126/science.abd2638</pub-id><pub-id pub-id-type="pmid">33214287</pub-id></element-citation></ref><ref id="bib76"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Romero</surname><given-names>EV</given-names></name><name><surname>Feder</surname><given-names>AF</given-names></name></person-group><year iso-8601-date="2024">2024</year><article-title>Elevated HIV viral load is associated with higher recombination rate in vivo</article-title><source>Molecular Biology and Evolution</source><volume>41</volume><elocation-id>msad260</elocation-id><pub-id pub-id-type="doi">10.1093/molbev/msad260</pub-id><pub-id pub-id-type="pmid">38197289</pub-id></element-citation></ref><ref id="bib77"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Rouzine</surname><given-names>IM</given-names></name><name><surname>Weinberger</surname><given-names>LS</given-names></name></person-group><year iso-8601-date="2013">2013</year><article-title>The quantitative theory of within-host viral evolution</article-title><source>Journal of Statistical Mechanics</source><volume>2013</volume><elocation-id>01009</elocation-id><pub-id pub-id-type="doi">10.1088/1742-5468/2013/01/P01009</pub-id></element-citation></ref><ref id="bib78"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ruxton</surname><given-names>GD</given-names></name><name><surname>Neuhäuser</surname><given-names>M</given-names></name></person-group><year iso-8601-date="2010">2010</year><article-title>Good practice in testing for an association in contingency tables</article-title><source>Behavioral Ecology and Sociobiology</source><volume>64</volume><fpage>1505</fpage><lpage>1513</lpage><pub-id pub-id-type="doi">10.1007/s00265-010-1014-0</pub-id></element-citation></ref><ref id="bib79"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Saunders</surname><given-names>KO</given-names></name><name><surname>Edwards</surname><given-names>RJ</given-names></name><name><surname>Tilahun</surname><given-names>K</given-names></name><name><surname>Manne</surname><given-names>K</given-names></name><name><surname>Lu</surname><given-names>X</given-names></name><name><surname>Cain</surname><given-names>DW</given-names></name><name><surname>Wiehe</surname><given-names>K</given-names></name><name><surname>Williams</surname><given-names>WB</given-names></name><name><surname>Mansouri</surname><given-names>K</given-names></name><name><surname>Hernandez</surname><given-names>GE</given-names></name><name><surname>Sutherland</surname><given-names>L</given-names></name><name><surname>Scearce</surname><given-names>R</given-names></name><name><surname>Parks</surname><given-names>R</given-names></name><name><surname>Barr</surname><given-names>M</given-names></name><name><surname>DeMarco</surname><given-names>T</given-names></name><name><surname>Eater</surname><given-names>CM</given-names></name><name><surname>Eaton</surname><given-names>A</given-names></name><name><surname>Morton</surname><given-names>G</given-names></name><name><surname>Mildenberg</surname><given-names>B</given-names></name><name><surname>Wang</surname><given-names>Y</given-names></name><name><surname>Rountree</surname><given-names>RW</given-names></name><name><surname>Tomai</surname><given-names>MA</given-names></name><name><surname>Fox</surname><given-names>CB</given-names></name><name><surname>Moody</surname><given-names>MA</given-names></name><name><surname>Alam</surname><given-names>SM</given-names></name><name><surname>Santra</surname><given-names>S</given-names></name><name><surname>Lewis</surname><given-names>MG</given-names></name><name><surname>Denny</surname><given-names>TN</given-names></name><name><surname>Shaw</surname><given-names>GM</given-names></name><name><surname>Montefiori</surname><given-names>DC</given-names></name><name><surname>Acharya</surname><given-names>P</given-names></name><name><surname>Haynes</surname><given-names>BF</given-names></name></person-group><year iso-8601-date="2022">2022</year><article-title>Stabilized HIV-1 envelope immunization induces neutralizing antibodies to the CD4bs and protects macaques against mucosal infection</article-title><source>Science Translational Medicine</source><volume>14</volume><elocation-id>eabo5598</elocation-id><pub-id pub-id-type="doi">10.1126/scitranslmed.abo5598</pub-id><pub-id pub-id-type="pmid">36070369</pub-id></element-citation></ref><ref id="bib80"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Schraiber</surname><given-names>JG</given-names></name><name><surname>Evans</surname><given-names>SN</given-names></name><name><surname>Slatkin</surname><given-names>M</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>Bayesian inference of natural selection from allele frequency time series</article-title><source>Genetics</source><volume>203</volume><fpage>493</fpage><lpage>511</lpage><pub-id pub-id-type="doi">10.1534/genetics.116.187278</pub-id><pub-id pub-id-type="pmid">27010022</pub-id></element-citation></ref><ref id="bib81"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Shaffer</surname><given-names>JS</given-names></name><name><surname>Moore</surname><given-names>PL</given-names></name><name><surname>Kardar</surname><given-names>M</given-names></name><name><surname>Chakraborty</surname><given-names>AK</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>Optimal immunization cocktails can promote induction of broadly neutralizing Abs against highly mutable pathogens</article-title><source>PNAS</source><volume>113</volume><fpage>E7039</fpage><lpage>E7048</lpage><pub-id pub-id-type="doi">10.1073/pnas.1614940113</pub-id></element-citation></ref><ref id="bib82"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Shimagaki</surname><given-names>K</given-names></name><name><surname>Barton</surname><given-names>JP</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>Bézier interpolation improves the inference of dynamical models from data</article-title><source>Physical Review. E</source><volume>107</volume><elocation-id>024116</elocation-id><pub-id pub-id-type="doi">10.1103/PhysRevE.107.024116</pub-id><pub-id pub-id-type="pmid">36932614</pub-id></element-citation></ref><ref id="bib83"><element-citation publication-type="software"><person-group person-group-type="author"><name><surname>Shimagaki</surname><given-names>KS</given-names></name><name><surname>Barton</surname><given-names>JP</given-names></name></person-group><year iso-8601-date="2025">2025a</year><data-title>Paper-HIV-coevolution</data-title><version designator="swh:1:rev:02c8ee1b5251f3c9845c8b7f23f06b24d849af45">swh:1:rev:02c8ee1b5251f3c9845c8b7f23f06b24d849af45</version><source>Software Heritage</source><ext-link ext-link-type="uri" xlink:href="https://archive.softwareheritage.org/swh:1:dir:52a20181fdba7e0d804be70d40a8fe266a95ee02;origin=https://github.com/bartonlab/paper-HIV-coevolution;visit=swh:1:snp:5256292424b78685de10cb36d8c31a864c9ac8ae;anchor=swh:1:rev:02c8ee1b5251f3c9845c8b7f23f06b24d849af45">https://archive.softwareheritage.org/swh:1:dir:52a20181fdba7e0d804be70d40a8fe266a95ee02;origin=https://github.com/bartonlab/paper-HIV-coevolution;visit=swh:1:snp:5256292424b78685de10cb36d8c31a864c9ac8ae;anchor=swh:1:rev:02c8ee1b5251f3c9845c8b7f23f06b24d849af45</ext-link></element-citation></ref><ref id="bib84"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Shimagaki</surname><given-names>KS</given-names></name><name><surname>Barton</surname><given-names>JP</given-names></name></person-group><year iso-8601-date="2025">2025b</year><article-title>Efficient epistasis inference via higher-order covariance matrix factorization</article-title><source>Genetics</source><volume>230</volume><elocation-id>iyaf118</elocation-id><pub-id pub-id-type="doi">10.1093/genetics/iyaf118</pub-id><pub-id pub-id-type="pmid">40540490</pub-id></element-citation></ref><ref id="bib85"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Sohail</surname><given-names>MS</given-names></name><name><surname>Louie</surname><given-names>RHY</given-names></name><name><surname>McKay</surname><given-names>MR</given-names></name><name><surname>Barton</surname><given-names>JP</given-names></name></person-group><year iso-8601-date="2021">2021</year><article-title>MPL resolves genetic linkage in fitness inference from complex evolutionary histories</article-title><source>Nature Biotechnology</source><volume>39</volume><fpage>472</fpage><lpage>479</lpage><pub-id pub-id-type="doi">10.1038/s41587-020-0737-3</pub-id><pub-id pub-id-type="pmid">33257862</pub-id></element-citation></ref><ref id="bib86"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Sohail</surname><given-names>MS</given-names></name><name><surname>Louie</surname><given-names>RHY</given-names></name><name><surname>Hong</surname><given-names>Z</given-names></name><name><surname>Barton</surname><given-names>JP</given-names></name><name><surname>McKay</surname><given-names>MR</given-names></name></person-group><year iso-8601-date="2022">2022</year><article-title>Inferring epistasis from genetic time-series data</article-title><source>Molecular Biology and Evolution</source><volume>39</volume><elocation-id>msac199</elocation-id><pub-id pub-id-type="doi">10.1093/molbev/msac199</pub-id><pub-id pub-id-type="pmid">36130322</pub-id></element-citation></ref><ref id="bib87"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Sok</surname><given-names>D</given-names></name><name><surname>Burton</surname><given-names>DR</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>Recent progress in broadly neutralizing antibodies to HIV</article-title><source>Nature Immunology</source><volume>19</volume><fpage>1179</fpage><lpage>1188</lpage><pub-id pub-id-type="doi">10.1038/s41590-018-0235-7</pub-id><pub-id pub-id-type="pmid">30333615</pub-id></element-citation></ref><ref id="bib88"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Sprenger</surname><given-names>KG</given-names></name><name><surname>Louveau</surname><given-names>JE</given-names></name><name><surname>Murugan</surname><given-names>PM</given-names></name><name><surname>Chakraborty</surname><given-names>AK</given-names></name></person-group><year iso-8601-date="2020">2020</year><article-title>Optimizing immunization protocols to elicit broadly neutralizing antibodies</article-title><source>PNAS</source><volume>117</volume><fpage>20077</fpage><lpage>20087</lpage><pub-id pub-id-type="doi">10.1073/pnas.1919329117</pub-id></element-citation></ref><ref id="bib89"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Steinrücken</surname><given-names>M</given-names></name><name><surname>Bhaskar</surname><given-names>A</given-names></name><name><surname>Song</surname><given-names>YS</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>A novel spectral method for inferring general diploid selection from time series genetic data</article-title><source>The Annals of Applied Statistics</source><volume>8</volume><elocation-id>2203</elocation-id><pub-id pub-id-type="doi">10.1214/14-AOAS764</pub-id></element-citation></ref><ref id="bib90"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Tataru</surname><given-names>P</given-names></name><name><surname>Simonsen</surname><given-names>M</given-names></name><name><surname>Bataillon</surname><given-names>T</given-names></name><name><surname>Hobolth</surname><given-names>A</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>Statistical inference in the wright-fisher model using allele frequency data</article-title><source>Systematic Biology</source><volume>66</volume><fpage>e30</fpage><lpage>e46</lpage><pub-id pub-id-type="doi">10.1093/sysbio/syw056</pub-id><pub-id pub-id-type="pmid">28173553</pub-id></element-citation></ref><ref id="bib91"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Terhorst</surname><given-names>J</given-names></name><name><surname>Schlötterer</surname><given-names>C</given-names></name><name><surname>Song</surname><given-names>YS</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>Multi-locus analysis of genomic time series data from experimental evolution</article-title><source>PLOS Genetics</source><volume>11</volume><elocation-id>e1005069</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pgen.1005069</pub-id><pub-id pub-id-type="pmid">25849855</pub-id></element-citation></ref><ref id="bib92"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Tomaras</surname><given-names>GD</given-names></name><name><surname>Yates</surname><given-names>NL</given-names></name><name><surname>Liu</surname><given-names>P</given-names></name><name><surname>Qin</surname><given-names>L</given-names></name><name><surname>Fouda</surname><given-names>GG</given-names></name><name><surname>Chavez</surname><given-names>LL</given-names></name><name><surname>Decamp</surname><given-names>AC</given-names></name><name><surname>Parks</surname><given-names>RJ</given-names></name><name><surname>Ashley</surname><given-names>VC</given-names></name><name><surname>Lucas</surname><given-names>JT</given-names></name><name><surname>Cohen</surname><given-names>M</given-names></name><name><surname>Eron</surname><given-names>J</given-names></name><name><surname>Hicks</surname><given-names>CB</given-names></name><name><surname>Liao</surname><given-names>H-X</given-names></name><name><surname>Self</surname><given-names>SG</given-names></name><name><surname>Landucci</surname><given-names>G</given-names></name><name><surname>Forthal</surname><given-names>DN</given-names></name><name><surname>Weinhold</surname><given-names>KJ</given-names></name><name><surname>Keele</surname><given-names>BF</given-names></name><name><surname>Hahn</surname><given-names>BH</given-names></name><name><surname>Greenberg</surname><given-names>ML</given-names></name><name><surname>Morris</surname><given-names>L</given-names></name><name><surname>Karim</surname><given-names>SSA</given-names></name><name><surname>Blattner</surname><given-names>WA</given-names></name><name><surname>Montefiori</surname><given-names>DC</given-names></name><name><surname>Shaw</surname><given-names>GM</given-names></name><name><surname>Perelson</surname><given-names>AS</given-names></name><name><surname>Haynes</surname><given-names>BF</given-names></name></person-group><year iso-8601-date="2008">2008</year><article-title>Initial B-cell responses to transmitted human immunodeficiency virus type 1: virion-binding immunoglobulin M (IgM) and IgG antibodies followed by plasma anti-gp41 antibodies with ineffective control of initial viremia</article-title><source>Journal of Virology</source><volume>82</volume><fpage>12449</fpage><lpage>12463</lpage><pub-id pub-id-type="doi">10.1128/JVI.01708-08</pub-id></element-citation></ref><ref id="bib93"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wang</surname><given-names>S</given-names></name><name><surname>Mata-Fink</surname><given-names>J</given-names></name><name><surname>Kriegsman</surname><given-names>B</given-names></name><name><surname>Hanson</surname><given-names>M</given-names></name><name><surname>Irvine</surname><given-names>DJ</given-names></name><name><surname>Eisen</surname><given-names>HN</given-names></name><name><surname>Burton</surname><given-names>DR</given-names></name><name><surname>Wittrup</surname><given-names>KD</given-names></name><name><surname>Kardar</surname><given-names>M</given-names></name><name><surname>Chakraborty</surname><given-names>AK</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>Manipulating the selection forces during affinity maturation to generate cross-reactive HIV antibodies</article-title><source>Cell</source><volume>160</volume><fpage>785</fpage><lpage>797</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2015.01.027</pub-id></element-citation></ref><ref id="bib94"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wei</surname><given-names>X</given-names></name><name><surname>Decker</surname><given-names>JM</given-names></name><name><surname>Wang</surname><given-names>S</given-names></name><name><surname>Hui</surname><given-names>H</given-names></name><name><surname>Kappes</surname><given-names>JC</given-names></name><name><surname>Wu</surname><given-names>X</given-names></name><name><surname>Salazar-Gonzalez</surname><given-names>JF</given-names></name><name><surname>Salazar</surname><given-names>MG</given-names></name><name><surname>Kilby</surname><given-names>JM</given-names></name><name><surname>Saag</surname><given-names>MS</given-names></name><name><surname>Komarova</surname><given-names>NL</given-names></name><name><surname>Nowak</surname><given-names>MA</given-names></name><name><surname>Hahn</surname><given-names>BH</given-names></name><name><surname>Kwong</surname><given-names>PD</given-names></name><name><surname>Shaw</surname><given-names>GM</given-names></name></person-group><year iso-8601-date="2003">2003</year><article-title>Antibody neutralization and escape by HIV-1</article-title><source>Nature</source><volume>422</volume><fpage>307</fpage><lpage>312</lpage><pub-id pub-id-type="doi">10.1038/nature01470</pub-id></element-citation></ref><ref id="bib95"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Weigt</surname><given-names>M</given-names></name><name><surname>White</surname><given-names>RA</given-names></name><name><surname>Szurmant</surname><given-names>H</given-names></name><name><surname>Hoch</surname><given-names>JA</given-names></name><name><surname>Hwa</surname><given-names>T</given-names></name></person-group><year iso-8601-date="2009">2009</year><article-title>Identification of direct residue contacts in protein–protein interaction by message passing</article-title><source>PNAS</source><volume>106</volume><fpage>67</fpage><lpage>72</lpage><pub-id pub-id-type="doi">10.1073/pnas.0805923106</pub-id></element-citation></ref><ref id="bib96"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wensing</surname><given-names>AM</given-names></name><name><surname>Calvez</surname><given-names>V</given-names></name><name><surname>Günthard</surname><given-names>HF</given-names></name><name><surname>Johnson</surname><given-names>VA</given-names></name><name><surname>Paredes</surname><given-names>R</given-names></name><name><surname>Pillay</surname><given-names>D</given-names></name><name><surname>Shafer</surname><given-names>RW</given-names></name><name><surname>Richman</surname><given-names>DD</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>2017 Update of the drug resistance mutations in HIV-1</article-title><source>Topics in Antiviral Medicine</source><volume>24</volume><fpage>132</fpage><lpage>133</lpage><pub-id pub-id-type="pmid">28208121</pub-id></element-citation></ref><ref id="bib97"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Williams</surname><given-names>KA</given-names></name><name><surname>Pennings</surname><given-names>P</given-names></name></person-group><year iso-8601-date="2020">2020</year><article-title>Drug resistance evolution in HIV in the late 1990s: hard sweeps, soft sweeps, clonal interference and the accumulation of drug resistance mutations</article-title><source>G3: Genes, Genomes, Genetics</source><volume>10</volume><fpage>1213</fpage><lpage>1223</lpage><pub-id pub-id-type="doi">10.1534/g3.119.400772</pub-id></element-citation></ref><ref id="bib98"><element-citation publication-type="preprint"><person-group person-group-type="author"><name><surname>Williams</surname><given-names>WB</given-names></name><name><surname>Alam</surname><given-names>SM</given-names></name><name><surname>Ofek</surname><given-names>G</given-names></name><name><surname>Erdmann</surname><given-names>N</given-names></name><name><surname>Montefiori</surname><given-names>D</given-names></name><name><surname>Seaman</surname><given-names>MS</given-names></name><name><surname>Wagh</surname><given-names>K</given-names></name><name><surname>Korber</surname><given-names>B</given-names></name><name><surname>Edwards</surname><given-names>RJ</given-names></name><name><surname>Mansouri</surname><given-names>K</given-names></name><name><surname>Eaton</surname><given-names>A</given-names></name><name><surname>Cain</surname><given-names>DW</given-names></name><name><surname>Martin</surname><given-names>M</given-names></name><name><surname>Parks</surname><given-names>R</given-names></name><name><surname>Barr</surname><given-names>M</given-names></name><name><surname>Foulger</surname><given-names>A</given-names></name><name><surname>Anasti</surname><given-names>K</given-names></name><name><surname>Patel</surname><given-names>P</given-names></name><name><surname>Sammour</surname><given-names>S</given-names></name><name><surname>Parsons</surname><given-names>RJ</given-names></name><name><surname>Huang</surname><given-names>X</given-names></name><name><surname>Lindenberger</surname><given-names>J</given-names></name><name><surname>Fetics</surname><given-names>S</given-names></name><name><surname>Janowska</surname><given-names>K</given-names></name><name><surname>Niyongabo</surname><given-names>A</given-names></name><name><surname>Janus</surname><given-names>BM</given-names></name><name><surname>Astavans</surname><given-names>A</given-names></name><name><surname>Fox</surname><given-names>CB</given-names></name><name><surname>Mohanty</surname><given-names>I</given-names></name><name><surname>Evangelous</surname><given-names>T</given-names></name><name><surname>Chen</surname><given-names>Y</given-names></name><name><surname>Berry</surname><given-names>M</given-names></name><name><surname>Kirshner</surname><given-names>H</given-names></name><name><surname>Van Itallie</surname><given-names>E</given-names></name><name><surname>Saunders</surname><given-names>K</given-names></name><name><surname>Wiehe</surname><given-names>K</given-names></name><name><surname>Cohen</surname><given-names>KW</given-names></name><name><surname>McElrath</surname><given-names>MJ</given-names></name><name><surname>Corey</surname><given-names>L</given-names></name><name><surname>Acharya</surname><given-names>P</given-names></name><name><surname>Walsh</surname><given-names>SR</given-names></name><name><surname>Baden</surname><given-names>LR</given-names></name><name><surname>Haynes</surname><given-names>BF</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>Vaccine Induction of Heterologous HIV-1 Neutralizing Antibody B Cell Lineages in Humans</article-title><source>bioRxiv</source><pub-id pub-id-type="doi">10.1101/2023.03.09.23286943</pub-id></element-citation></ref><ref id="bib99"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Zanini</surname><given-names>F</given-names></name><name><surname>Brodin</surname><given-names>J</given-names></name><name><surname>Thebo</surname><given-names>L</given-names></name><name><surname>Lanz</surname><given-names>C</given-names></name><name><surname>Bratt</surname><given-names>G</given-names></name><name><surname>Albert</surname><given-names>J</given-names></name><name><surname>Neher</surname><given-names>RA</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>Population genomics of intrapatient HIV-1 evolution</article-title><source>eLife</source><volume>4</volume><elocation-id>e11282</elocation-id><pub-id pub-id-type="doi">10.7554/eLife.11282</pub-id><pub-id pub-id-type="pmid">26652000</pub-id></element-citation></ref><ref id="bib100"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Zhou</surname><given-names>T</given-names></name><name><surname>Zhu</surname><given-names>J</given-names></name><name><surname>Wu</surname><given-names>X</given-names></name><name><surname>Moquin</surname><given-names>S</given-names></name><name><surname>Zhang</surname><given-names>B</given-names></name><name><surname>Acharya</surname><given-names>P</given-names></name><name><surname>Georgiev</surname><given-names>IS</given-names></name><name><surname>Altae-Tran</surname><given-names>HR</given-names></name><name><surname>Chuang</surname><given-names>G-Y</given-names></name><name><surname>Joyce</surname><given-names>MG</given-names></name><name><surname>Kwon</surname><given-names>YD</given-names></name><name><surname>Longo</surname><given-names>NS</given-names></name><name><surname>Louder</surname><given-names>MK</given-names></name><name><surname>Luongo</surname><given-names>T</given-names></name><name><surname>McKee</surname><given-names>K</given-names></name><name><surname>Schramm</surname><given-names>CA</given-names></name><name><surname>Skinner</surname><given-names>J</given-names></name><name><surname>Yang</surname><given-names>Y</given-names></name><name><surname>Yang</surname><given-names>Z</given-names></name><name><surname>Zhang</surname><given-names>Z</given-names></name><name><surname>Zheng</surname><given-names>A</given-names></name><name><surname>Bonsignori</surname><given-names>M</given-names></name><name><surname>Haynes</surname><given-names>BF</given-names></name><name><surname>Scheid</surname><given-names>JF</given-names></name><name><surname>Nussenzweig</surname><given-names>MC</given-names></name><name><surname>Simek</surname><given-names>M</given-names></name><name><surname>Burton</surname><given-names>DR</given-names></name><name><surname>Koff</surname><given-names>WC</given-names></name><collab>NISC Comparative Sequencing Program</collab><name><surname>Mullikin</surname><given-names>JC</given-names></name><name><surname>Connors</surname><given-names>M</given-names></name><name><surname>Shapiro</surname><given-names>L</given-names></name><name><surname>Nabel</surname><given-names>GJ</given-names></name><name><surname>Mascola</surname><given-names>JR</given-names></name><name><surname>Kwong</surname><given-names>PD</given-names></name></person-group><year iso-8601-date="2013">2013</year><article-title>Multidonor analysis reveals structural elements, genetic determinants, and maturation pathway for HIV-1 neutralization by VRC01-class antibodies</article-title><source>Immunity</source><volume>39</volume><fpage>245</fpage><lpage>258</lpage><pub-id pub-id-type="doi">10.1016/j.immuni.2013.04.012</pub-id><pub-id pub-id-type="pmid">23911655</pub-id></element-citation></ref></ref-list></back><sub-article article-type="editor-report" id="sa0"><front-stub><article-id pub-id-type="doi">10.7554/eLife.105466.3.sa0</article-id><title-group><article-title>eLife Assessment</article-title></title-group><contrib-group><contrib contrib-type="author"><name><surname>Bitbol</surname><given-names>Anne-Florence</given-names></name><role specific-use="editor">Reviewing Editor</role><aff><institution>Ecole Polytechnique Federale de Lausanne (EPFL)</institution><country>Switzerland</country></aff></contrib></contrib-group><kwd-group kwd-group-type="evidence-strength"><kwd>Compelling</kwd></kwd-group><kwd-group kwd-group-type="claim-importance"><kwd>Important</kwd></kwd-group></front-stub><body><p>In this <bold>important</bold> quantitative study of HIV-1 evolution in humans and rhesus macaques, selection coefficients are inferred at scale over the HIV genome. Selection coefficients are similar in humans and macaques, providing <bold>compelling</bold> evidence that these coefficients are representative of the fitness landscapes of these viruses within hosts. This work will be of interest to the community working on quantitative evolution and fitness landscape inference, and the finding that rapid fitness gains in the HIV population predict bNAb emergence has significant implications for HIV vaccine design.</p></body></sub-article><sub-article article-type="referee-report" id="sa1"><front-stub><article-id pub-id-type="doi">10.7554/eLife.105466.3.sa1</article-id><title-group><article-title>Reviewer #1 (Public review):</article-title></title-group><contrib-group><contrib contrib-type="author"><anonymous/><role specific-use="referee">Reviewer</role></contrib></contrib-group></front-stub><body><p>Summary:</p><p>The present work studies the coevolution of HIV-1 and the immune response in clinical patient data. Using the Marginal Path Likelihood (MPL) framework, they infer selection coefficients for HIV mutations from time-series data of virus sequences as they evolve in a given patient.</p><p>Strengths:</p><p>The authors analyze data from two human patients, consisting of HIV population sequence samples at various points in time during the infection. They inferred selection coefficients from the observed changes in sequence abundance using MPL. Most beneficial mutations appear in viral envelop proteins. The authors also analyze SHIV samples in rhesus macaques, and find selection coefficients that are compatible with those found in the corresponding human samples.</p><p>The manuscript is well written and organized.</p><p>Comments on revisions:</p><p>In their revised version the authors have addressed most of these points satisfactorily.</p></body></sub-article><sub-article article-type="referee-report" id="sa2"><front-stub><article-id pub-id-type="doi">10.7554/eLife.105466.3.sa2</article-id><title-group><article-title>Reviewer #2 (Public review):</article-title></title-group><contrib-group><contrib contrib-type="author"><anonymous/><role specific-use="referee">Reviewer</role></contrib></contrib-group></front-stub><body><p>This paper combines a biological topic of interest with the demonstration of important theoretical/methodological advances. Fitness inference is the foundation of the quantitative analysis of adapting systems. It is a hard and important problem and this paper highlights a compelling approach (MPL) first presented in (1) and refined in (2), roughly summarized in equation 3.</p><p>The authors find that positive selection shapes the variable regions of env in shared patterns across two patient donors. The patterns of positive selection are interesting in and of themselves, they confirm the intuition that hyper-variation in env is the result of immune evasion rather than a broadly neutral landscape (flatness). They show that the immune evasion patterns due to CD8 T and naive B-cell selection are shared across patients. Furthermore, they suggest that a particular evolutionary history (larger flux to high fitness states) is associated with bNAb emergence. Mimicking this evolutionary pattern in vaccine design may help us elicit bNAbs in patients in the future.</p><p>The fitness landscape of env in multiple hosts is immensely valuable especially because of how often SHIV has used as proxy for HIV. The strength of reversion-to-consensus selection is a known pattern of HIV post-infection populations but they are nicely quantified here. Agreement between SHIV and HIV evolution is shown. They find selection is larger for autologous antibodies than the bNAbs themselves (perhaps bNAbs are just too small a component of the host response to drive the bulk of selection?), and that big fitness increases precede antibody breadth in rhesus-macaques, suggesting that this fitness increase is the immune challenge required to draw forth a bNAb. All of high interest to HIV researchers.</p><p>(1) Sohail, M. S., Louie, R. H., McKay, M. R. &amp; Barton, J. P. Mpl resolves genetic linkage in fitness inference from complex evolutionary histories. Nature biotechnology 39, 472-479 (2021).</p><p>(2) Shimagaki, K. &amp; Barton, J. P. Bézier interpolation improves the inference of dynamical models from data. Physical Review E 107, 024116 (2023).</p><p>Strength of evidence:</p><p>Equation 3 is a beautiful and intuitive tool that accounts for linkage and can be solved precisely even in the presence of detailed mutational and selection models. They have addressed my earlier concerns the effects of incomplete observations of the frequency bias fitness inference on rare sites.</p><p>Whether the fact that fitness increases occured before or after the presence of the bnab remains incompletely known. bNAb detection is different from bNAb presence and the possibility that fitness increases occurred after the bNAbs appeared remains. Still, their conclusion is plausible and fits in with the other observations which form a coherent and compelling picture.</p><p>Overall this is a convincing paper. It is a valuable introduction to a practical method of fitness inference at the scale of the entire env gene and how this information can be leveraged to learn some interesting biology.</p></body></sub-article><sub-article article-type="referee-report" id="sa3"><front-stub><article-id pub-id-type="doi">10.7554/eLife.105466.3.sa3</article-id><title-group><article-title>Reviewer #3 (Public review):</article-title></title-group><contrib-group><contrib contrib-type="author"><anonymous/><role specific-use="referee">Reviewer</role></contrib></contrib-group></front-stub><body><p>Summary:</p><p>Shimagaki et al. investigate the virus-antibody coevolutionary processes that drive the development of broadly neutralizing antibodies (bnAbs). The study's primary goal is to characterize the evolutionary dynamics of HIV-1 within hosts that accompany the emergence of bnAbs, with a particular focus on inferring the landscape of selective pressures shaping viral evolution. To assess the generality of these evolutionary patterns, the study extends its analysis to rhesus macaques (RMs) infected with simian-human immunodeficiency viruses (SHIV) incorporating HIV-1 Env proteins derived from two human individuals.</p><p>Strengths:</p><p>A key strength of the study is its rigorous assessment of the similarity in evolutionary trajectories between humans and macaques. This cross-species comparison is particularly compelling, as it quantitatively establishes a shared pattern of viral evolution using a sophisticated inference method. The finding that similar selective pressures operate in both species adds robustness to the study's conclusions and suggests broader biological relevance. In the revised version, the Authors included a simple but clear explanation of the statistical method for inferring the model's parameters in the main text. Moreover, I find the potential implications of the methodology absent in the original submission very interesting.</p><p>Conclusions:</p><p>Overall, the study presents a compelling analysis of HIV-1 evolution and its parallels in SHIV-infected macaques.</p></body></sub-article><sub-article article-type="author-comment" id="sa4"><front-stub><article-id pub-id-type="doi">10.7554/eLife.105466.3.sa4</article-id><title-group><article-title>Author response</article-title></title-group><contrib-group><contrib contrib-type="author"><name><surname>Shimagaki</surname><given-names>Kai S</given-names></name><role specific-use="author">Author</role><aff><institution>Department of Computational and Systems Biology</institution><addr-line><named-content content-type="city">Pittsburgh</named-content></addr-line><country>United States</country></aff></contrib><contrib contrib-type="author"><name><surname>Lynch</surname><given-names>Rebecca</given-names></name><role specific-use="author">Author</role><aff><institution>George Washington University</institution><addr-line><named-content content-type="city">Washington</named-content></addr-line><country>United States</country></aff></contrib><contrib contrib-type="author"><name><surname>Barton</surname><given-names>John P</given-names></name><role specific-use="author">Author</role><aff><institution>University of Pittsburgh</institution><addr-line><named-content content-type="city">Pittsburgh</named-content></addr-line><country>United States</country></aff></contrib></contrib-group></front-stub><body><p>The following is the authors’ response to the original reviews.</p><disp-quote content-type="editor-comment"><p><bold>Reviewer #1 (Public review):</bold></p><p>Summary:</p><p>The present work studies the coevolution of HIV-1 and the immune response in clinical patient data. Using the Marginal Path Likelihood (MPL) framework, they infer selection coefficients for HIV mutations from time-series data of virus sequences as they evolve in a given patient.</p><p>Strengths:</p><p>The authors analyze data from two human patients, consisting of HIV population sequence samples at various points in time during the infection. They infer selection coefficients from the observed changes in sequence abundance using MPL. Most beneficial mutations appear in viral envelop proteins. The authors also analyze SHIV samples in rhesus macaques, and find selection coefficients that are compatible with those found in the corresponding human samples.</p><p>Weaknesses:</p><p>The MPL method used by the authors considers only additive effects of mutations, thus ignoring epistasis.</p></disp-quote><p>As suggested, we have now addressed this limitation by inferring epistatic fitness landscapes for CH505, CH848, SHIV.CH505, and SHIV.CH848. Indeed, the computational burden of the epistasis inference procedure was one constraint that motivated us to consider only additive fitness in the previous version of our paper. The original approach developed by Sohail et al. (2022) tested only sequences with &lt;50 sites due to this limitation, far smaller than the ones we consider. Beyond this computational constraint, we also believed that (1) an additive fitness model may suffice to capture local fitness landscapes, and practically, (2) epistatic interactions are more challenging to validate than the effects of individual mutations, making the interpretation of the model more complex.</p><p>However, after performing the analyses described in this paper, we developed a new approach for identifying epistatic interactions that can scale to much longer sequences (Shimagaki et al., Genetics, in press). We therefore applied this method to infer an epistatic fitness landscape for the HIV and SHIV data sets that we studied. As in that work, we focused on short-range (&lt;50 bp) interactions which we could more confidently estimate from data. We have added a section in the SI describing the epistatic fitness model and our analysis.</p><p>Overall, we found substantial agreement between the epistatic and purely additive models in terms of the estimated fitness effects of individual mutations (new Supplementary Fig. 8) and overall fitness (Supplementary Fig. 9). Consistent with our prior work, we did not find substantial evidence for very strong epistatic interactions (Supplementary Fig. 10). This does not necessarily mean that strong epistatic interactions do not exist; rather, this shows that strong interactions don’t substantially improve the fit of the model to data, and thus many are regularized toward zero. While the biological validation of epistatic interactions is challenging, we found that the largest epistatic interactions, which we defined as the top 1% of all shortrange interactions, were modestly but significantly enriched in the CD4 binding site, V1 and V5 regions for CH505 and in the CD4 binding site, V4, and V5 for CH848. In addition, mutation pairs N280S/V281A and E275K/V281G, which confer resistance to CH235, ranked in the top 15% of all epistatic interactions in CH505.</p><p>We have now included an additional section in the Results, “Robustness of inferred selection to changes in the fitness model and finite sampling”, which discusses our epistatic analyses (page 6, lines 415-464), along with the above Supplementary Figures and a technical section in the SI summarizing the epistasis inference approach.</p><disp-quote content-type="editor-comment"><p>Although the evolution of broadly neutralizing antibodies (bnAbs) is a motivating question in the introduction and discussion sections (and the title), the relevance of the analysis and results to better understanding how bnAbs arise is not clear. The only result presented in direct connection to bnAbs is Figure 6.</p></disp-quote><p>It is true that, while bnAb development is a major motivator of our study, our analysis focuses on HIV-1 and does not directly consider antibody evolution. We have now brought attention to this point as a limitation directly in the Discussion. Following the suggestion below in the “Recommendations for the authors,” we have edited our manuscript to place more emphasis on viral fitness and somewhat reduce the emphasis on bnAbs, though this remains an important motivating factor. Specifically, the Abstract now begins</p><p>Human immunodeficiency virus (HIV)-1 evolves within individual hosts to escape adaptive immune responses while maintaining its capacity for replication. Coevolution between the HIV-1 and the immune system generates extraordinary viral genetic diversity. In some individuals, this process also results in the development of broadly neutralizing antibodies (bnAbs) that can neutralize many viral variants, a key focus of HIV-1 vaccine design. However, a general understanding of the forces that shape virusimmune coevolution within and across hosts remains incomplete. Here we performed a quantitative study of HIV-1 evolution in humans and rhesus macaques, including individuals who developed bnAbs.</p><p>We have similarly modified the Discussion to focus first on viral fitness. In response to comments from Reviewer 3, we have also more clearly articulated how our work might contribute to the understanding of bnAb development in the Discussion.</p><disp-quote content-type="editor-comment"><p>Questions or suggestions for further discussion:</p><p>I list here a number of points for which I believe the paper would benefit if additional discussion/results were included.</p><p>The MPL method used by the authors considers only additive effects of mutations, thus ignoring epistasis. In Sohail et al (2022) MBE 39(10), p. msac199 (<ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1093/molbev/msac199">https://doi.org/10.1093/molbev/msac199</ext-link>) an extension of MPL is developed allowing one to infer epistasis. Can the authors comment on why this was not attempted here?</p><p>I presume one possible reason is that epistasis inference requires considerably more computational effort (and more data). However, since the authors find most beneficial mutations occurring in Env, perhaps restricting the analysis to Env genes only (e.g. the trimer shown in Figure 2) can lead to tractable inference of epistasis within this segment (instead of the full genome).</p></disp-quote><p>As described above, we have now addressed this comment by inferring epistatic fitness landscapes for the data sets that we consider. Our overall results using the epistatic fitness model are consistent with the ones that we previously obtained with an additive model.</p><disp-quote content-type="editor-comment"><p>Do the authors find correlations in the inferred selection coefficients of the two samples CH505 and CH848? I could not find any discussion of this in the manuscript. Only correlations between Humans and RM are discussed.</p></disp-quote><p>To address this question, we compared the fitness values and individual selection coefficients across CH505 and CH848 data sets. We found little correlation between CH505 and CH848 fitness values (shown in a new Supplementary Fig. 6) or selection coefficients. We found only 199 common mutations between HIV-1 amino acid sequences from CH505 and CH848 out of 868 and 1,406 total mutations, respectively. Thus, we were not surprised to find no strong relationship between fitness estimates from CH505 and CH848 data sets.</p><disp-quote content-type="editor-comment"><p><bold>Reviewer #2 (Public review):</bold></p><p>Summary:</p><p>This paper combines a biological topic of interest with the demonstration of important theoretical/methodological advances. Fitness inference is the foundation of the quantitative analysis of adapting systems. It is a hard and important problem and this paper highlights a compelling approach (MPL) first presented in (1) and refined in (2), roughly summarized in equation 12.</p><p>(1) Sohail, M. S., Louie, R. H., McKay, M. R. &amp; Barton, J. P. Mpl resolves genetic linkage in fitness inference from complex evolutionary histories. Nature biotechnology 39, 472-479 (2021).</p><p>(2) Shimagaki, K. &amp; Barton, J. P. Bézier interpolation improves the inference of dynamical models from data. Physical Review E 107, 024116 (2023).</p><p>The authors find that positive selection shapes the variable regions of env in shared patterns across two patient donors. The patterns of positive selection are interesting in and of themselves, they confirm the intuition that hyper-variation in env is the result of immune evasion rather than a broadly neutral landscape (flatness). They show that the immune evasion patterns due to CD8 T and naive B-cell selection are shared across patients. Furthermore, they suggest that a particular evolutionary history (larger flux to high fitness states) is associated with bNAb emergence. Mimicking this evolutionary pattern in vaccine design may help us elicit bNAbs in patients in the future.</p><p>There is a lot of information to be found in the full fitness landscape of env. The enormous strength of reversion-to-consensus in the patterns is a known pattern of HIV post-infection populations but they are nicely quantified here. Agreement between SHIV and HIV evolution is shown. They find selection is larger for autologous antibodies than the bNAbs themselves (perhaps bNAbs are just too small a component of the host response to drive the bulk of selection?), and that big fitness increases precede antibody breadth in rhesus macaques, suggesting that this fitness increase is the immune challenge required to draw forth a bNAb. This is all of high interest to HIV researchers.</p><p>Strength of evidence:</p><p>One limitation is, of course, that the fitness model is constant in time when the immune challenge is variable and changing. This simplification may complicate some interpretations.</p></disp-quote><p>We agree that this is a limitation of our current approach. In prior work, we have found that the constant fitness effects of mutations that we infer typically reflect the time-averaged fitness effect when the selection changes over time (Gao and Barton, PNAS 2025; Lee et al., Nat Commun 2025). It could be difficult, however, to capture changes in selection that fluctuate rapidly with underlying immune responses. We have added a new paragraph in the Discussion that more clearly sets out some of the limitations of our analysis, including our assumption of constant selection coefficients.</p><p>There are additional methodological and technical limitations that should be considered in the interpretation of our results. Most notably, we assume that the viral fitness landscape is static in time. While we do not expect selection for effective replication (“intrinsic” fitness) to change substantially over time, pressure for immune escape could vary along with the immune responses that drive them. In prior work, we have found that constant selection coefficients typically reflect the average fitness effect of a mutation when its true contribution to fitness is time-varying [42,43]. This may not adequately description mutational effects that undergo large or rapid shifts in time. Future work should also examine temporal patterns in selection for individual mutations.</p><disp-quote content-type="editor-comment"><p>Equation 12 in the methods is really a beautiful tool because it is so simple, but accounts for linkage and can be solved precisely even in the presence of detailed mutational and selection models. However, the reliance on incomplete observations of the frequency leads to complications that must be carefully (re)addressed here.</p><p>For instance, the consistent finding of strong selection in hypervariable regions is biologically intuitive but so striking, that I worry that it might be the result of a bias for selection in high entropy regions.</p></disp-quote><p>Thank you for this suggestion. We agree that it is important to carefully interrogate these results. To assess the effects of general sequence variability on inferred selection, we first computed a position-specific entropy measure, H<sub>i</sub>, for each site i. We first defined the time-dependent entropy H<sub>i</sub>(t) = - ∑<sub>a</sub> x<sub>i</sub> (a, t) log x<sub>i</sub> (a, t), where x<sub>i</sub> (a, t) represents the frequency of amino acid/nucleotide a at position i and time t, at each sample time. We then computed H<sub>i</sub> as the average of H<sub>i</sub>(t) across all sample times. A new Supplementary Fig. 1 plots the entropy against the inferred selection coefficients. Although some sequence variation must be observed in order for us to infer that a mutation is beneficial, we did not find a systematic bias toward larger (more beneficial) selection coefficients at more variable sites. Overall, we found only a modest correlation between inferred selection coefficients and entropy (Pearson’s r = 0.33 and 0.29 for CH505 and CH848, respectively), which appears to be partly driven by the tendency for mutations inferred to be significantly deleterious to occur at sites with low entropy. In addition to the new Supplementary Figure, we have added a reference to this analysis in the main text:</p><p>To test whether our results might be biased by overall sequence variability, we examined the relationship between our inferred selection coefficients and entropy, a common measure of sequence variability. Overall, we found only a modest correlation between selection and entropy, suggesting that the signs of selection that we observe are not due to increased sequence variability alone (Supplementary Fig. 1).</p><disp-quote content-type="editor-comment"><p>Mutational and covariance terms in equation 12 might be underestimated, due to finite sampling effect in highly diverse populations. Sampling effects lead to zeros in x(t) when actual frequency zeros might be rare at the population sizes of HIV viral loads and mutation rates. Both mutational flux and C underestimation will bias selection upward in eq. 12.</p><p>The prior papers (1) and (2) seem to show robustness to finite sampling effects, but, again, more care needs to be shown that this robustness transfers to the amino acid inference under these conditions. That synonymous sites are rarely selected for in the nucleotide level is a good sign, and it may be a matter of simply fully explaining the amino-acid level model.</p></disp-quote><p>As above, we agree that these tests are important. To assess the robustness of our results to finite sampling, we performed bootstrap sampling on the viral sequences and inferred selection coefficients using the resampled sequences. Specifically, we resampled the same number of sequences as in the original data at each time point and repeated this for all time points across all HIV-1 and SHIV data sets. A new Supplementary Fig. 11 shows a typical comparison of the original selection coefficients vs. those obtained through bootstrap resampling. Overall, we observe a high degree of consistency between the selection coefficients in each case, which is surely aided by the long time series in these data sets. As pointed out by the reviewer, uncertainty in low-frequency mutations is a particular concern, though the effects on inferred selection are mitigated by regularization.</p><p>We have added a section in the Results, “Robustness of inferred selection to changes in the fitness model and finite sampling”, which includes this analysis:</p><p>Finite sampling of sequence data could also affect our analyses. To further test the robustness of our results, we inferred selection coefficients using bootstrap resampling, where we resample sequences from the original ensemble, maintaining the same number of sequences for each time point and subject. The selection coefficients from the bootstrap samples are consistent with the original data (see Supplementary Fig. 11), with Pearson’s r values of around 0.85 for HIV-1 data sets and 0.95 for SHIV data sets, respectively.</p><disp-quote content-type="editor-comment"><p>Uncertainty propagates to the later parts of the paper, eg. HIV and SIV shared patterns might be the result of shared biases in the method application. However, this worry does not extend to the apples-to-apples comparison of fitness trajectories across individuals (Figures 5 and 6) which I think are robust (for these sample sizes).</p></disp-quote><p>One way to address this uncertainty is to compare the fitness values and individual selection coefficients across CH505 and CH848 data sets, which was also requested by Reviewer 1. Overall, we found little correlation between CH505 and CH848 fitness values (shown in a new Supplementary Fig. 6) or selection coefficients. This suggests that similarities between HIV-1 and SHIV landscapes are not solely determined by potential biases in the inference approach. We have now added a reference to this point in the main text:</p><p>In contrast, the inferred fitness landscapes of CH505 and CH848, which share few mutations in common, are poorly correlated (Supplementary Fig. 6). This suggests that the similarities between viral fitness values in humans and RMs are not artifacts of the model, but rather stem from similarities in underlying evolutionary drivers.</p><disp-quote content-type="editor-comment"><p>The timing evidence is slightly weakened by the fact that bNAb detection is different from bNAb presence and the possibility that fitness increases occurred after the bNAbs appeared remains. Still, their conclusion is plausible and fits in with the other observations which form a coherent and compelling picture.</p></disp-quote><p>Yes, we agree that this is a limitation of our analysis — bNAbs may have been present at low levels before they were detected, and we cannot definitively reject selection by bNAbs. Nonetheless, in at least one case (RM5695), rapid fitness gains were substantially separated in time from bNAb detection (roughly 2 weeks after infection vs. 16 weeks, respectively). We have now added this point in a new paragraph in the Discussion:</p><p>While we found a strong relationship between viral fitness dynamics and the emergence of bnAbs, it may not be true that the former stimulates the latter. For example, bnAbs may have been present within each host before they were experimentally detected. Rapid viral fitness gains within hosts that developed broad antibody responses could then have been driven by undetected bnAb lineages. However, we did not find strong selection for known bnAb resistance mutations, and in at least one case (RM5695), rapid fitness gains (roughly 2 weeks after infection) substantially preceded bnAb detection (16 weeks). Still, given the limited size of the data set that we studied, it is unclear the extent to which our results will transfer to larger and broader data sets.</p><disp-quote content-type="editor-comment"><p>Overall thisrpretations could provide valuable insights into the broader significance of these results. is a convincing paper, part of a larger admirable project of accurately inferring complete fitness landscapes.</p><p><bold>Reviewer #3 (Public review):</bold></p><p>Summary:</p><p>Shimagaki et al. investigate the virus-antibody coevolutionary processes that drive the development of broadly neutralizing antibodies (bnAbs). The study's primary goal is to characterize the evolutionary dynamics of HIV-1 within hosts that accompany the emergence of bnAbs, with a particular focus on inferring the landscape of selective pressures shaping viral evolution. To assess the generality of these evolutionary patterns, the study extends its analysis to rhesus macaques (RMs) infected with simianhuman immunodeficiency viruses (SHIV) incorporating HIV-1 Env proteins derived from two human individuals.</p><p>Strengths:</p><p>A key strength of the study is its rigorous assessment of the similarity in evolutionary trajectories between humans and macaques. This cross-species comparison is particularly compelling, as it quantitatively establishes a shared pattern of viral evolution using a sophisticated inference method. The finding that similar selective pressures operate in both species adds robustness to the study's conclusions and suggests broader biological relevance.</p><p>Weaknesses:</p><p>However, the study has some limitations. The most significant weakness is that the authors do not sufficiently discuss the implications of the observed similarities. While the identification of shared evolutionary patterns (e.g., Figure 5) is intriguing, the study would benefit from a more explicit discussion of what these findings mean for instance, in the context of HIV vaccine design, immunotherapy, or fundamental viral-host interactions. Even speculative inte</p></disp-quote><p>Thank you for this suggestion. We have now clarified the potential implications of our work in several areas. While speculative, one possible application is in vaccine design: it may be beneficial to design sequential immunogens to mimic the patterns of viral evolution associated with rapid fitness gains. This “population-based” design principle is different from typical approaches, which have focused on molecular details of virus surface proteins.</p><p>We have extended our discussion of our results in the context of viral evolution within and across hosts and related host species. Overall, our work suggests that there may be relatively few paths to significantly higher viral fitness in vivo. Evolutionary “contingencies” such as shifting immune pressure or epistatic interactions could influence the direction of evolution, but not so dramatically that the dynamics that we see in different hosts are not comparable. We have also connected our work more broadly to the literature in evolutionary parallelism in HIV-1 in different contexts.</p><disp-quote content-type="editor-comment"><p>A secondary, albeit less critical, limitation is the placement of methodological details in the Supplementary Information. While it is understandable that the authors focus on results in the main text - especially since the methodology is not novel and has been previously described in earlier publications - some readers might benefit from a more thorough presentation of the method within the main paper.</p></disp-quote><p>We have now modified the main text to add a new section, “Model overview,” that lays out the key steps of our approach. While we reserve technical details for the Methods, we believe that this new section provides more intuition about how our results were obtained (including a discussion of the important Eq. 12, now Eq. 3 in the main text) and our underlying assumptions.</p><disp-quote content-type="editor-comment"><p>Conclusions:</p><p>Overall, the study presents a compelling analysis of HIV-1 evolution and its parallels in SHIV-infected macaques. While the quantitative comparison between species is a notable contribution, a deeper discussion of its broader implications would strengthen the paper's impact.</p><p><bold>Reviewer #1 (Recommendations for the authors):</bold></p><p>I suggest de-emphasizing bnAbs and focusing on selection landscape inference, which seems to be the actual focus of the paper.</p></disp-quote><p>While we do not directly study antibody development in this work, bnAb development is certainly an important motivating factor. As described in the responses above, we have now modified the Abstract and Discussion to place relatively more emphasis on fitness comparisons and to relatively less focus on bnAb development.</p><disp-quote content-type="editor-comment"><p><bold>Reviewer #2 (Recommendations for the authors):</bold></p><p>Please make sure that the MPL method is defined in this paper and its limitations are at least partially repeated.</p></disp-quote><p>As noted in responses above, we have now included more methodological details in the main text of the paper, which we hope will make the intuition and assumptions involved in our analysis clearer.</p><disp-quote content-type="editor-comment"><p>I'd like the code to better show or describe the model, I could not figure out the model details by looking at the code. It seems mostly just to be csv exporting for use with preexisting MPL code. A longer code readme would be helpful.</p></disp-quote><p>We have now updated the README on GitHub to include a conceptual overview of our inference approach, which references how each step is implemented in the code.</p><disp-quote content-type="editor-comment"><p><bold>Reviewer #3 (Recommendations for the authors):</bold></p><p>Try to give some more details (not necessarily giving the full mathematical derivation) on the statistical method utilized.</p></disp-quote><p>As noted above, we have now expanded our discussion of the statistical methods and assumptions in the main text.</p><disp-quote content-type="editor-comment"><p>Figures 3 and 4 are somewhat 'messy'. Although I do not have a constructive suggestion here, I feel that with a little more effort maybe the authors could come up with something more clean.</p></disp-quote><p>It is true that the mutation frequency dynamics are somewhat “choppy” and difficult to follow intuitively. To attempt to make these figures easier to parse visually, we have increased the transparency on the lines and added exponential smoothing to the mutation frequencies, resulting in smoother trajectories. The trajectories without smoothing are retained in Supplementary Fig. 3. Here we also note that this smoothing is for visual purposes only; we use the original frequency trajectories for inference, rather than the smoothed ones.</p></body></sub-article></article>