def _get_annotation(c, loci):
data_ann_temp = {}<EOL>data_ann = []<EOL>counts = Counter()<EOL>for lid in c.loci2seq:<EOL><INDENT>for dbi in list(loci[lid].db_ann.keys()):<EOL><INDENT>data_ann_temp[dbi] = {dbi: [loci[lid].db_ann[dbi].ann[x].name for x in list(loci[lid].db_ann[dbi].ann.keys())]}<EOL>logger.debug("<STR_LIT>" % (dbi, data_ann_temp[dbi]))<EOL>counts[dbi] += <NUM_LIT:1><EOL><DEDENT>data_ann = data_ann + [data_ann_temp[x] for x in list(data_ann_temp.keys())]<EOL>logger.debug("<STR_LIT>" % data_ann)<EOL><DEDENT>counts = {k: v for k, v in counts.iteritems()}<EOL>total_loci = sum([counts[db] for db in counts])<EOL>valid_ann = [k for k, v in counts.iteritems() if up_threshold(v, total_loci, <NUM_LIT>)]<EOL>return data_ann, valid_ann<EOL>
get annotation of transcriptional units