Description Usage Arguments Details Author(s) Examples
These are the main functions used for generating graphics from the raw
output of outbreaker
and outbreaker.parallel
.
1 2 3 4 5 6 7 8 9 10 11 12 | plotChains(x, what = "post", type = c("series", "density"), burnin = 0,
dens.all = TRUE, col = funky(x$n.runs), lty = 1, lwd = 1,
main = what, legend = TRUE, posi = "bottomleft", ...)
transGraph(x, labels = NULL, burnin = x$burnin, threshold = 0.2,
col.pal = NULL, curved.edges = TRUE, annot = c("dist", "support"),
sep = "/", ...)
plotOutbreak(x, burnin = x$burnin, thres.hide = 0.2, col = NULL,
col.pal = colorRampPalette(c("blue", "lightgrey")), edge.col.pal = NULL,
col.edge.by = "prob", annot = c("dist", "prob"), sep = "/",
cex.bubble = 1, edge.max.dist = 10, lwd.arrow = 2, xlim = NULL, ...)
|
x |
the output of |
what |
a character chains giving the name of the item to be plotted.
See |
type |
a character indicating if the chains should be plotted as time series ("series"), or as density ("density"). |
burnin |
an integer indicating the number of MCMC steps to discard before plotting chains. |
dens.all |
a logical indicating if, in the case of multiple runs, the overall density of the different chains should be plotted in addition to individual densities. |
col |
a vector of colors to be used to plot different chains. |
lty |
a vector of integers specifying line types for the different chains. |
lwd |
same as |
main |
the title to be added to the plot. |
legend |
a logical indicating if a legend should be plotted for the different runs. |
posi |
a character string indicating the position of the legend (see
|
... |
further arguments to be passed to other functions. |
labels |
the labels to be used to name the nodes of the graph (cases). |
threshold |
the minimum support for ancestries to be plotted; 'support' is defined as the frequency of a given ancestor in the posterior distribution; defaults to 0.2. |
col.pal, edge.col.pal |
the color palette to be used for the edges (ancestries). |
curved.edges |
a logical indicating whether edges should be curved. |
annot |
a character indicating which information should be used to annotate the edges; this can be the distances between ancestors and descendents ("dist") and the posterior support for ancestries ("support"); if both are requested, fields will be concatenated. |
sep |
a character indicating the separator to be used when concatenating several types of annotation. |
thres.hide |
a threshold of posterior support for displaying ancestries; ancestries with less than this frequency in the posterior are hidden. |
col.edge.by |
a character string indicating which information should be used to color the edges ('dist': genetic distance; 'prob': support for the ancestry) |
cex.bubble |
a numeric value indicating the size factor for the bubbles representing the generation time distribution. |
edge.max.dist |
a number indicating the threshold distance bounding the color palette used for the edges; useful to avoid showing edges corresponding to distances larger than a given number. |
lwd.arrow |
a numeric value indicating the size factor for the arrows. |
xlim |
the limits of the X axis; if NULL, determined from the data. |
plotChains
is used for plotting MCMCs
transGraph
plots a graph of inferred ancestries
plotOutbreak
attempts to synthetize the reconstruction of small
outbreaks
Thibaut Jombart t.jombart@imperial.ac.uk
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | data(fakeOutbreak)
attach(fakeOutbreak)
## examine MCMC
plotChains(res)
plotChains(res,type="dens")
plotChains(res,type="dens", what="mu1", burnin=2e4)
## represent posterior ancestries
transGraph(res, annot="", main="Posterior ancestries")
transGraph(res, annot="", main="Posterior ancestries - support > 0.5",
threshold=0.5)
if(require(adegenet)){
transGraph(res, annot="", main="Posterior ancestries - support > 0.01",
threshold=0.01, col.pal=spectral)
}
## summary plot
plotOutbreak(res,cex.bubble=0.5, thres.hide=0.5,
main="Outbreak reconstruction")
detach(fakeOutbreak)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.