map_posterior_distribution: Analyses a set of trees regarding to a specific tree and...

View source: R/map_posterior_distribution.R

map_posterior_distributionR Documentation

Analyses a set of trees regarding to a specific tree and output an object that can be used by many other functions of this package

Description

This function will compared the trees against the base_tree and return an object that can be used with plot_distribution_chart to plot the posterior distribution for dwelling times and number of transistions on a particular node and plot_distribution_tree, which plots the posterior distribution in the entire tree.

Usage

map_posterior_distribution(base_tree, trees, scale.branches=TRUE
                                    , scale.trees=FALSE, parallel=TRUE)

Arguments

base_tree

A single tree, result of the function sfreemap;

trees

A multiPhylo object, result of sfreemap execution

scale.branches

Whether the function should scale the dwelling times to the branch length, resulting in a proportion of the time instead of an absolute value (the expected number of transitions is not scaled).

scale.trees

A value representing the maximum height to scale the tree, or FALSE if the trees should not be scaled.

parallel

Whether the function should run in parallel (defaults to TRUE)

Value

A named list with three items:

  • emr for expected markov reward (the dwelling times for states) and lmt for the labelled markov transitions (the expected number of state transitions).

    Each criteria (emr and lmt) is composed by an array three dimentions, like this: $emr[trees, states, nodes]$.

    This structure represent the corresponding value for each node and state on each tree in trees when compared o base_tree. When a node from base_tree has no match, the corresponding state values will be set to NA.

  • base_tree the original base_tree given as argument. This is useful for the functions that use the result of this function, cited in the description.

Author(s)

Diego Pasqualin dpasqualin@inf.ufpr.br

See Also

sfreemap

Examples

    sm <- sfreemap(sfreemap.corals.trees, sfreemap.corals.tips, parallel=FALSE)
    map <- map_posterior_distribution(sm[[1]], sm, parallel=FALSE)
    p <- plot_distribution_chart(map, 160)
    print(p)

dpasqualin/sfreemap documentation built on July 5, 2023, 10:52 a.m.