Broken_Generation_Sim: Fixed Offspring and Generation Time epidemic genetic...

Description Usage Arguments Details Value Examples

Description

Subset of Generation Sim whereby R0 and Tg never vary

Usage

1
2
3
Broken_Generation_Sim(fasta.file = NULL, seq.length = 1000, N = 1000,
  mu = 1e-04, R0 = 2, Tg = 2, kappa = 2, model = "HKY85", I = 1,
  samples = 10, t.exp = FALSE)

Arguments

fasta.file

path to a fasta sequence to be used as the root, otherwise random sequence used

seq.length

length of root sequence if not specified by fasta.file

N

- total popualation size, such that N-I = S

mu

- mutation root in base changes per generation time

R0

- basic reproduction number

Tg

- mean generation time

kappa

- the rate of transitions and transversions

model

- substitution model - avaialble so far JC69, HKY85

I

- Initial infected population

samples

- 1/samples is equal to the random sample size of tips stored

t.exp

- boolean determining if timeis treated explicitly, i.e. not via p.mut generation

Details

This function starts with a root nucelotide sequence and evolves it via an epidemic generational model. The result can then be used elsehere to generate newick trees and necessary enxus files for BEAUti/BEAST etc.

Value

Returns a list of 10, with the first 7 lists giving the full infection network. As such res$ID[n] corresponds to res$Time/Parent/IsFather/Offspring/Branch.Length/Sequence/[n]. res$Seq and res$Seq.ID relate to eachother and the value within res$Sequence relates to res$Seq.ID and thus can be used to map a sequence to each individual, and parent.id gives the id of the next individual that would be considered for infection.

Examples

1
2
## simulate data
TODO(OJ)

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