def dict_genes(mer_genes_links_file):
    """Creates a dictionary of type {gene_name:gene_id, }

    :param mer_genes_links_file: .tsv file with one gene name and respective gene ID per line
    :return: dict of type {gene_name:gene_id, }
    """

    lexicon = open(mer_genes_links_file, 'r', encoding = 'utf-8')
    lexicon_names_id = lexicon.readlines()
    lexicon.close()

    dict_gene_name_id = {}

    for gene_name_id in lexicon_names_id:

        dict_gene_name_id[gene_name_id.split('\t')[0]] = gene_name_id.split('\t')[1][:-1]

    return dict_gene_name_id