booldog.io.cytoscape
Export BoolDog Boolean models to a running Cytoscape session, via the optional py4cytoscape dependency.
Attributes
Functions
Raise the log level of py4cytoscape's loggers to CRITICAL. |
|
Test if a connection to Cytoscape can be established. |
|
|
Display a BoolDog Boolean model in Cytoscape. |
Module Contents
- booldog.io.cytoscape._CYTOSCAPE_AVAILABLE = True
- booldog.io.cytoscape.silence_p4c_loggers()
Raise the log level of py4cytoscape’s loggers to CRITICAL.
Silences the informational/warning messages that py4cytoscape emits by default, so that BoolDog’s own logging output is not cluttered.
Notes
Called automatically at import time (if py4cytoscape is available).
- booldog.io.cytoscape.test_cytoscape_connection()
Test if a connection to Cytoscape can be established.
- Returns:
True, if a running Cytoscape instance was successfully pinged.
- Return type:
bool
- Raises:
ImportError –
If the optional py4cytoscape dependency is not installed.
ConnectionError – If py4cytoscape is installed but no running Cytoscape instance could be reached.
- booldog.io.cytoscape.booldog2cytoscape(model, as_logic_circuit=False, title=None, collection='Booldog Network', layout=None, style=None)
Display a BoolDog Boolean model in Cytoscape.
- Parameters:
model (booldog:BoolDogModel) – A BoolDog object representing a Boolean network.
as_logic_circuit (bool) – If True, the graph is exported as a logic circuit (Boolean rules are represented as “logical” nodes (and, or, not) and edges. Otherwise, it is exported as a interaction graph. Default is False.
title (str or None) – The title of the Cytoscape network. Default is ‘{model_id} interaction network’ if as_logic_circuit is False and ‘{model_id} logic circuit’ else.
collection (str) – The name of the Cytoscape collection to add the network to. Default is “Booldog Network”.
layout (str or None) – The name of the Cytoscape layout to apply to the network. Default is None (no layout).
style (str or None) – The name of the Cytoscape visual style to apply to the network. If None, a default style will be applied. Default is None.
- Returns:
suid – The SUID of the created Cytoscape network.
- Return type:
int