branch_taxid2name: Replace tax_id with name

View source: R/ncbitree.R

branch_taxid2nameR Documentation

Replace tax_id with name

Description

Converts vectors of tax_id to vectors of names, or vice versa.

Usage

branch_taxid2name(branch.lst, names.dmp)

Arguments

branch.lst

a list of branches.

names.dmp

a names.dmp table.

Details

This function is used to convert the tax_id's to name_txt's in a branch-list, or vice versa. See branch_retrieve for more about branch-lists.

branch_taxid2name: The names.dmp$name_txt may contain many names for each tax_id, and the argument name.class is used to select the type of name to use from the column names.dmp$name_class.

branch_name2taxid: The matching of names is exact (using match), which means only the first occurrence of the name_txt is used. You are responsible for using a names.dmp with unique texts in names.dmp$name_txt.

See read_names_dmp for more about names.dmp tables.

Value

A list containing named vectors of either texts (branch_taxid2name) or integers (branch_name2taxid), from the root to the leaf of each branch. The name of each element is its rank.

Author(s)

Lars Snipen.


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