Skip to main content

get-tax-info

Load NCBI taxonomy (names.dmp and nodes.dmp) into a SQLite database for lightning-fast hash-based lookups.

Features

  • Fast: Indexed SQLite queries for names, parents, and children.
  • Automatic: Downloads and converts NCBI data on first run.
  • Easy Storage: Uses standard user cache directories by default.
  • BUSCO Integration: Maps TaxIDs to the best BUSCO dataset for lineage analysis.

Installation

pip install get-tax-info

Configuration

Path resolution uses this precedence:

  1. Explicit constructor arguments (or AppConfig fields)
  2. Environment variables
  3. platformdirs.user_cache_dir("get-tax-info") defaults

Default cache locations (Linux example):

  • DB: ~/.cache/get-tax-info/taxdump.db
  • BUSCO json: ~/.cache/get-tax-info/busco_datasets.json

Supported environment variables:

  • GET_TAX_INFO_CACHE_DIR
  • GET_TAX_INFO_DB
  • GET_TAX_INFO_BUSCO_JSON
  • GET_TAX_INFO_BUSCO_DOWNLOADS
  • GET_TAX_INFO_TAXDUMP_TAR

Legacy fallback still supported for BUSCO downloads:

  • BUSCO_DOWNLOAD_PATH

Programmatic config for embedded usage:

from get_tax_info import AppConfig, GetTaxInfo, GetBusco

cfg = AppConfig.from_sources(
	cache_dir="/data/get-tax-info",
	busco_download_path="/data/busco_downloads",
)

gti = GetTaxInfo(config=cfg)
gb = GetBusco(config=cfg)

Python Usage

from get_tax_info import GetTaxInfo, TaxID

# Automatically download/init data on first use
gti = GetTaxInfo()

# Use the TaxID object (recommended)
t = gti.get_taxid_object(2590146)  # Ektaphelenchus kanzakii
print(t.scientific_name, t.rank)   # 'Ektaphelenchus kanzakii', 'species'

# Parents and children
parent = t.parent                  # <TaxID 483517 (Ektaphelenchus)>
children = parent.children          # List of TaxID objects

# Ancestor at specific rank
genus = t.tax_at_rank('genus')

CLI Usage

# Print effective resolved paths (useful in Docker/CI debugging)
get-tax-info show-config

# Get BUSCO dataset for a TaxID
get-tax-info taxid-to-busco-dataset --taxid 110

# Override cache/json paths explicitly (CLI args > env vars > defaults)
get-tax-info taxid-to-busco-dataset \
  --taxid 1597 \
  --cache_dir /data/get-tax-info \
  --busco_json_path /data/get-tax-info/busco_datasets.json \
  --busco_download_path /data/busco_downloads

# Add TaxID and BUSCO column to a CSV/TSV table
get-tax-info add-taxid-column table.tsv --sep ,

A complete demonstration of the BUSCO workflow (including Podman usage) can be found in demo_busco_workflow.sh.


Note: BUSCO dataset mapping requires pre-downloaded lineages. See get_busco.py for details.

Metadata

Release files for get-tax-info 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for get-tax-info 0.2.2
File Size Uploaded Provenance Actions
get_tax_info-0.2.2.tar.gz 11.8 kB Without provenance Details for get_tax_info-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for get-tax-info 0.2.2
File Interpreter ABI Platform Actions
get_tax_info-0.2.2-py3-none-any.whl Python 3 none any Details for get_tax_info-0.2.2-py3-none-any.whl

Total release size: 24.3 kB

Release files / get_tax_info-0.2.2.tar.gz

Download URL get_tax_info-0.2.2.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3dbab276819bfcf4cba68611d46e3fd55630a9ed82166e379aaebc3cf6a543ae
BLAKE2b-256 checksum
How to use checksums
c195d1189606cc7705aaf814db80d0a5549d1fde3eb85161bc2b6b11f1d5c459
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / get_tax_info-0.2.2-py3-none-any.whl

Download URL get_tax_info-0.2.2-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6aa433649ed9839f615a02804d1079dc250c645292432639404c7af547257af1
BLAKE2b-256 checksum
How to use checksums
3711b20dba6a1aee47f49597dc17fca978b15b7bae38fea8c36749bbfe9e9d73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for get-tax-info 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page