spatialtis.abc.AnalysisBase

class spatialtis.abc.AnalysisBase(data, method=None, exp_obs=None, roi_key=None, export_key=None, cell_type_key=None, centroid_key=None, shape_key=None, marker_key=None, mp=None, display_name=None)[source]

The base class for all analysis function

All parameters apply in this class can be used in analysis

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

  • method (Optional[str]) – The method used in the run of the analysis

  • export_key (str) – The key used to store result

  • display_name (str) – The name use to display the name of analysis

  • mp (bool) – bool, Enable parallel processing (Default: spatialtis.Config.mp), not apply to most of the analysis

  • exp_obs (List[str]) – A series of keys that store metadata in AnnData.obs (Default: spatialtis.Config.exp_obs)

  • roi_key (str) – The key that specify the ROI in AnnData.obs (Default: spatialtis.Config.roi_key)

  • cell_type_key (str) – The key to store cell types in AnnData.obs (Default: spatialtis.Config.cell_type_key)

  • centroid_key (str) – The key to store cell centroid in AnnData.obs (Default: spatialtis.Config.centroid_key)

  • shape_key (Optional[str]) – The key to store cell shape in AnnData.obs (Default: spatialtis.Config.shape_key)

  • marker_key (str) – The key to store markers in AnnData.var (Default: spatialtis.Config.marker_key). If not specific, will use the index of AnnData.var