fhcrc / taxtastic

Create and maintain phylogenetic "reference packages" of biological sequences.
GNU General Public License v3.0
21 stars 10 forks source link

Update TaxNode.from_taxtable classmethod to include logic for support of unordered ranks #142

Closed dhoogest closed 3 years ago

dhoogest commented 3 years ago

It appears that TaxNode.from_taxtable (and possibly other TaxNode methods) were overlooked when applying modifications in this PR, where support for new 'unordered' NCBI ranks was added. As a consequence, invocations of TaxNode.from_taxtable from packages such as https://github.com/fhcrc/deenurp/blob/070-python3/deenurp/subcommands/filter_outliers.py#L497 fail when parsing a taxtable that contains unordered ranks.

Attached csv contains a taxtable which is suitable for testing. taxonomy.csv

See also https://gitlab.labmed.uw.edu/molmicro/airflow/-/issues/22

crosenth commented 3 years ago

From TaxNode.from_taxtable

valueerror

Traces back to this circular lineage in the taxonomy.csv:

circular_lineage

NCBI has since corrected the lineage so, hopefully, everything should work again

https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=1338369