Esempio n. 1
0
 def __init__(self, graph,verbose=0):
     """Constructor
     Intialize an instance of `Imputation` with a py2neo graph
     and a `CypherQuery` object.
     """
     self.graph = graph
     self.cypher = CypherQuery()
Esempio n. 2
0
 def __init__(self, graph, populations):
     """Constructor
     Intialize an instance of `Imputation` with a py2neo graph
     and a `CypherQuery` object.
     """
     # graph is a link to the graph and populations is the list of populations
     self.graph = graph
     self.cypher = CypherQuery()
     self.populations = populations
Esempio n. 3
0
def test_build_query():
    cypher = CypherQuery()
    for haplo in expected["buildQuery"].keys():
        assert_equal(cypher.buildQuery([haplo]), expected["buildQuery"][haplo],
                     haplo)
Esempio n. 4
0
def test_get_path():
    cypher = CypherQuery()
    for haplo in expected["getPath"].keys():
        assert_equal(cypher.getPath([haplo]), expected["getPath"][haplo],
                     haplo)
Esempio n. 5
0
def test_get_locus():
    cypher = CypherQuery()
    for allele in expected["getLocus"].keys():
        assert_equal(cypher.getLocus(allele), expected["getLocus"][allele],
                     allele)
Esempio n. 6
0
def test_constructer():
    cypher = CypherQuery()
    assert_true(inspect.isclass(CypherQuery))
    assert_equal(cypher.__class__.__name__, "CypherQuery")
    assert_equal(str(type(cypher)),
                 "<class \'hf_cypher.cypherQuery.CypherQuery\'>")