build_ncbi: Rebuild the NCBI Taxonomy snapshot

View source: R/build_ncbi.R

build_ncbiR Documentation

Rebuild the NCBI Taxonomy snapshot

Description

Rebuild the NCBI Taxonomy snapshot

Usage

build_ncbi(
  version = format(Sys.Date(), "%Y"),
  archive = NULL,
  dir = build_dir(),
  db = td_connect()
)

Arguments

version

snapshot version to write, e.g. "2026"

archive

path to the NCBI taxdump.tar.gz; downloaded if missing

dir

directory for build inputs and outputs

db

a duckdb connection

Details

NCBI distributes nodes.dmp (the hierarchy) and names.dmp (every name), in a format that claims to be tab-separated but delimits fields with ⁠\\t|\\t⁠.

Every row of names.dmp carries the tax_id of the accepted taxon, whatever the name's class: NCBI mints no separate identifier for a synonym. So the ⁠scientific name⁠ rows become the accepted names, carrying a taxonID and pointing acceptedNameUsageID at themselves, and every other name class becomes a row for the same taxon with a NULL taxonID – which the taxadb rules permit, since there is no identifier to give.

Value

the paths written, invisibly

See Also

Other build: build_col(), build_fishbase(), build_gbif(), build_itis(), build_ott()

Examples

## Not run: 
build_ncbi("2026")

## End(Not run)

taxadb documentation built on Aug. 31, 2026, 5:07 p.m.