def get_mim_genes(genemap_lines, mim2gene_lines):
LOG.info("<STR_LIT>")<EOL>genes = {}<EOL>hgnc_genes = {}<EOL>gene_nr = <NUM_LIT:0><EOL>no_hgnc = <NUM_LIT:0><EOL>for entry in parse_mim2gene(mim2gene_lines):<EOL><INDENT>if '<STR_LIT>' in entry['<STR_LIT>']:<EOL><INDENT>mim_nr = entry['<STR_LIT>']<EOL>gene_nr += <NUM_LIT:1><EOL>if not '<STR_LIT>' in entry:<EOL><INDENT>no_hgnc += <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>genes[mim_nr] = entry<EOL><DEDENT><DEDENT><DEDENT>LOG.info("<STR_LIT>", str(no_hgnc))<EOL>for entry in parse_genemap2(genemap_lines):<EOL><INDENT>mim_number = entry['<STR_LIT>']<EOL>inheritance = entry['<STR_LIT>']<EOL>phenotype_info = entry['<STR_LIT>']<EOL>hgnc_symbol = entry['<STR_LIT>']<EOL>hgnc_symbols = entry['<STR_LIT>']<EOL>if mim_number in genes:<EOL><INDENT>genes[mim_number]['<STR_LIT>'] = inheritance<EOL>genes[mim_number]['<STR_LIT>'] = phenotype_info<EOL>genes[mim_number]['<STR_LIT>'] = hgnc_symbols<EOL><DEDENT><DEDENT>for mim_nr in genes:<EOL><INDENT>gene_info = genes[mim_nr]<EOL>hgnc_symbol = gene_info['<STR_LIT>']<EOL>if hgnc_symbol in hgnc_genes:<EOL><INDENT>existing_info = hgnc_genes[hgnc_symbol]<EOL>if not existing_info['<STR_LIT>']:<EOL><INDENT>hgnc_genes[hgnc_symbol] = gene_info<EOL><DEDENT><DEDENT>else:<EOL><INDENT>hgnc_genes[hgnc_symbol] = gene_info<EOL><DEDENT><DEDENT>return hgnc_genes<EOL>
Get a dictionary with genes and their omim information

    Args:
        genemap_lines(iterable(str))
        mim2gene_lines(iterable(str))

    Returns.
        hgnc_genes(dict): A dictionary with hgnc_symbol as keys