@staticmethod<EOL><INDENT>def read(input_taxonomy_io):<DEDENT>
tax = {}<EOL>for line in input_taxonomy_io:<EOL><INDENT>if len(line.strip()) == <NUM_LIT:0>: continue <EOL>splits = line.split("<STR_LIT:\t>")<EOL>if len(splits) != <NUM_LIT:2>:<EOL><INDENT>raise MalformedGreenGenesTaxonomyException("<STR_LIT>" % line)<EOL><DEDENT>name = splits[<NUM_LIT:0>].strip()<EOL>taxonomy = [t.strip() for t in splits[<NUM_LIT:1>].split('<STR_LIT:;>')]<EOL>while len(taxonomy) > <NUM_LIT:0> and taxonomy[-<NUM_LIT:1>] == '<STR_LIT>':<EOL><INDENT>taxonomy = taxonomy[:-<NUM_LIT:1>]<EOL><DEDENT>for lineage in taxonomy:<EOL><INDENT>if lineage == '<STR_LIT>':<EOL><INDENT>raise MalformedGreenGenesTaxonomyException("<STR_LIT>" % line)<EOL><DEDENT><DEDENT>if name in tax:<EOL><INDENT>raise DuplicateTaxonomyException("<STR_LIT>" % name)<EOL><DEDENT>tax[name] = taxonomy<EOL><DEDENT>return GreenGenesTaxonomy(tax)<EOL>
Parse in a taxonomy from the given I/O.

        Parameters
        ----------
        input_taxonomy_io: io
            an open io object that is iterable. This stream is neither opened
            nor closed by this method

        Returns
        -------
        A GreenGenesTaxonomy instance with the taxonomy parsed in

        Raises
        ------
        DuplicateTaxonomyException: if there is duplicate taxonomy entries
        MalformedGreenGenesTaxonomyException: if there is something else amiss