ncbi_taxonomy.taxon_id_lineages
import bedrock_bio as bb
rel = bb.load_table('ncbi_taxonomy.taxon_id_lineages')
df = rel.limit(5).pl() # Polars
df = rel.limit(5).df() # Pandas
df.head()| sources | taxon_id | ancestor_taxon_ids | |
|---|---|---|---|
| 0 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/pub/tax... | 1 | [] |
| 1 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/pub/tax... | 10 | [131567, 2, 3379134, 1224, 1236, 1706369, 1706... |
| 2 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/pub/tax... | 100 | [131567, 2, 3379134, 1224, 28211, 356, 335928,... |
| 3 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/pub/tax... | 100000 | [131567, 2, 3379134, 1224, 28216, 80840, 75682... |
| 4 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/pub/tax... | 1000000 | [131567, 2, 1783272, 201174, 1760, 85006, 8502... |
library(bedrockbio)
lf <- load_table("ncbi_taxonomy.taxon_id_lineages")
df <- head(lf, 5) |> collect()
head(df)Sample output (5 rows, showing 1 of 3 columns) taxon_id -------- 0 1 1 10 2 100 3 100000 4 1000000
Description
Section titled “Description”Full NCBI Taxonomy ID lineages, one row per taxon.
Partitions
Section titled “Partitions”Not partitioned.
Schema
Section titled “Schema”| Column | Type | Description |
|---|---|---|
sources |
STRUCT(url TEXT, filename TEXT, last_modified_at TIMESTAMPTZ, sha256 TEXT)[] |
Source provenance for the row. |
taxon_id |
TEXT |
Taxonomy ID for the node. |
ancestor_taxon_ids |
TEXT[] |
Ancestor taxonomy IDs, split from NCBI’s space-delimited lineage in order from the root to the parent. Empty for root nodes. |