Learn R Programming

aphylo (version 0.3-3)

panther-tree: Reads PANTHER db trees

Description

The PANTHER Project handles a modified version of newick tree files which, besides of the tree structure, includes the type of node and ancestor labels. This function is a wrapper of ape::read.tree().

Usage

read_panther(x, tree.reader = ape::read.tree, ...)

read.panther(x, tree.reader = ape::read.tree, ...)

Value

A list consisting of a data.frame and a phylo object. The data.frame has the following columns:

branch_length

Numeric vector. Length of the branch to its parent node.

type

Character vector. Can be either "S" (speciation), "D" (duplication), or "T" (horizontal transfer).

ancestor

Character vector. Name of the ancestor.

The nodeids can be identified using the rownames.

Arguments

x

Character scalar. Full path to the panther file.

tree.reader

Function that will be used to read the tree file. It can be either ape::read.tree or rncl::read_newick_phylo.

...

Further arguments passed to ape::read.tree().

See Also

Other reading: read_nhx(), read_pli()

Examples

Run this code
path <- system.file("tree.tree", package="aphylo")
read_panther(path)

Run the code above in your browser using DataLab