Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ __pycache__/
dist
htmlcov/
ncbitax2lin.egg-info/
build
2 changes: 1 addition & 1 deletion ncbitax2lin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""__init__.py for this project"""

__version__ = "2.0.2"
__version__ = "2.4.1"
10 changes: 9 additions & 1 deletion ncbitax2lin/data_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,17 @@ def read_names_and_nodes(names_file: str, nodes_file: str) -> pd.DataFrame:

def write_lineages_to_disk(df_lineages: pd.DataFrame, output_path: str) -> None:
"""Gzip lineages and write them to disk"""
# superkingdom has been renamed to domain in
# https://ncbiinsights.ncbi.nlm.nih.gov/2024/06/04/changes-ncbi-taxonomy-classifications/
domain_col = "domain"

# For backwards compatibility with older taxdumps.
if "superkingdom" in df_lineages:
domain_col = "superkingdom"

cols = [
"tax_id",
"superkingdom",
domain_col,
"phylum",
"class",
"order",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ncbitax2lin"
version = "2.3.1"
version = "2.4.1"
description = "A tool that converts NCBI taxonomy dump into lineages"
authors = ["Zhuyi Xue <zhuyi.xue@alum.utoronto.ca>"]
readme = "README.md"
Expand Down
3 changes: 2 additions & 1 deletion tests/test___init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""tests for __init__.py"""

# pylint: disable=protected-access, missing-function-docstring
from ncbitax2lin import __version__


def test_version() -> None:
assert __version__ == "2.0.2"
assert __version__ == "2.4.1"