CAG Assembler (indra_world.assemblers.cag
)
Assemble simple graphs of assembled INDRA Statements that can be embedded into websites or notebooks.
Assembler (indra_world.assemblers.cag.assembler
)
- class indra_world.assemblers.cag.assembler.CAGAssembler(stmts=None)[source]
Assembles a causal analysis graph from INDRA Statements.
- Parameters:
stmts (Optional[list[indra.statement.Statements]]) – A list of INDRA Statements to be assembled. Currently supports Influence Statements.
- CAG
A networkx MultiDiGraph object representing the causal analysis graph.
- Type:
nx.MultiDiGraph
- export_to_cytoscapejs()[source]
Return CAG in format readable by CytoscapeJS.
- Returns:
A JSON-like dict representing the graph for use with CytoscapeJS.
- Return type:
- generate_jupyter_js(cyjs_style=None, cyjs_layout=None)[source]
Generate Javascript from a template to run in Jupyter notebooks.
- Parameters:
cyjs_style (Optional[dict]) – A dict that sets CytoscapeJS style as specified in https://github.com/cytoscape/cytoscape.js/blob/master/documentation/md/style.md.
cyjs_layout (Optional[dict]) – A dict that sets CytoscapeJS layout parameters.
- Returns:
A Javascript string to be rendered in a Jupyter notebook cell.
- Return type: