How to use the prophyle.prophyle_otu_table.Rank.SPECIES function in prophyle

To help you get started, we’ve selected a few prophyle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github prophyle / prophyle / prophyle / prophyle_otu_table.py View on Github external
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