netmap.downstream.regulon.get_overlapping_signatures

netmap.downstream.regulon.get_overlapping_signatures(all_regulons)[source]

Compute pairwise overlap status of target genes across clusters.

For every pair of clusters, determines for each target gene in their union whether it appears in both clusters, only in the first, or only in the second.

Parameters:

all_regulons (pd.DataFrame) – Flat regulon DataFrame with at least columns 'cluster' and 'target', as produced by make_cluster_regulon_dataframe().

Returns:

Long-form DataFrame with columns 'celltype_1', 'celltype_2', 'status' ('both', 'only {ct1}', or 'only {ct2}'), and 'gene'.

Return type:

pd.DataFrame