spatialdata_io.visium_hd

Contents

spatialdata_io.visium_hd#

spatialdata_io.visium_hd(path, dataset_id=None, filtered_counts_file=True, bin_size=None, fullres_image_file=None, load_all_images=False, imread_kwargs=mappingproxy({}), image_models_kwargs=mappingproxy({}), anndata_kwargs=mappingproxy({}))#

Read 10x Genomics Visium HD formatted dataset.

Parameters:
  • path (str | Path) – Path to directory containing the 10x Genomics Visium HD output.

  • dataset_id (str | None (default: None)) – Unique identifier of the dataset. If None, it tries to infer it from the file name of the feature slice file.

  • filtered_counts_file (bool (default: True)) – It sets the value of counts_file to 'filtered_feature_bc_matrix.h5' (when True) or to 'raw_feature_bc_matrix.h5' (when False).

  • bin_size (int | list[int] | None (default: None)) – When specified, load the data of a specific bin size, or a list of bin sizes. By default, it loads all the available bin sizes.

  • fullres_image_file (str | Path | None (default: None)) – Path to the full-resolution image. By default the image is searched in the 'microscope_image' directory.

  • load_all_images (bool (default: False)) – If False, load only the full resolution, high resolution and low resolution images. If True, also the following images: 'spatial/cytassist_image.tiff'.

  • imread_kwargs (Mapping[str, Any] (default: mappingproxy({}))) – Keyword arguments for imageio.imread().

  • image_models_kwargs (Mapping[str, Any] (default: mappingproxy({}))) – Keyword arguments for spatialdata.models.Image2DModel.

  • anndata_kwargs (Mapping[str, Any] (default: mappingproxy({}))) – Keyword arguments for anndata.read_h5ad().

Return type:

SpatialData

Returns:

: SpatialData object for the Visium HD data.