scout/utils/link.py
def add_omim_info(genes, alias_genes, genemap_lines, mim2gene_lines):
    """Add omim information
    
    We collect information on what phenotypes that are associated with a gene,
    what inheritance models that are associated and the correct omim id.
    
    Args:
        genes(dict): Dictionary with all genes
        alias_genes(dict): Genes mapped to all aliases
        genemap_lines(iterable): Iterable with raw omim info
        mim2gene_lines(iterable): Iterable with raw omim info

    """
    LOG.info("Add omim info")
    omim_genes = get_mim_genes(genemap_lines, mim2gene_lines)
    
    for hgnc_symbol in omim_genes:
        omim_info = omim_genes[hgnc_symbol]
        inheritance = omim_info.get('inheritance', set())
        
        for hgnc_id in get_correct_ids(hgnc_symbol, alias_genes):
            gene_info = genes[hgnc_id]

            # Update the omim id to the one found in omim
            gene_info['omim_id'] = omim_info['mim_number']

            gene_info['inheritance_models'] = list(inheritance)
            gene_info['phenotypes'] = omim_info.get('phenotypes', [])
def add_omim_info(genes, alias_genes, genemap_lines, mim2gene_lines):
    """Add omim information
    
    We collect information on what phenotypes that are associated with a gene,
    what inheritance models that are associated and the correct omim id.
    
    Args:
        genes(dict): Dictionary with all genes
        alias_genes(dict): Genes mapped to all aliases
        genemap_lines(iterable): Iterable with raw omim info
        mim2gene_lines(iterable): Iterable with raw omim info

    """
    LOG.info("Add omim info")
    omim_genes = get_mim_genes(genemap_lines, mim2gene_lines)
    
    for hgnc_symbol in omim_genes:
        omim_info = omim_genes[hgnc_symbol]
        inheritance = omim_info.get('inheritance', set())
        
        for hgnc_id in get_correct_ids(hgnc_symbol, alias_genes):
            gene_info = genes[hgnc_id]

            # Update the omim id to the one found in omim
            gene_info['omim_id'] = omim_info['mim_number']

            gene_info['inheritance_models'] = list(inheritance)
            gene_info['phenotypes'] = omim_info.get('phenotypes', [])
def add_omim_info ( genes , alias_genes , genemap_lines , mim2gene_lines ) : LOG . info ( "Add omim info" ) omim_genes = get_mim_genes ( genemap_lines , mim2gene_lines ) for hgnc_symbol in omim_genes : omim_info = omim_genes [ hgnc_symbol ] inheritance = omim_info . get ( 'inheritance' , set ( ) ) for hgnc_id in get_correct_ids ( hgnc_symbol , alias_genes ) : gene_info = genes [ hgnc_id ] # Update the omim id to the one found in omim gene_info [ 'omim_id' ] = omim_info [ 'mim_number' ] gene_info [ 'inheritance_models' ] = list ( inheritance ) gene_info [ 'phenotypes' ] = omim_info . get ( 'phenotypes' , [ ] )
Add omim information
    
    We collect information on what phenotypes that are associated with a gene,
    what inheritance models that are associated and the correct omim id.
    
    Args:
        genes(dict): Dictionary with all genes
        alias_genes(dict): Genes mapped to all aliases
        genemap_lines(iterable): Iterable with raw omim info
        mim2gene_lines(iterable): Iterable with raw omim info
Add omim information We collect information on what phenotypes that are associated with a gene what inheritance models that are associated and the correct omim id . Args : genes ( dict ) : Dictionary with all genes alias_genes ( dict ) : Genes mapped to all aliases genemap_lines ( iterable ) : Iterable with raw omim info mim2gene_lines ( iterable ) : Iterable with raw omim info