Description Usage Arguments Details Examples
A function to process the output from hisse::MarginReconMuHiSSE
. First we get model averaged rates for tips and nodes of the phylogeny and probabilities from the ancestral reconstruction of character states. Then convert the tree from phylo
format into a treedata
class and assign the data.frame of mode-averaged rates to the @data
slot. We output the node and tip rates tables and the reformated tree object for downstream plotting with ggtree
and ggplot
.
1 | m_process_recon(muhisse_recon)
|
muhisse_recon |
An object produced by |
Internally, the probabilities for individual states (00, 01, 10, 11) are converted into prob_0x
giving the probability for the first character being 0, and prob_x0
giving the probability of the second character being 0. This way we can plot in terms of a 'focal character', i.e., we can plot the rate on the y axis and the probability of being 0 for the 'focal character' on the x axis while color-coding by the states of both characters.
#'@return A list with three components:
tree_data
the phylogeny with associated data object with reconstructed ancestral, model-averaged node and tip states and rates
tip_rates/node_rates
a tibble of reconstructed ancestral, model-averaged tip/node states and rates.
1 2 3 4 5 | data("diatoms")
processed_muhisse <- m_process_recon(muhisse_recon=diatoms$muhisse_recon)
processed_muhisse$tip_rates
processed_muhisse$node_rates
processed_muhisse$tree_data
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.