def get_ids(a):
a_id = '<STR_LIT>' % (a.rsplit('<STR_LIT:.>', <NUM_LIT:1>)[<NUM_LIT:0>])<EOL>a_id_lookup = '<STR_LIT>' % (a.rsplit('<STR_LIT:.>', <NUM_LIT:1>)[<NUM_LIT:0>])<EOL>if check(a_id) is True:<EOL><INDENT>return a_id, a_id_lookup<EOL><DEDENT>a_id_f = open(a_id, '<STR_LIT:w>')<EOL>a_id_lookup_f = open(a_id_lookup, '<STR_LIT:w>')<EOL>ids = []<EOL>for seq in parse_fasta(open(a)):<EOL><INDENT>id = id_generator() <EOL>while id in ids:<EOL><INDENT>id = id_generator() <EOL><DEDENT>ids.append(id)<EOL>header = seq[<NUM_LIT:0>].split('<STR_LIT:>>')[<NUM_LIT:1>]<EOL>name = remove_bad(header)<EOL>seq[<NUM_LIT:0>] = '<STR_LIT>' % (id, header)<EOL>print('<STR_LIT:\n>'.join(seq), file=a_id_f)<EOL>print('<STR_LIT>' % (id, name, header), file=a_id_lookup_f)<EOL><DEDENT>return a_id, a_id_lookup<EOL>
make copy of sequences with short identifier