Giter Club home page Giter Club logo

sarscov2ngs's Introduction

SARS-Cov-2 modeling and analyis code

This repository hold the main scripts and SEIR model configurations for all analysis done in the paper:.
"Full genome viral sequences inform patterns of SARS-CoV-2 spear into and within Israel".

Phylodynamic analyses

The phylodynamic analyses presented in this report depend on having BEAST2.6.2 (https://github.com/CompEvol/beast2) and PhyDyn 1.3.6 (https://github.com/mrc-ide/PhyDyn) installed. It also depends on having already generated a ML starting tree (data/tree.nwk) and an alignment (data/masked.fasta) of your sequences. In the future we plan to extend these scripts to allow more flexibility in the generation of the Beast XML file, particularly the use of random starting trees. The file scripts/process_fasta.py takes in the starting tree and alignment and labels sequence names in the tree and alignment with date of sampling and whether the sequences are considered part of the global reservoir of sequences ("exog") or whether they are sequences from Israel ("Il" or "Ih"). Sequences from Israel are randomly assigned to "Ih" with probability p_h, else they are assigned to "Il." This script then calls the scripts/generate_xml.py file which inserts your model parameters into the XML template (config/SEIR_TEMPLATE.xml). This XML template was originally generated using BEAUti (https://github.com/CompEvol/beast2) but has been extensively edited by hand. As it is set up right now, the script generates 7 XML files across a range of p_h values. These XML files are all saved in subdirectories labelled by the p_h value which are all within a directory called beast. The XML files which we used are not currently provided in this repository, however, final XML files upon journal submission will be available, less the alignments due to GISAID rules.

Insert parameters and priors here

Once you have your BEAST2 XML files generated, they are ready to be run with beast (beast beast/{ph}/ph{ph}.xml). By default they are set to run for 10,000,000 MCMC steps. Once you have your Beast log and PhyDyn trajectory files, these can be analyzed using the scripts/combine_plot_traj.py file which will generate an MCC tree (using TreeAnnotator ((https://github.com/CompEvol/beast2))) and plot both the tree as well as PhyDyn trajectories for each p_h value. This script also contains a function which calls LogCombiner (https://github.com/CompEvol/beast2), however, this is not currently used as we only have one chain for each p_h value. Plotting of the trees relies on Baltic (https://github.com/evogytis/baltic).

sarscov2ngs's People

Contributors

daniellemiller avatar m-a-martin avatar

Stargazers

BEAST-Community avatar

Watchers

BEAST-Community avatar

Forkers

chaosdonkey06

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.