cellcharter.pl.diff_nhood_enrichment

cellcharter.pl.diff_nhood_enrichment#

cellcharter.pl.diff_nhood_enrichment(adata, cluster_key, condition_key, condition_groups=None, hspace=0.25, wspace=None, ncols=1, **nhood_kwargs)#

Plot the difference in neighborhood enrichment between conditions.

The difference is computed by cellcharter.gr.diff_nhood_enrichment().

Parameters:
  • adata (AnnData) – Annotated data object.

  • cluster_key (str) – Key in anndata.AnnData.obs where clustering is stored.

  • condition_key (str) – Key in adata.obs that stores the sample condition (e.g., normal vs disease).

  • condition_groups (Optional[list[str]] (default: None)) – Restrict the conditions to these clusters. If None, all groups are plotted.

  • hspace (float (default: 0.25)) – Height space between panels.

  • wspace (Optional[float] (default: None)) – Width space between panels.

  • ncols (int (default: 1)) – Number of panels per row.

  • nhood_kwargs (Any) – Keyword arguments for cellcharter.pl.nhood_enrichment().

Return type:

None

Returns:

Nothing, just plots the figure and optionally saves the plot.