Inputting into ncbi.get_rank() a list containing a taxid which has multiple ranks assigned to it returns for that taxid an empty dictionary, while in reality it should return at least something (either all the ranks or the lowest one).
This silently removes the taxid from the results, and hides the fact that actually a rank is assigned to that taxid (and actually multiple), which causes problems further in the custom code.
The problem is also partly responsible for the inconsistency seen in #707.
Steps to reproduce
returns
{1: 'no rank', 2: 'domain'} # dict with two values
while
ncbi.get_rank(["2588313"])
returns
Both of these should be returning a value from which we can see that at least some kind of a rank exists, which is not the case for the 2nd code snippet.
Similar result with "565624" as a test case.
Interestingly, the "2588313" in older NCBI taxonomy browser redirects to page for Arxotrichum gangligerum, where taxid is 2074836 and rank is mentioned as "species" (so completely different to what was returned).
Ideally, the lower level rank should be returned, or at least multiple of them. Also, the same procedure could be done for all descendants of a root tax node, then checked for multiple ranks being present and sent to NCBI for correction.
Inputting into
ncbi.get_rank()a list containing a taxid which has multiple ranks assigned to it returns for that taxid an empty dictionary, while in reality it should return at least something (either all the ranks or the lowest one).This silently removes the taxid from the results, and hides the fact that actually a rank is assigned to that taxid (and actually multiple), which causes problems further in the custom code.
The problem is also partly responsible for the inconsistency seen in #707.
Steps to reproduce
returns
while
returns
Both of these should be returning a value from which we can see that at least some kind of a rank exists, which is not the case for the 2nd code snippet.
Similar result with "565624" as a test case.
Interestingly, the "2588313" in older NCBI taxonomy browser redirects to page for Arxotrichum gangligerum, where taxid is 2074836 and rank is mentioned as "species" (so completely different to what was returned).
Ideally, the lower level rank should be returned, or at least multiple of them. Also, the same procedure could be done for all descendants of a root tax node, then checked for multiple ranks being present and sent to NCBI for correction.