spatialtis.transform_points

spatialtis.transform_points(data, centroid_keys, export_key='centroid')[source]

Transform normal coordination in AnnData.obs to wkt-format

>>> import spatialtis as st
>>> st.transform_points(data, ('x', 'y'), export_key="centroid_wkt")
Parameters
  • data (anndata._core.anndata.AnnData) – The AnnData object

  • centroid_keys (Union[str, Tuple[str, str]]) – The key or a tuple of keys that store X, Y coordination

  • export_key (str) – The key to export, will automatically update the global config