troutpy.pl.gene_communication#
- troutpy.pl.gene_communication(sdata, kind='heatmap', gene='', celltype_key='cell type', vmax=None, vmin=None, cmap='BuPu', dendrogram_ratio=0.1, **kwargs)#
Plot cell type-cell type interaction strength as a heatmap or chord diagram.
- Parameters:
sdata (spatialdata.SpatialData) – The spatial data object containing interaction scores.
kind (str) – Type of plot, either ‘heatmap’ or ‘chord’. Default is ‘heatmap’.
celltype_key (str) – Key for cell type colors in
sdata['table'].uns. Default is ‘cell type’.gene (str) – Name of the gene to be plotted
vmax (float) – Max value for colormap scaling. Default is None.
vmin (float) – Min value for colormap scaling. Default is None.
cmap (str) – Colormap for heatmap or chord diagram. Default is ‘BuPu’.
kwargs (dict) – Additional arguments passed to the plotting functions.