netmap.downstream.regulon.make_cluster_regulon_dataframe

netmap.downstream.regulon.make_cluster_regulon_dataframe(keep_edges)[source]

Concatenate all regulon edge DataFrames into a flat DataFrame.

Iterates over the nested keep_edges structure (set_type -> cluster -> {'edges': DataFrame}) and concatenates all non-empty edge DataFrames into a single flat table, adding 'cluster' and 'set_type' columns to preserve provenance.

Parameters:

keep_edges (dict) – Nested regulon dict as returned by select_top_edges() or select_top_edges_signed(), with top-level keys such as 'unique' and 'all', each mapping cluster labels to a dict containing an 'edges' DataFrame.

Returns:

Concatenated DataFrame with all columns from the individual edge DataFrames plus 'cluster' and 'set_type' columns.

Return type:

pd.DataFrame