Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return NotImplemented
class Rank(OrderedEnum):
NO_RANK = 7
SPECIES = 6
GENUS = 5
FAMILY = 4
ORDER = 3
CLASS = 2
PHYLUM = 1
KINGDOM = 0
str2rank = {
'species': Rank.SPECIES,
'genus': Rank.GENUS,
'family': Rank.FAMILY,
'order': Rank.ORDER,
'class': Rank.CLASS,
'phylum': Rank.PHYLUM,
'kingdom': Rank.KINGDOM,
'no rank': Rank.NO_RANK
}
def build_complete_tree(tree, log):
"""Build the taxonomic tree including internal nodes (for rank dependent evaluation)
Args:
tree (fileobject): file name of the reference tree, without internal nodes
log (fileobject): log file