scout/load/hpo.py
def load_hpo(adapter, disease_lines, hpo_disease_lines=None, hpo_lines=None, hpo_gene_lines=None):
    """Load the hpo terms and hpo diseases into database
    
    Args:
        adapter(MongoAdapter)
        disease_lines(iterable(str)): These are the omim genemap2 information
        hpo_lines(iterable(str))
        disease_lines(iterable(str))
        hpo_gene_lines(iterable(str))
    """
    # Create a map from gene aliases to gene objects
    alias_genes = adapter.genes_by_alias()
    
    # Fetch the hpo terms if no file
    if not hpo_lines:
        hpo_lines = fetch_hpo_terms()

    # Fetch the hpo gene information if no file
    if not hpo_gene_lines:
        hpo_gene_lines = fetch_hpo_to_genes()
    
    # Fetch the hpo phenotype information if no file
    if not hpo_disease_lines:
        hpo_disease_lines = fetch_hpo_phenotype_to_terms()
    
    load_hpo_terms(adapter, hpo_lines, hpo_gene_lines, alias_genes)
    
    load_disease_terms(adapter, disease_lines, alias_genes, hpo_disease_lines)
def load_hpo(adapter, disease_lines, hpo_disease_lines=None, hpo_lines=None, hpo_gene_lines=None):
    """Load the hpo terms and hpo diseases into database
    
    Args:
        adapter(MongoAdapter)
        disease_lines(iterable(str)): These are the omim genemap2 information
        hpo_lines(iterable(str))
        disease_lines(iterable(str))
        hpo_gene_lines(iterable(str))
    """
    # Create a map from gene aliases to gene objects
    alias_genes = adapter.genes_by_alias()
    
    # Fetch the hpo terms if no file
    if not hpo_lines:
        hpo_lines = fetch_hpo_terms()

    # Fetch the hpo gene information if no file
    if not hpo_gene_lines:
        hpo_gene_lines = fetch_hpo_to_genes()
    
    # Fetch the hpo phenotype information if no file
    if not hpo_disease_lines:
        hpo_disease_lines = fetch_hpo_phenotype_to_terms()
    
    load_hpo_terms(adapter, hpo_lines, hpo_gene_lines, alias_genes)
    
    load_disease_terms(adapter, disease_lines, alias_genes, hpo_disease_lines)
def load_hpo ( adapter , disease_lines , hpo_disease_lines = None , hpo_lines = None , hpo_gene_lines = None ) : # Create a map from gene aliases to gene objects alias_genes = adapter . genes_by_alias ( ) # Fetch the hpo terms if no file if not hpo_lines : hpo_lines = fetch_hpo_terms ( ) # Fetch the hpo gene information if no file if not hpo_gene_lines : hpo_gene_lines = fetch_hpo_to_genes ( ) # Fetch the hpo phenotype information if no file if not hpo_disease_lines : hpo_disease_lines = fetch_hpo_phenotype_to_terms ( ) load_hpo_terms ( adapter , hpo_lines , hpo_gene_lines , alias_genes ) load_disease_terms ( adapter , disease_lines , alias_genes , hpo_disease_lines )
Load the hpo terms and hpo diseases into database
    
    Args:
        adapter(MongoAdapter)
        disease_lines(iterable(str)): These are the omim genemap2 information
        hpo_lines(iterable(str))
        disease_lines(iterable(str))
        hpo_gene_lines(iterable(str))
Load the hpo terms and hpo diseases into database Args : adapter ( MongoAdapter ) disease_lines ( iterable ( str )) : These are the omim genemap2 information hpo_lines ( iterable ( str )) disease_lines ( iterable ( str )) hpo_gene_lines ( iterable ( str ))