def parse_hpo_phenotypes(hpo_lines):
hpo_terms = {}<EOL>LOG.info("<STR_LIT>")<EOL>for index, line in enumerate(hpo_lines):<EOL><INDENT>if index > <NUM_LIT:0> and len(line) > <NUM_LIT:0>:<EOL><INDENT>hpo_info = parse_hpo_phenotype(line)<EOL>hpo_term = hpo_info['<STR_LIT>']<EOL>hgnc_symbol = hpo_info['<STR_LIT>']<EOL>if hpo_term in hpo_terms:<EOL><INDENT>hpo_terms[hpo_term]['<STR_LIT>'].append(hgnc_symbol)<EOL><DEDENT>else:<EOL><INDENT>hpo_terms[hpo_term] = {<EOL>'<STR_LIT>':hpo_term,<EOL>'<STR_LIT:description>': hpo_info['<STR_LIT:description>'],<EOL>'<STR_LIT>': [hgnc_symbol]<EOL>}<EOL><DEDENT><DEDENT><DEDENT>LOG.info("<STR_LIT>")<EOL>return hpo_terms<EOL>
Parse hpo phenotypes

        Group the genes that a phenotype is associated to in 'genes'

    Args:
        hpo_lines(iterable(str)): A file handle to the hpo phenotypes file

    Returns:
        hpo_terms(dict): A dictionary with hpo_ids as keys and terms as values

        {
            <hpo_id>: {
                'hpo_id':str,
                'description': str,
                'hgnc_symbols': list(str), # [<hgnc_symbol>, ...]
                }
        }