def taxTree(taxdict):
<EOL>for rank in taxdict.taxonomy:<EOL><INDENT>current_level = float(taxdict.taxonomy.index(rank))<EOL>clades = taxdict.hierarchy[rank]<EOL>for clade in clades:<EOL><INDENT>cladeidents, cladename = clade<EOL>cladeidents = [e for e in cladeidents if e.ident]<EOL>if len(cladeidents) < <NUM_LIT:2>:<EOL><INDENT>continue<EOL><DEDENT>cladename = '<STR_LIT>'.format(cladename, rank)<EOL>cladestring = stringClade(cladeidents, cladename, current_level)<EOL>cladeidents[<NUM_LIT:0>].change(ident=cladestring, rank=rank)<EOL>for e in cladeidents[<NUM_LIT:1>:]:<EOL><INDENT>e.change(ident='<STR_LIT>', rank=rank)<EOL><DEDENT><DEDENT><DEDENT>if len(taxdict.hierarchy[taxdict.taxonomy[-<NUM_LIT:1>]]) > <NUM_LIT:1>:<EOL><INDENT>clade = [e[<NUM_LIT:0>] for e in taxdict.hierarchy[taxdict.taxonomy[-<NUM_LIT:1>]]]<EOL>cladeidents = sum(clade, [])<EOL>cladeidents = [e for e in cladeidents if e.ident]<EOL>cladestring = stringClade(cladeidents, '<STR_LIT>', current_level+<NUM_LIT:1>)<EOL><DEDENT>return cladestring + '<STR_LIT:;>'<EOL>
Return taxonomic Newick tree