phylotree: Maximum clade credibility tree.

Description Usage Arguments Value Author(s) References Examples

View source: R/phylotree.R

Description

Identify the maximum clade credibility tree from a phybreak-object containing posterior samples.

Usage

1
2
phylotree(x, samplesize = Inf, support = c("proportion", "count"),
  phylo.class = FALSE)

Arguments

x

An object of class phybreak.

samplesize

The number of posterior samples that is used, taken from the tail.

support

Whether to return the support (= posterior probability) for each infector as a "proportion" or as a "count" of posterior trees in which that transmission link or transmission cluster is present.

phylo.class

Whether to return an object of class "phylo", in which case a single tree from the posterior is returned (not with summary infection times).

Value

A data.frame with per item (=node) its parent and support per clade, and optionally summary node times. The first n nodes are the samples, the last n-1 nodes are the internal nodes.

Author(s)

Don Klinkenberg [email protected]

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
8
#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)

phylotree(MCMCstate)
plot(phylotree(MCMCstate, phylo.class = TRUE))

donkeyshot/phybreak documentation built on Aug. 16, 2018, noon