def get_mim_phenotypes(genemap_lines):
<EOL>phenotype_mims = set()<EOL>phenotypes_found = {}<EOL>for entry in parse_genemap2(genemap_lines):<EOL><INDENT>hgnc_symbol = entry['<STR_LIT>']<EOL>for phenotype in entry['<STR_LIT>']:<EOL><INDENT>mim_nr = phenotype['<STR_LIT>']<EOL>if mim_nr in phenotypes_found:<EOL><INDENT>phenotype_entry = phenotypes_found[mim_nr]<EOL>phenotype_entry['<STR_LIT>'] = phenotype_entry['<STR_LIT>'].union(phenotype['<STR_LIT>'])<EOL>phenotype_entry['<STR_LIT>'].add(hgnc_symbol)<EOL><DEDENT>else:<EOL><INDENT>phenotype['<STR_LIT>'] = set([hgnc_symbol])<EOL>phenotypes_found[mim_nr] = phenotype<EOL><DEDENT><DEDENT><DEDENT>return phenotypes_found<EOL>
Get a dictionary with phenotypes

    Use the mim numbers for phenotypes as keys and phenotype information as 
    values.

    Args:
        genemap_lines(iterable(str))

    Returns:
        phenotypes_found(dict): A dictionary with mim_numbers as keys and 
        dictionaries with phenotype information as values.

        {
             'description': str, # Description of the phenotype
             'hgnc_symbols': set(), # Associated hgnc symbols
             'inheritance': set(),  # Associated phenotypes
             'mim_number': int, # mim number of phenotype
        }