branch_retrieve: Retrieves branches

View source: R/ncbitree.R

branch_retrieveR Documentation

Retrieves branches

Description

Retrieves branches in the taxonomy tree.

Usage

branch_retrieve(leaf_tax_id, nodes.dmp)

Arguments

leaf.tax.id

a vector of tax_id (integers) of the branch leaf/leaves.

nodes.dmp

a nodes.dmp table.

Details

This function retrieves the branch from the taxonomy tree that ends at the leaf.tax.id and starts at the root of tree defined in the table nodes.dmp (see read_nodes_dmp).

NB! Only the root node in nodes.dmp must have its own tax_id as parent_tax_id! This is the criterion for ending a branch.

Multiple leaves may be given as argument, resulting in multiple branches retrieved.

Value

A branch list, which is simply a list containing named vectors of tax_id integers, from the root to the leaf of each branch. The name of each element is its rank. You may replace the tax_id integers by the taxon names using branch_taxid2name.

Author(s)

Lars Snipen.

See Also

branch_taxid2name, subset_clade.


larssnip/microclass documentation built on Nov. 1, 2023, 2:39 p.m.