def _split_cluster(c, pairs, n):
old = c[p[<NUM_LIT:0>]]<EOL>new = c[p[<NUM_LIT:1>]]<EOL>new_c = cluster(n)<EOL>common = set(_get_seqs(old)).intersection(_get_seqs(new))<EOL>for idl in old.loci2seq:<EOL><INDENT>in_common = list(set(common).intersection(old.loci2seq[idl]))<EOL>if len(in_common) > <NUM_LIT:0>:<EOL><INDENT>logger.debug("<STR_LIT>" % (len(in_common)))<EOL>new_c.add_id_member(in_common, idl)<EOL>old.loci2seq[idl] = list(set(old.loci2seq[idl]) - set(common))<EOL>logger.debug("<STR_LIT>" % (len(old.loci2seq)))<EOL><DEDENT><DEDENT>for idl in new.loci2seq:<EOL><INDENT>in_common = list(set(common).intersection(new.loci2seq[idl]))<EOL>if len(in_common) > <NUM_LIT:0>:<EOL><INDENT>logger.debug("<STR_LIT>" % (len(in_common)))<EOL>new_c.add_id_member(in_common, idl)<EOL>new.loci2seq[idl] = list(set(new.loci2seq[idl]) - set(common))<EOL>logger.debug("<STR_LIT>" % (len(new.loci2seq)))<EOL><DEDENT><DEDENT>old.update()<EOL>new.update()<EOL>old.loci2seq = {k: v for k, v in old.loci2seq.iteritems() if len(v) > <NUM_LIT:0>}<EOL>new.loci2seq = {k: v for k, v in new.loci2seq.iteritems() if len(v) > <NUM_LIT:0>}<EOL>c[n] = new<EOL>c[p[<NUM_LIT:0>]] = old<EOL>c[p[<NUM_LIT:1>]] = new<EOL>return c<EOL>
split cluster by exclussion