SIF / Boolean networks (indra.assemblers.sif_assembler
)¶
-
class
indra.assemblers.sif_assembler.
SifAssembler
(stmts=None)[source]¶ The SIF assembler assembles INDRA Statements into a networkx graph.
This graph can then be exported into SIF (simple ineraction format) or a Boolean network.
Parameters: stmts (Optional[list[indra.statements.Statement]]) – A list of INDRA Statements to be added to the assembler’s list of Statements. -
graph
¶ networkx.DiGraph – A networkx graph that is assembled by this assembler.
-
make_model
(use_name_as_key=False, include_mods=False, include_complexes=False)[source]¶ Assemble the graph from the assembler’s list of INDRA Statements.
Parameters: - use_name_as_key (boolean) – If True, uses the name of the agent as the key to the nodes in the network. If False (default) uses the matches_key() of the agent.
- include_mods (boolean) – If True, adds Modification statements into the graph as directed edges. Default is False.
- include_complexes (boolean) – If True, creates two edges (in both directions) between all pairs of nodes in Complex statements. Default is False.
-
print_boolean_net
(out_file=None)[source]¶ Return a Boolean network from the assembled graph.
See https://github.com/ialbert/booleannet for details about the format used to encode the Boolean rules.
Parameters: out_file (Optional[str]) – A file name in which the Boolean network is saved. Returns: full_str – The string representing the Boolean network. Return type: str
-
print_loopy
(as_url=True)[source]¶ Return
Parameters: out_file (Optional[str]) – A file name in which the Loopy network is saved. Returns: full_str – The string representing the Loopy network. Return type: str
-