def write_fasta(trans_groups, wd):
    """
    Writes the translations in `trans_dict` to a fasta_file in `wd`.
    :param trans_groups: dictionary mapping translations to their
    associated GeneIDs
    :param wd: the temporary working directory for phameration
    :return:
    """
    print('Begin writing genes to fasta...')
    fasta = open(f'{wd}/input.fasta', 'w')
    for translation in trans_groups.keys():
        fasta.write(f'>{trans_groups[translation][0]}\n{translation}\n')
    fasta.close()
