def _find_metaclusters(clus_obj, sequence2clusters, current_seq, min_seqs):
seen = defaultdict(int)<EOL>metacluster = defaultdict(set)<EOL>c_index = len(sequence2clusters)<EOL>logger.info("<STR_LIT>" % c_index)<EOL>meta_idx = <NUM_LIT:1><EOL>bar = ProgressBar(maxval=c_index)<EOL>bar.start()<EOL>bar.update()<EOL>for itern, name in enumerate(sequence2clusters):<EOL><INDENT>clusters = sequence2clusters[name]<EOL>if len(clusters) == <NUM_LIT:0>:<EOL><INDENT>c_index -= <NUM_LIT:1><EOL>continue<EOL><DEDENT>current_seq[name].align = <NUM_LIT:1><EOL>meta_idx += <NUM_LIT:1><EOL>bar.update(itern)<EOL>already_in = _common(clusters, seen)<EOL>_update(clusters, meta_idx, seen)<EOL>metacluster[meta_idx] = metacluster[meta_idx].union(clusters)<EOL>if already_in:<EOL><INDENT>for seen_metacluster in already_in:<EOL><INDENT>clusters2merge = metacluster[seen_metacluster]<EOL>metacluster[meta_idx] = metacluster[meta_idx].union(clusters2merge)<EOL>_update(clusters2merge, meta_idx, seen)<EOL>del metacluster[seen_metacluster]<EOL><DEDENT><DEDENT><DEDENT>logger.info("<STR_LIT>" % (len(metacluster), c_index))<EOL>return metacluster, seen<EOL>
Mask under same id all clusters that share sequences
:param clus_obj: cluster object coming from detect_cluster
:param min_seqs: int cutoff to keep the cluster or not. 10 as default

:return: updated clus_obj and dict with seq_id: cluster_id