dolomite_spatial package

Submodules

dolomite_spatial.read_spatial_experiment module

dolomite_spatial.read_spatial_experiment.read_spatial_experiment(path, metadata, **kwargs)[source]

Load a SpatialExperiment from its on-disk representation.

This method should generally not be called directly but instead be invoked by read_object().

Parameters:
  • path (str) – Path to the directory containing the object.

  • metadata (dict) – Metadata for the object.

  • kwargs – Further arguments.

Return type:

SpatialExperiment

Returns:

A SpatialExperiment with file-backed arrays in the assays.

dolomite_spatial.save_image module

dolomite_spatial.save_image.save_image(src, directory, i)[source]

Save an image file with proper format handling.

Parameters:
  • src (str) – Source path of the image.

  • directory (str) – Directory to save the image to.

  • i (int) – Index of the image.

Return type:

Optional[str]

Returns:

Format of the image (‘PNG’ or ‘TIFF’) or None if format not supported.

dolomite_spatial.save_spatial_experiment module

dolomite_spatial.save_spatial_experiment.save_spatial_experiment(x, path, img_data_args=None, **kwargs)[source]

Method for saving SpatialExperiment objects to their corresponding file representations, see save_object() for details.

Parameters:
  • x (SpatialExperiment) – Object to be staged.

  • path (str) – Path to a directory in which to save x.

  • img_data_args (dict) – Further arguments to pass to the save_object method for the image data.

  • kwargs – Further arguments.

Returns:

x is saved to path.

Module contents