Learn R Programming

rotl (version 0.5.0)

tol_subtree: Extract a subtree from the synthetic tree

Description

Extract a subtree from the synthetic tree from an ott id.

Usage

tol_subtree(ott_id = NULL, tree_id = NULL, file, ...)

Arguments

ott_id
the ott id of the node in the tree that should serve as the root of the tree returned.
tree_id
the identifier for the synthesis tree. Currently a single draft tree is supported, so this argument is superfluous and may be safely ignored.
file
if specified, the function will write the subtree to a file in newick format.
...
additional arguments to customize the API call (see rotl for more information).

Value

  • If no value is specified to the file argument (default), a phyogenetic tree of class phylo.

    Otherwise, the function returns invisibly a logical indicating whether the file was successfully created.

Details

Return a complete subtree of the draft tree descended from some specified node. The node to use as the start node may be specified using an ott id. If the specified node is not in the synthetic tree (or is entirely absent from the graph), an error will be returned.

Examples

Run this code
res <- tol_subtree(ott_id=81461)

Run the code above in your browser using DataLab