The aphylo class tree holds both the tree structure represented as a partially ordered phylogenetic tree, and node annotations. While annotations are included for both leafs and inner nodes, the algorithms included in this package only uses the leaf annotations.
new_aphylo(tree, tip.annotation,...)## S3 method for class 'phylo'new_aphylo( tree, tip.annotation, node.annotation =NULL, tip.type =NULL, node.type =NULL,...)
Arguments
tree: An object of class phylo
tip.annotation, node.annotation: Annotation data. See aphylo .
...: Further argmuents passed to the method.
tip.type, node.type: Integer vectors with values 0 or 1. 0 denotes duplication node and 1 speciation node. This is used in LogLike .
Returns
A list of class aphylo with the following elements: - tree: An object of class phylo .
tip.annotation: An integer matrix. Tip (leaf) nodes annotations.
node.annotation: An integer matrix (optional). Internal nodes annotations.
offspring: A list. List of offspring of each node.
pseq: Integer vector. The pruning sequence (postorder).
reduced_pseq: Integer vector. The reduced version of pseq.
Ntips.annotated: Integer. Number of tips with annotations.
tip.type: Binary of length ape::Ntip(). 0 means duplication and 1 speciation.
tip.type: Binary of length ape::Nnode(). 0 means duplication and 1 speciation.
Examples
# A simple example ----------------------------------------------------------data(fakeexperiment)data(faketree)ans <- new_aphylo(fakeexperiment[,2:3], tree = as.phylo(faketree))# We can visualize itplot(ans)
See Also
Other Data management functions: aphylo_from_data_frame()