netmap.downstream.final_downstream.plot_shared_targets_heatmap

netmap.downstream.final_downstream.plot_shared_targets_heatmap(grn_adata, genes=None, figsize=(6, 6), cmap='RdBu_r', metric='euclidean', method='average', title='Clustered Heatmap of Shared Targets')

Create a clustered heatmap showing shared target counts between sources.

Parameters:
  • grn_adata (AnnData) – An AnnData object where the gene regulatory network info is in grn_adata.var. Must contain columns ‘source’ and ‘target’.

  • genes (list, optional) – A list of source genes to include. If None, all sources are used.

  • figsize (tuple, optional) – Size of the heatmap figure.

  • cmap (str, optional) – Colormap for the heatmap.

  • metric (str, optional) – Distance metric for clustering (passed to seaborn.clustermap).

  • method (str, optional) – Linkage method for clustering (passed to seaborn.clustermap).

  • title (str, optional) – Title for the heatmap.

Returns:

shared_target_matrix – A symmetric DataFrame of shared target counts between sources.

Return type:

pd.DataFrame