def newick_replace_otuids(tree, biomf):
for val, id_, md in biomf.iter(axis="<STR_LIT>"):<EOL><INDENT>otu_loc = find_otu(id_, tree)<EOL>if otu_loc is not None:<EOL><INDENT>tree = tree[:otu_loc] +oc.otu_name(md["<STR_LIT>"]) +tree[otu_loc + len(id_):]<EOL><DEDENT><DEDENT>return tree<EOL>
Replace the OTU ids in the Newick phylogenetic tree format with truncated
OTU names