Description Usage Arguments Note Author(s) See Also Examples
This function plots support values on phylogenetic trees drawn with plot.phylo
. Support values above a given cut-off value can be depicted as numbers, colored dots, or thickened branches.
1 2 |
x |
A vector of mode |
transfer |
A list containing the two objects of class |
cutoff |
A numeric, only support values >= |
digits |
an integer giving the number of digits (see |
mode |
Either |
font |
Fonts to be used for if |
pos |
Position of text if |
cex |
A numeric giving font size, dot size, or thickness of braches depending on the choice of the |
col |
A character string, giving one or more colors, depending on the choice of the |
legend |
Logical, if |
node |
A vector of integers giving the number of nodes for which support will displayed; default is all interior nodes. |
... |
Further graphical parameters (from |
node.support
requires a previous call of plot.phylo
in order to work.
The transfer
argument has worked well with example cases I could think of, but has not been tested thoroughly with real data, so be careful and double-check the resulting output.
Natalie Cusimano, modified by Christoph Heibl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | # phylogenetic tree of wild barley
# --------------------------------
data(hordeum)
hordeum$tip.label <- gsub("H[a-z]+", "H._", hordeum$tip.label)
# plot tree and posterior node support
# settingchange color, cut-off, and position:
# -------------------------------------------
plot(hordeum)
node.support(hordeum$posterior, cutoff = 0.9, pos = "right",
col = "red")
# you can display up to three support values:
# -------------------------------------------
plot(hordeum)
node.support(hordeum $posterior, cutoff = 0.9, pos = "right",
col = "red", font = 2)
node.support(hordeum $posterior, cutoff = 0.9, pos = "above",
col = "blue", font = 1)
node.support(hordeum $posterior, cutoff = 0.9, pos = "below",
col = "green", font = 3)
# the pretty option of the position argument:
# -------------------------------------------
plot(hordeum)
node.support(hordeum $posterior, pos = "pretty")
# display support as colored nodes ...
# ...by omitting nodes below threshold
# ------------------------------------
plot(hordeum)
node.support(hordeum $posterior, cutoff = 0.9, mode = "dots",
col = "black")
# ... or with two colors:
# -----------------------
plot(hordeum)
node.support(hordeum $posterior, cutoff = 0.9, mode = "dots",
col = c("black", "red"))
# display support as bold edges:
# ------------------------------
plot(hordeum)
node.support(hordeum $posterior, cutoff = 0.9, mode = "edges",
col = "black", cex = 5)
# display support values from a different source tree
# on a target tree:
# -----------------
data(vipera)
# plot maximum likelyhood tree and add
# bootstrap values from the same tree:
# ------------------------------------
plot(vipera.ml)
node.support(vipera.ml$node.label, pos = "above")
# now transfer posterior probabilities
# from a Bayesian tree:
# ---------------------
node.support(vipera.bayes$node.label,
transfer = list(vipera.bayes, vipera.ml), pos = "below")
# this would have been the result without
# using the transfer argument:
# ----------------------------
node.support(vipera.bayes$node.label, col = "red", pos = "right")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.