def shared_otuids(groups):
for g in sorted(groups):<EOL><INDENT>print("<STR_LIT>".format(g, len(groups[g].results["<STR_LIT>"])))<EOL><DEDENT>number_of_categories = len(groups)<EOL>shared = defaultdict()<EOL>for i in range(<NUM_LIT:2>, number_of_categories+<NUM_LIT:1>):<EOL><INDENT>for j in combinations(sorted(groups), i):<EOL><INDENT>combo_name = "<STR_LIT>".join(list(j))<EOL>for grp in j:<EOL><INDENT>shared[combo_name] = groups[j[<NUM_LIT:0>]].results["<STR_LIT>"].copy()<EOL>"""<STR_LIT>"""<EOL>for grp in j[<NUM_LIT:1>:]:<EOL><INDENT>shared[combo_name].intersection_update(groups[grp].results["<STR_LIT>"])<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return shared<EOL>
Get shared OTUIDs between all unique combinations of groups.

:type groups: Dict
:param groups: {Category name: OTUIDs in category}

:return type: dict
:return: Dict keyed on group combination and their shared OTUIDs as values.