enrichmap.pl.variogram

Contents

enrichmap.pl.variogram#

enrichmap.pl.variogram(adata: AnnData, score_key: List[str], save: str | None = None, max_lag: float | None = None, lag_percentile: float = 95) None#

Compute empirical variograms to assess spatial dependence for any score key.

Parameters:
  • adata (AnnData) – Annotated data matrix with spatial coordinates in adata.obsm[“spatial”].

  • score_key (list of str) – List of keys in adata.obs to compute variograms for.

  • save (str or None, optional) – If provided, path to save the figure as a PDF file.

  • max_lag (float or None, optional) – If set, limits the x-axis of the variogram plot to this value. If None, computed from pairwise distances using lag_percentile.

  • lag_percentile (float, optional) – Percentile of pairwise distances to set as max_lag when max_lag is None (default: 95).

Returns:

variograms – List of computed Variogram objects for each score key.

Return type:

list of Variogram