Causal analysis graphs (indra.assemblers.cag.assembler)¶
-
class
indra.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. -
statements¶ A list of INDRA Statements to be assembled.
Type: list[indra.statements.Statement]
-
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: dict
-
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: str
-
make_model(grounding_ontology='UN', grounding_threshold=None)[source]¶ Return a networkx MultiDiGraph representing a causal analysis graph.
Parameters: - grounding_ontology (Optional[str]) – The ontology from which the grounding should be taken (e.g. UN, FAO)
- grounding_threshold (Optional[float]) – Minimum threshold score for Eidos grounding.
Returns: The assembled CAG.
Return type: nx.MultiDiGraph
-