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()
Ejemplo n.º 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
Ejemplo n.º 3
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
Ejemplo n.º 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()
def test_assemble_no_evidence():
    ca = CAGAssembler([Influence(Event(Concept('a')), Event(Concept('b')))])
    ca.make_model()
    ca.generate_jupyter_js()
def test_assemble_influence():
    ca = CAGAssembler(statements)
    CAG = ca.make_model()
    assert len(CAG.nodes()) == 2
    assert len(CAG.edges()) == 1
Ejemplo n.º 7
0
def make_mitre_tsv(stmts, fname):
    ca = CAGAssembler(stmts)
    ca.make_model()
    ca.print_tsv(fname)