CVUA-RRW / taxidtools

Python library to deal with taxonomic IDs and lineages from the NCBI's Taxdump files
https://cvua-rrw.github.io/taxidtools/
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Add support for merged and deleted nodes #5

Closed gregdenay closed 5 months ago

gregdenay commented 5 months ago

The information present in the delnodes.dmp and merged.dmp files should be (optionaly?) leveraged by the ncbi constructor to:

Test cases: 2923454 should point to 89248 (Equus quagga) Any taxid in delnodes should raise anerror

This could be implemented by introducing new BaseNode subclasses. The Taxonomy __getitem__ method could then check the BaseNode subclass and return the correct object (redirected to another Node for merged nodes or raise anerror for deleted nodes)

gregdenay commented 5 months ago

deletednodes currently throw an InvalidNodeError, which is the desired behaviour