README.md

sims4

Simulation forward (sims4) of case networks.

The main simulation function, Time_Sim, proceeds with an initial infection and associated root sequence. The simulation proceeds via infections occuring, creating NB(R0) offspring, distributed at gamma(Tg) times. Model uses the substitution model chosen (JC69 or HKY85 or K80) for sequence evolution and mu is the mutation rate (chance of substitution/site/unit time) and Tg is generation time in unit time. Depending on other arguments, the same or iteratively evolved sequences can be used

The output of the simulation represents a fully documented case tree, including but not limited to the time of infection, the ID of the infector and the sequence associated with each infection. This output can then be fed to Case_2_Phylo to create the ape phylo class object tree, or can itself be subsampled for use within ensuing bayesian analysis within BEAST.

This is mainly wrapped within the BEAST_R0_Check script which links out the entire process to be run on a cluster after specifiying the cluster directory path and beast template.

The data from the investigation so far is available from this shared viewable folder: https://drive.google.com/folderview?id=0B0-wM-jL1G-SNExJUzV3d0F1c1U&usp=sharing

Installing sims4

To install the development version from github (the package devtools is required):

library(devtools) devtools::install_github("OJWatson/sims4")



OJWatson/sims4 documentation built on May 7, 2019, 8:33 p.m.