Loading wiki pages...

Wiki Version:
<h1>Asynchrony between virus diversity and antibody selection limits influenza virus evolution</h1> <p><a href="https://dylanhmorris.com" rel="nofollow">Dylan H. Morris</a>(1,*), <a href="2" rel="nofollow">Velislava N. Petrova</a>, Fernando W. Rossine(1), <a href="https://orcid.org/0000-0001-8312-1446" rel="nofollow">Edyth Parker</a>(3, 4), Bryan T. Grenfell(1, 5), <a href="https://orcid.org/0000-0003-2525-1407" rel="nofollow">Richard A. Neher</a>(6), Simon A. Levin(1), and <a href="https://orcid.org/0000-0002-2113-162X" rel="nofollow">Colin A. Russell</a>(4,*)</p> <p>* Corresponding authors</p> <ol> <li>Department of Ecology \& Evolutionary Biology, Princeton University, Princeton, NJ, USA. </li> <li>Department of Human Genetics, Wellcome Trust Sanger Institute, Cambridge, UK </li> <li>Department of Veterinary Medicine, University of Cambridge, Cambridge, UK</li> <li>Department of Medical Microbiology, Academic Medical Center, University of Amsterdam, Amsterdam, NL</li> <li>Fogarty International Center, National Institutes of Health, Bethesda, USA</li> <li>Biozentrum, University of Basel, Basel, CH</li> </ol> <h2>Repository information</h2> <p>This repository accompanies the article "Asynchrony between virus diversity and antibody selection limits influenza virus evolution" (DH Morris et al). It provides code for reproducing numerical simulations and analysis and recreating display figures from the paper.</p> <h2>License and citation information</h2> <p>If you use the code or data provided here, please make sure to do so in light of the project <a href="LICENSE.txt" rel="nofollow">license</a> and please cite our work as below:</p> <ul> <li>D. H. Morris et al. Asynchrony between virus diversity and antibody selection limits influenza virus evolution. 2020. <a href="https://github.com/dylanhmorris/asynchrony-influenza/" rel="nofollow">https://github.com/dylanhmorris/asynchrony-influenza/</a></li> </ul> <p>Bibtex record:</p> <pre class="highlight"><code>@electronic{morris2020, Author = {Dylan H. Morris AND Velislava N. Petrova AND Fernando W. Rossine AND Edyth Parker AND Bryan T. Grenfell AND Richard A. Neher AND Simon A. Levin AND Colin A. Russell}, Title = {Asynchrony between virus diversity and antibody selection limits influenza virus evolution}, Date = {2020}, doi = {10.1101/2020.04.27.064915} }</code></pre> <h2>Article abstract</h2> <p>Seasonal influenza viruses create a persistent global disease burden by evolving to escape immunity induced by prior infections and vaccinations. New antigenic variants have a substantial selective advantage at the population level, but these variants are rarely selected within-host, even in previously immune individuals. We find that the temporal asynchrony between within-host virus exponential growth and antibody-mediated selection can limit within-host antigenic evolution. If selection for new antigenic variants acts principally at the point of initial virus inoculation, where small virus populations encounter well-matched mucosal antibodies in previously infected individuals, there can exist protection against reinfection that does not regularly produce observable new antigenic variants within individual infected hosts. Our results explain how virus antigenic evolution can be highly selective at the global level but nearly neutral within hosts. They also suggest new avenues for improving influenza control.</p> <h2>Directories</h2> <ul> <li><code>src</code>: all code, including data preprocessing, stochastic simulation, numerical analysis, and figure generation:</li> <li><code>src/pysrc</code>: all Python code, mainly figure generation and data analysis.</li> <li><code>src/gillespie</code>: Stochastic simulation classes implementing algorithms due to Gillespie and others.</li> <li><code>src/ini</code>: classes for readining <code>.ini</code> and <code>.mk</code>-formatted input files. Modifies the open source New BSD licensed <a href="https://github.com/benhoyt/inih" rel="nofollow"><code>inih</code> library</a>.</li> <li><code>src/random</code>: pseudorandom number generation classes</li> <li><code>src/testing</code>: unit tests for C++ code. Uses the Boost-licensed <code>catch.hpp</code> library.</li> <li><code>src/trees</code>: code for manipulating and plotting phylogenetic trees.</li> <li><code>src/withinhost</code>: C++ classes specify within host dynamics models (including transmission chains), as well as C++ classes that hold model parameter sets.</li> <li><code>src/withinhost_runners</code>: Programs that run stochastic simulations from the models specified in <code>src/withinhost</code>.</li> <li><code>dat</code>: data files in whitespace-separated plain text (<code>.txt</code>) and comma-separated values (<code>.csv</code>) formats.</li> <li><code>out</code>: output files from simulation, as whitespace-separated plain text (<code>.txt</code>) files.</li> <li><code>ms</code>: manuscript files, including main text and extended data figures (as <code>.pdf</code> files in the <code>ms/main/figures/</code> directory. The manuscript source <code>.tex</code> files are not included to respect preprint and embargo policies.</li> <li><code>bin</code>: compiled binaries generated from C++ code, used to run simulations</li> <li><code>obj</code>: object files created during C++ code compilation</li> </ul> <h2>Reproducing analysis</h2> <p>A guide to reproducing the analysis from the paper follows.</p> <h3>Getting the code</h3> <p>First download this repository. The recommended way is to <code>git clone</code> it from the command line:</p> <pre class="highlight"><code>git clone <a href="https://github.com/dylanhmorris/asynchrony-influenza.git" rel="nofollow">https://github.com/dylanhmorris/asynchrony-influenza.git</a></code></pre> <p>Downloading it manually via Github's download button or from <a href="https://doi.org/10.17605/OSF.IO/jdsbp/" rel="nofollow">OSF</a> should also work.</p> <h3>Dependency installation</h3> <p>The analysis can be auto-run from the project <code>Makefile</code>, but you may need to install some external dependencies first. See the <strong>Dependency installation guide</strong> below for a complete walkthrough. In the first instance, you'll need a working installation of Python 3, a working C++ compiler, and a working installation of Gnu Make or similar. A few external Python packages can then be installed from the command line by typing </p> <pre class="highlight"><code>make depend</code></pre> <p>from within the project directory.</p> <h3>Running the analysis</h3> <p>The simplest approach is simply to type <code>make</code> at the command line, which should produce a full set of figures and simulation output. Be aware, however, that this may take a great deal of time, as some of the simulations, particularly the transmission chains, are computationally costly. Some targets (<code>pt_chain_[x].txt</code> and <code>drift_chain_[x].txt</code>) have been split across multiple files for this reason, so that users with access to multiple cores can parallelize generation by <code>make</code>-ing each in a seperate process. A 4-core parallelized <code>make</code>-ing of the project should take 6--12 hours on a laptop.</p> <p>If you want to do things piecewise, typing <code>make &lt;filename&gt;</code> for any of the files listed in the <code>out</code> or <code>ms/main/figures</code> directories below should run the steps needed to produce that file.</p> <p>Some shortcuts are available:</p> <ul> <li><code>make figs</code> produces all figures</li> <li><code>make minimal_within_host_results</code> produces simulations from the minimal within-host evolutionary model, if they do not already exist</li> <li><code>make chain_results</code> produces simulations from the transmission chain model, if they do not already exist </li> <li> <p><code>make sensitivity_results</code> produces sensitivity analysis simulations from the minimal within-host model, if they do not already exist</p> </li> <li> <p><code>make clean</code> removes all generated files, leaving only source code (though it does not uninstall packages)</p> </li> <li><code>make run_tests</code> makes and runs all unit tests for C++ code.</li> </ul> <h3>Examining code</h3> <p>Examining the raw Python and C++ code is the place to start to understand how models have been specified. But note that many parameters are set at runtime rather than hard-coded.</p> <p>Parameter choices are specified in <code>dat/<a href="http://RunParameters.mk" rel="nofollow">RunParameters.mk</a></code>.</p> <h2>Project structure when complete</h2> <p>Once the full analysis has been run, you should be able to find a full set of figures in <code>ms/figures</code>, simulation output in <code>out</code> and simulation code binaries in <code>bin</code>.</p> <h2>Dependency installation guide</h2> <p>You will need a working Python 3 installation with the command line interpreter <code>python3</code> (macOS and Linux). On mac and Linux, you can check that you have an accessible <code>python3</code> by typing <code>which python3</code>at the command line and seeing if one is found.</p> <p>If you do not have an Python 3 installation, you can install it from the <a href="https://anaconda.org/" rel="nofollow">Anaconda project</a> or from the command line using a package manager such as <a href="https://brew.sh/" rel="nofollow">Homebrew</a> on macOS or <code>apt-get</code> on Linux. macOS users may also need to install the macOS "command line tools" by typing <code>xcode-select --install</code> at a command prompt.</p> <p>To reproduce the phylogenetic tree visualizations in the SI, you will need a working installation of the statistical programmaing language R with the command line interpreter <code>Rscript</code> (macOS and Linux). On mac and Linux, you can check that you have an accessible <code>Rscript</code> by typing <code>which Rscript</code>at the command line and seeing if one is found. </p> <p>If you do not have an R installation, you can install it from <a href="https://www.r-project.org/" rel="nofollow">the R project website</a> or from the command line using a package manager such as <a href="https://brew.sh/" rel="nofollow">Homebrew</a> on macOS or <code>apt-get</code> on Linux. macOS users may also need to install the macOS "command line tools" by typing <code>xcode-select --install</code> at a command prompt.</p> <p>Once Python 3 and R are installed, you can automatically install all other dependencies on most systems using <code>make</code>. In the top level project directory, type the following at the command line:</p> <pre class="highlight"><code>make depend</code></pre> <p>Alternatively, you can type the commands <code>pip3 install -r python_requirements.txt</code> and <code>Rscript --vanilla src/trees/install_needed_R_packages.R</code> manually. </p>
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.