tiledbsoma.io.spatial.to_spatialdata

tiledbsoma.io.spatial.to_spatialdata(experiment: Experiment, *, measurement_names: Sequence[str] | None = None, scene_names: Sequence[str] | None = None, obs_id_name: str = 'obs_id', var_id_name: str = 'var_id', table_kwargs: Mapping[str, dict[str, Any]] | None = None) SpatialData

Converts the experiment group to SpatialData format.

Parameters:
  • experiment

  • measurement_names – The names of measurements to export. If None, all measurements are included. Defaults to None.

  • scene_names – The names of the scenes to export. If None, all scenes are included. Defaults to None.

  • obs_id_name – Column name to use for obs dataframes. Defaults to "obs_id".

  • var_id_name – Column name to use for var dataframes. Defaults to "var_id|.

  • table_kwargs – Optional mapping from measurment name to keyword arguments to pass to table conversions. See :method:`to_anndata` for possible keyword arguments.