Plots a random distinct rate shift configuration sampled by
BAMM
on a phylogeny.
# S3 method for bammshifts
plot(
x,
ephy,
method = "phylogram",
pal = "RdYlBu",
rank = NULL,
index = NULL,
spex = "s",
legend = TRUE,
add.freq.text = TRUE,
logcolor = FALSE,
breaksmethod = "linear",
color.interval = NULL,
JenksSubset = 20000,
...
)
An object of class bammshifts
.
An object of class bammdata
.
A character string for which plotting method to use. "phylogram" uses rectangular coordinates. "polar" uses polar coordinates.
The color palette to use in plot.bammdata
.
The rank of the core shift configuration to plot. For the
default (NULL
) a random configuration is chosen.
The posterior sample to plot. For the default (NULL
)
a random sample is chosen.
A character string indicating what type of macroevolutionary
rates should be plotted. "s" (default) indicates speciation rates, "e"
indicates extinction rates, and 'netdiv' indicates net diversification
rates. Ignored if ephy$type = "trait"
.
Logical indicating whether to plot a legend.
A logical indicating whether the frequency of each sampled shift configuration should be added to each plot.
Logical. Should colors be plotted on a log scale.
Method used for determining color breaks. See help
file for assignColorBreaks
.
Min and max value for the mapping of rates. One of
the two values can be NA
. See details in
plot.bammdata
for further details.
If breaksmethod = "jenks"
, the number of
regularly-spaced samples to subset from the full rates vector. Only
relevant for large datasets. See help file for
assignColorBreaks
.
Other arguments to plot.bammdata
.
Mike Grundler, Dan Rabosky
A rate shift configuration is the set of nodes of the phylogeny
where a shift occurs in the macroevolutionary rate dynamic of
diversification or trait evolution. Each posterior sample is a
potentially distinct rate shift configuration. Different
configurations may imply different macroevolutionary scenarios. This
function helps visualize the different distinct rate shift
configurations sampled by BAMM
.
A core shift configuration is defined by a set of nodes that have
shift probabilities that are substantially elevated relative to what
you expect under the prior alone. These core configurations are
inferred in distinctShiftConfigurations
. It is almost
certain that more than one core shift configuration will be sampled by
BAMM
. Moreover, each core shift configuration may contain many
subconfigurations. A subconfiguration contains the core shift node
configuration and zero or more additional shift nodes that occur with
low marginal probability.
Points are added to the branches subtending the nodes of each rate configuration. The size of the point is proportional to the marginal probability that a shift occurs on a specific branch. If the instantaneous rate at a shift's origin represents an initial increase above the ancestral instantaneous rate the point is red. If the instantaneous rate at a shift's origin represents an initial decrease below the ancestral instantaneous rate the point is blue.
distinctShiftConfigurations
,
plot.bammdata
data(whales, events.whales)
ed <- getEventData(whales, events.whales, burnin=0.25, nsamples=500)
sc <- distinctShiftConfigurations(ed, expectedNumberOfShifts = 1,
threshold = 5)
plot(sc, ed)
Run the code above in your browser using DataLab