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 pseq.

Ntips.annotated

Integer. Number of tips with annotations.

tip.type

Binary of length Ntip(). 0 means duplication and 1 speciation.

tip.type

Binary of length Nnode(). 0 means duplication and 1 speciation.

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)

[Package aphylo version 0.3-3 Index]