spatialtis.spatial_enrichment

class spatialtis.spatial_enrichment(data, threshold=None, layer_key=None, selected_markers=None, resample=500, pval=0.01, order=False, **kwargs)[source]

Profiling markers spatial enrichment using permutation test

Similar to neighborhood analysis which tells you the relationship between different type of cells. This analysis tells you the spatial relationship between markers.

Parameters
  • data (anndata._core.anndata.AnnData) – AnnData object to perform analysis

  • threshold (Optional[float]) – The expression level to determine whether a marker is positive

  • layer_key (Optional[str]) – The layer in AnnData to perform analysis

  • selected_markers (Optional[Union[List, Tuple, pandas.core.series.Series, numpy.ndarray]]) – Select your interested markers

  • resample (int) – Number of times to perform resample

  • pval (float) – The p-value threshold to determine significance

  • order (bool) – If False, (Cell_A, Cell_B) and (Cell_B, Cell_A) are the same interaction (Default: False)

  • **kwargs – Pass to spatialtis.abc.AnalysisBase