def test_get_hpo_from_omim(connection, hpo_terms, mim_terms):
    """docstring for test_get_description"""
    populate_disease(
        connection=connection, 
        disease_terms=mim_terms, 
    )

    cursor = get_cursor(connection=connection)

    cursor.execute("SELECT * FROM disease WHERE mim_nr = '600920'")
    
    hpo_ids = set()
    for row in cursor.fetchall():
        hpo_ids.add(row['mim_hpo'])

    assert hpo_ids == set([767, 3042,5280,1363,772,1195,2987])
Пример #2
0
def test_get_hpo_from_omim(connection, hpo_terms, mim_terms):
    """docstring for test_get_description"""
    populate_disease(
        connection=connection,
        disease_terms=mim_terms,
    )

    cursor = get_cursor(connection=connection)

    cursor.execute("SELECT * FROM disease WHERE mim_nr = '600920'")

    hpo_ids = set()
    for row in cursor.fetchall():
        hpo_ids.add(row['mim_hpo'])

    assert hpo_ids == set([767, 3042, 5280, 1363, 772, 1195, 2987])
Пример #3
0
def database(request, connection, hpo_terms, mim_terms, genes):
    """Return a populated database"""
    
    populate_hpo(
        connection=connection, 
        hpo_terms=hpo_terms, 
    )
    
    populate_disease(
        connection=connection, 
        disease_terms=mim_terms
    )    

    populate_genes(
        connection=connection, 
        genes=genes
    )    

    return connection