monkeybread.plot.neighbors_profile_matrixplot

monkeybread.plot.neighbors_profile_matrixplot(adata_neighbors, niche_key, include_niches=None, show=True, clustermap_kwargs=None)

Heatmap plotting the mean, normalized neighbor count of each cell type within each niche.

Parameters:
  • adata – Annotated data matrix storing the neighborhood profiles. This data structure is generated by monkeybread.calc.neighborhood_profile() or by monkeybread.calc.cellular_niches()

  • niche_key (str) – Column name in adata_neighbors.obs storing the niche assigned to each cell

  • include_niches (Optional[List[str]] (default: None)) – List of niche IDs (values in adata_neighbors.obs[niche_key]) to include in the plot

  • show (Optional[bool] (default: True)) – If True, show the figure

  • clustermap_kwargs (Optional[Dict] (default: None)) – Keyword arguments passed to seaborn.clustermap

Returns:

: A seaborn.ClusterGrid instance

Example

https://raw.githubusercontent.com/immunitastx/monkeybread/main/docs/_static/neighbors_profile_matrixplot.png