예제 #1
0
파일: test_eidos.py 프로젝트: adarshp/indra
def test_eidos_to_cag():
    stmts = __get_stmts_from_remote_jsonld()
    ca = CAGAssembler()

    # Make sure these don't error
    ca.add_statements(stmts)
    ca.make_model()
    ca.export_to_cytoscapejs()
    return
예제 #2
0
def test_eidos_to_cag():
    stmts = __get_stmts_from_remote_jsonld()
    ca = CAGAssembler()

    # Make sure these don't error
    ca.add_statements(stmts)
    ca.make_model()
    ca.export_to_cytoscapejs()
    return
def test_export_to_cyjs():
    ca = CAGAssembler(statements)
    ca.make_model()
    cyjs = ca.export_to_cytoscapejs()
    assert len(cyjs['nodes']) == 2
    assert len(cyjs['edges']) == 1
    ca.generate_jupyter_js()
예제 #4
0
def display_delphi(statements):
    from delphi import app
    ca = CAGAssembler(statements)
    cag = ca.make_model()
    cyjs = ca.export_to_cytoscapejs()
    cyjs_str = json.dumps(cyjs)
    app.state.statements = statements
    app.state.CAG = cag
    app.state.elementsJSON = cyjs
    app.state.elementsJSONforJinja = cyjs_str
    app.run()