plot.phybreak: Plotting a phybreak object.

Description Usage Arguments Author(s) References Examples

View source: R/plot_phybreak.R

Description

Plots a phybreak-object three times: (1) as transmission tree, (2) as phylogenetic tree, and (3) as transmission tree with phylogenetic trees for each host using the default graphical parameters of plotTrans, plotPhylo, and plotPhyloTrans. The default is to plot the current state, but any posterior sample can be chosen, as well as various consensus trees. Consensus tree "edmonds" plots only a transmission tree, consensus tree "mcc" only a phylogenetic tree and a combined tree.

Usage

1
2
3
## S3 method for class 'phybreak'
plot(x, plot.which = c("sample", "edmonds", "mpc",
  "mtcc", "mcc"), samplenr = 0, ...)

Arguments

x

An object of class phybreak.

plot.which

Either "sample" to plot the current state or a selected posterior sample, "mpc" or "mtcc" to plot a consensus transmission tree (see transtree) or "mcc" to plot the maximum clade credibility tree (see phylotree).

samplenr

If plot.which = "sample", this indicates which posterior tree should be plotted: samplenr = 0 to plot the current state.

...

Some methods for this generic require additional arguments. None are used in this method.

Author(s)

Don Klinkenberg don@xs4all.nl

References

Klinkenberg et al. (2017) Simultaneous inference of phylogenetic and transmission trees in infectious disease outbreaks. PLoS Comput Biol, 13(5): e1005495.

Examples

1
2
3
4
5
6
7
#First build a phybreak-object containing samples.
simulation <- sim_phybreak(obsize = 5)
MCMCstate <- phybreak(dataset = simulation)
MCMCstate <- burnin_phybreak(MCMCstate, ncycles = 20)
MCMCstate <- sample_phybreak(MCMCstate, nsample = 50, thin = 2)

plot(MCMCstate, plot.which = "mpc")

donkeyshot/phybreak documentation built on Sept. 17, 2021, 9:32 p.m.