paroto.viz.cytoscape#

Cytoscape layout generator for Dash applications.

This module provides utilities for converting model graphs to Dash-Cytoscape format for interactive visualization with support for hierarchical parameter structure.

Attributes#

Functions#

model_graph_to_cytoscape(parameters, models, constraints)

Convert model graph to Cytoscape elements format.

hierarchy_to_cytoscape(graph[, max_level])

Convert hierarchy structure to Cytoscape elements with level information.

get_cytoscape_stylesheet()

Get default Cytoscape stylesheet for model graphs.

get_hierarchical_cytoscape_stylesheet()

Get Cytoscape stylesheet with level-based coloring.

get_cytoscape_layout()

Get default Cytoscape layout configuration.

get_hierarchical_cytoscape_layout()

Get hierarchical Cytoscape layout configuration using dagre.

Module Contents#

paroto.viz.cytoscape.model_graph_to_cytoscape(parameters, models, constraints, connections=None)#

Convert model graph to Cytoscape elements format.

Parameters:
  • parameters (list of str) – List of parameter names

  • models (list of str) – List of model names

  • constraints (list of str) – List of constraint names

  • connections (list of tuple, optional) – List of (source, target) tuples for explicit connections. If None, auto-generates all-to-all connections

Returns:

Cytoscape elements list with nodes and edges

Return type:

list

paroto.viz.cytoscape.hierarchy_to_cytoscape(graph, max_level=None)#

Convert hierarchy structure to Cytoscape elements with level information.

Parameters:
  • graph (ProblemGraph) – Problem graph from extract_hierarchy()

  • max_level (int, optional) – Maximum hierarchy level to include. If None, includes all levels

Returns:

Cytoscape elements list with nodes (including level attribute) and edges

Return type:

list

paroto.viz.cytoscape.get_cytoscape_stylesheet()#

Get default Cytoscape stylesheet for model graphs.

Returns:

Cytoscape stylesheet

Return type:

list

paroto.viz.cytoscape.get_hierarchical_cytoscape_stylesheet()#

Get Cytoscape stylesheet with level-based coloring.

Returns:

Cytoscape stylesheet with level-specific colors

Return type:

list

paroto.viz.cytoscape.get_cytoscape_layout()#

Get default Cytoscape layout configuration.

Returns:

Cytoscape layout configuration

Return type:

dict

paroto.viz.cytoscape.get_hierarchical_cytoscape_layout()#

Get hierarchical Cytoscape layout configuration using dagre.

Returns:

Cytoscape layout configuration optimized for hierarchies

Return type:

dict

paroto.viz.cytoscape.params = ['V', 'e', 'd_t', 'f', 'E_p']#