connectoviz.visualization.circular_graph_legacy#

Functions

assign_ungrouped_to_group(groups, ...)

Adds all ungrouped nodes into a group named 'Ungrouped' in each hemisphere.

calcu_missing_pos_nodes_amount(...)

Calculate the missing nodes in the connectivity matrix based on the row names map. :param connectivity_matrix: n X n matrix where n is the number of ROIs in the atlas. Each cell in the matrix describes the connection between each pair of ROIs. :type connectivity_matrix: np.ndarray :param row_names_map: A dictionary mapping node labels to node names. :type row_names_map: dict.

filter_ungrouped_from_graph(connectome, ...)

Filters ungrouped nodes out of the connectivity matrix.

normalize_and_set_threshold(connectivity_matrix)

This function gets a connectivity matrix and normalize its values between 0 to 1.

visualize_connectome(connectome, layout_dict)

Visualize a connectome using a circular graph layout. :param connectome: A Connectome object containing the connectivity matrix ,atlas and more. :type connectome: Connectome :param layout_dict: A dictionary containing layout preferences, including: - 'hemi': bool, whether to reorder by hemisphere. - 'other': bool, whether to include nodes not grouped by the specified hemisphere. - 'grouping': str, metadata column to group nodes by. - 'node_name': str, column name for node names in the metadata. - 'display_node_name': bool, whether to display node names. - 'display_group_name': bool, whether to display group names. :type layout_dict: Dict[str, Any] :param label: The column name in the atlas that contains the labels(numbers) for the ROIs. :type label: str :param roi_names: The column name in the atlas that contains the names of the ROIs. :type roi_names: str :param track_by: The column name in the atlas or metadata that contains the metadata to track by (e.g., Yeo_7network). :type track_by: str :param threshold: A float between 0 and 1 to threshold the connectivity matrix after normalization. Values lower than this threshold are set to zero. :type threshold: float.

Classes

CircularGraph(connectivity_matrix, groups, ...)