get.mu: Derive mutation rate estimation from outbreak's outputs

Description Usage Arguments Value Author(s) Examples

Description

The function get.mu is used to obtain a distribution of the mutation rate from outbreaker's ouptput (functions outbreaker and outbreaker.parallel). The mutation rates used in outbreaker's model are expressed per generation of infection, which can be problematic to interprete biologically. get.mu derives classical estimates of the mutation rate per unit of time, with one value being estimated for each chain of the MCMC. By default, the mutation rate is expressed in number of nucleotide changes per unit time and per genome. If genome.size is provided, the mutation rate is expressed in number of nucleotide changes per unit time and per site.

Usage

1
get.mu(x, burnin = 20000, genome.size = NULL)

Arguments

x

the output of outbreaker or outbreaker.parallel.

burnin

an integer indicating the number of steps of the MCMC to be discarded as burnin period. Defaults to 20,000.

genome.size

the size of the genome; if not provided, mutation rate will be expressed in number of mutations per unit of time and per genome.

Value

A vector of mutation rates derived from the MCMC.

Author(s)

Thibaut Jombart t.jombart@imperial.ac.uk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## load data
data(fakeOutbreak)
attach(fakeOutbreak)

mu <- get.mu(res, genome.size=ncol(dat$dna))
hist(mu, col="grey",
     main="Inferred distribution of mu",
     xlab="mutations/site/day")
abline(v=1e-4,lty=2, lwd=4, col="royalblue")
mtext(side=3, "Dashed line = actual value")

detach(fakeOutbreak)

outbreaker documentation built on May 1, 2019, 10:23 p.m.