BEAST_R0_Full: BEAST_R0_Full

Description Usage Arguments Details Value

Description

Main simulation function to investigate the effects of sampling strategy against TMRCA/Clock Rate Bias. As opposed to BEAST_R0_Check, this function considers all sampling schemes.

Usage

1
2
3
4
5
6
7
8
9
BEAST_R0_Full(N = 1e+05, R0 = 2, Tg = 2, t.cont = TRUE,
  real.time = FALSE, scale = 1, size.reps = c(0, 10, 1, 0.1),
  mu = 1.57e-05, root.path = NULL, seq.length = 1600, model = "HKY85",
  evolution.model = "within.host", kappa = 2, outgroup = FALSE,
  missed.generations = 0, n.seq.samples = 50, sample.reps = 10,
  tree.reps = 20, sigma.reps = c(1, 5, 9, 13, 18), oldestboolean = FALSE,
  template.xml = "C:/Users/Oliver/GoogleDrive/AcademicWork/Imperial/git/evoflution/inst/extdata/template.xml",
  dir = "C:/Users/Oliver/GoogleDrive/AcademicWork/Imperial/git/evoflution/Results/Within_Host_No_Outgroup",
  network.path = "\\\\fi--san02.dide.ic.ac.uk\\homes\\olw13\\Data\\")

Arguments

N

Target infected population size. Default = 1e5

R0

basic reproduction number. Default = 2

Tg

mean generation time. Default = 2.6 days

t.cont

Boolean dictating whether gamma process is used for generation time distribution. Default = TRUE

real.time

Boolean dictating. whether an extra generation is simulated producing extra for real.time consideration.Default = FALSE

scale

rgamma scale parameter. Default = 1

size.reps

Vector of different size parameters in negative binomial offspring distribution. Default=c(0,10,1,0.1)

mu

Clock Rate. Default=1e-4

root.path

File path of saveRDS(root). Default = NULL

seq.length

Sequence length. Will be overwritten accordingly if root.path given. Default = 1701

model

Nucleic subsitution model. Can be one of "JC69", "K80", "HKY85" (Default)

evolution.model

String variable detailing evolutionary model. Can be any of "generational", "within.host" and "parallel"

kappa

Tv/Ts ration. Default = 2

missed.generations

Number of intiial generations not considered for sampling. Default = 0

n.seq.samples

number of sequences to be sampled. Default = 50

sample.reps

number of tree subsamples under each scheme. Default = 10

tree.reps

number of unique tree simulations conducted under each scheme. Default = 20

sigma.reps

variables total. Default = c(1,5,9,13,18)

oldestboolean

boolean if oldest sequence not root is included. Default=TRUE

template.xml

path for template xml. Default is a strict molecular clock, exponential coalescent, HKY85+G4 xml found within the data folder called test.xml

dir

Local Directory where simulations tree and nexus files are stored. Defaults specific to author.

network.path

Network Directory which a cluster can see to access the BEAST xml files. Defaults specific to author.

size.reps

- Vector of offspring distribution parameters. Default=c(0,10,1,0.1)

outgoup

Boolean concerning whether outgroup is simulated. Default = FALSE

Details

BEAST_R0_Full proceeds by simulating a tree in a local directory, sampling from it and placing the nexus samples within the local directory, before then creating the BEAST2.3xml file in a parallel network directory, and then running the BEAST analysis using the batch collation file.

Highly prescriptive function declaration, which considers all the simulation parameters needed, the range of sigma parameters, the BEAST template required, directories etc.

Value

Returns a data frame of collated statstics


OJWatson/evoflution documentation built on May 7, 2019, 8:32 p.m.