panther-tree function

Reads PANTHER db trees

Reads PANTHER db trees

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().

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

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().

Returns

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.

Examples

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

See Also

Other reading: read_nhx(), read_pli()

  • Maintainer: George Vega Yon
  • License: MIT + file LICENSE
  • Last published: 2024-12-03