troutpy.pl.cell_type_contacts#
- troutpy.pl.cell_type_contacts(sdata, kind='heatmap', celltype_key='cell type', vmax=None, vmin=None, cmap='BuPu', table_key='table', dendrogram_ratio=0.1, key='cell_contact_combined', **kwargs)#
Plot cell type-cell type interaction strength as a heatmap or chord diagram.
- Parameters:
sdata (
SpatialData) – The spatial data object containing interaction scores.kind (
str(default:'heatmap')) – Type of plot, either"heatmap"or"chord".celltype_key (
str(default:'cell type')) – Key insdata[table_key].obs/.unsused to resolve per-cell-type colors.vmax (
Optional[float] (default:None)) – Max value for colormap scaling.vmin (
Optional[float] (default:None)) – Min value for colormap scaling.cmap (
str(default:'BuPu')) – Colormap for the heatmap.table_key (
str(default:'table')) – Key of the table insdataholding the cell-type metadata and colors.dendrogram_ratio (
float(default:0.1)) – Passed toseaborn.clustermap().key (
str(default:'cell_contact_combined')) – Key insdata[table_key].unsholding the cell type x cell type interaction matrix.kwargs – Additional arguments passed to
seaborn.clustermap()ormpl_chord_diagram.chord_diagram().
- Return type:
- Returns:
None