paint.edges: Paint tree edges based on species regimes

Description Usage Arguments Value Author(s) References Examples

View source: R/phylocurve.R

Description

This function estimates the proportion of edges to be assigned to regimes based on ancestral regime reconstruction (Yang et al. 1995; Pupko et al. 2000; Paradis et al. 2004; Revell 2012).

Usage

1
paint.edges(tree, species.groups, average.nodes = TRUE, root.edge = TRUE)

Arguments

tree

An object of class phylo.

species.groups

A named factor assigning species to regimes.

average.nodes

Whether or not to average reconstructed probabilities of regime states from parent and daughter nodes for tree edges.

root.edge

Whether or not to return a root edge.

Value

A matrix of dimension nedge-by-nregimes. NOTE: edges are in postorder.

Author(s)

Eric W. Goolsby

References

Paradis E., Claude J., Strimmer K. 2004. APE: analyses of phylogenetics and evolution in R language. Bioinformatics. 20:289.290.

Pupko T., Pe'er I., Shamir R., Graur D. 2000. A fast algorithm for joint reconstruction of ancestral amino acid sequences. Molecular Biology and Evolution. 17:890-896.

Yang Z., Kumar S., Nei, M. 1995. A new method of inference of ancestral nucleotide and amino acid sequences. Genetics. 141:1641-1650.

Examples

1
2
3
4
require(ape)
tree <- rtree(n=10)
groups <- setNames(factor(c(rep("groupA",5),rep("groupB",5))),tree$tip.label)
painted.edges <- paint.edges(tree = tree,species.groups = groups)

ericgoolsby/phylocurve documentation built on April 28, 2021, 10:23 p.m.