MHCXGraph.utils.tools.create_graph

MHCXGraph.utils.tools.create_graph(edges_dict: dict, typeEdge: str = 'edges_indices', comp_id=0, *, edge_std_matrix: ndarray | None = None, node_index_map: dict[Any, int] | None = None)[source]

Construct NetworkX graphs from frame edge definitions.

Parameters:
  • edges_dict (dict) – Frame dictionary containing edge definitions.

  • typeEdge (str, default="edges_indices") – Key specifying which edge representation to use.

  • comp_id (int, default=0) – Component identifier used for logging.

  • edge_std_matrix (ndarray, optional) – Matrix of edge standard deviations used for visualization.

  • node_index_map (dict, optional) – Mapping between node identifiers and matrix indices.

Returns:

graphs – List of constructed NetworkX graphs.

Return type:

list[networkx.Graph]