lineage
Behavior:
- Retrieves the lineage of a taxon from root to the specified term.
- Returns the full taxonomic hierarchy including all ranks.
- By default, outputs rank, scientific name, and taxonomy ID for each level.
Input:
- Accepts a single Taxonomy ID or scientific name.
- Use
--tsvfor tab-separated output format.
Output:
- Default output: rank, scientific_name, tax_id (tab-separated)
- TSV output: rank, scientific_name, tax_id (tab-separated)
- By default, output is written to standard output.
- Use
--outfileto write to a file instead.
Examples:
-
Get lineage for a species
nwr lineage 9606 -
Get lineage using scientific name
nwr lineage "Homo sapiens" -
Output as TSV
nwr lineage 9606 --tsv -
Write to file
nwr lineage 9606 -o lineage.txt