netmap.downstream.regulon.process_cell_edges_signed

netmap.downstream.regulon.process_cell_edges_signed(keep_edges_pos, keep_edges_neg)[source]

Build the positive/negative regulon result structure from per-cluster edge lists.

Parameters:
  • keep_edges_pos (dict) – Mapping of cluster label to a list of (edge_str, sum_of_edge, spearman) tuples for positively correlated edges.

  • keep_edges_neg (dict) – Mapping of cluster label to a list of (edge_str, sum_of_edge, spearman) tuples for negatively correlated edges.

Returns:

Nested result with keys 'unique' and 'all', each mapping cluster label to a dict with keys 'positive' and 'negative', each of which contains:

  • 'edges' (pd.DataFrame): Columns source, target, sum_of_edge, spearman.

  • 'summary' (pd.DataFrame): Columns source, count, mean_spearman.

Return type:

dict