scout/parse/hpo.py
def parse_hpo_disease(hpo_line):
    """Parse hpo disease line
    
        Args:
            hpo_line(str)
    """
    hpo_line = hpo_line.rstrip().split('\t')
    hpo_info = {}
    disease = hpo_line[0].split(':')
    
    hpo_info['source'] = disease[0]
    hpo_info['disease_nr'] = int(disease[1])
    hpo_info['hgnc_symbol'] = None
    hpo_info['hpo_term'] = None
    
    if len(hpo_line) >= 3:
        hpo_info['hgnc_symbol'] = hpo_line[2]

        if len(hpo_line) >= 4:
            hpo_info['hpo_term'] = hpo_line[3]
    
    
    return hpo_info
def parse_hpo_disease(hpo_line):
    """Parse hpo disease line
    
        Args:
            hpo_line(str)
    """
    hpo_line = hpo_line.rstrip().split('\t')
    hpo_info = {}
    disease = hpo_line[0].split(':')
    
    hpo_info['source'] = disease[0]
    hpo_info['disease_nr'] = int(disease[1])
    hpo_info['hgnc_symbol'] = None
    hpo_info['hpo_term'] = None
    
    if len(hpo_line) >= 3:
        hpo_info['hgnc_symbol'] = hpo_line[2]

        if len(hpo_line) >= 4:
            hpo_info['hpo_term'] = hpo_line[3]
    
    
    return hpo_info
Parse hpo disease line
    
        Args:
            hpo_line(str)