aphylo-class {aphylo} | R Documentation |
Annotated Phylogenetic Tree
Description
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.
Usage
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,1. 0 denotes duplication node and 1 speciation node. This is used in LogLike. |
Value
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 |
Ntips.annotated |
Integer. Number of tips with annotations. |
tip.type |
Binary of length |
tip.type |
Binary of length |
See Also
Other Data management functions:
aphylo_from_data_frame()
Other aphylo methods:
aphylo-methods
Examples
# A simple example ----------------------------------------------------------
data(fakeexperiment)
data(faketree)
ans <- new_aphylo(fakeexperiment[,2:3], tree = as.phylo(faketree))
# We can visualize it
plot(ans)