harpy.io.visium

Contents

harpy.io.visium#

harpy.io.visium(path, dataset_id=None, counts_file='filtered_feature_bc_matrix.h5', fullres_image_file=None, instance_key='cell_ID', region_key='fov_labels', output=None)#

Read 10x Genomics Visium formatted dataset.

Wrapper around spatialdata.io.readers.visium.visium, but with the resulting table annotated by a labels element.

Parameters:
  • path (str | Path) – Path to directory containing the 10x Genomics Visium 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.

  • counts_file (str (default: 'filtered_feature_bc_matrix.h5')) – Name of the counts file, defaults to 'filtered_feature_bc_matrix.h5'; a common alternative is 'raw_feature_bc_matrix.h5'.

  • fullres_image_file (str | Path | None (default: None)) – Path to the full-resolution image.

  • instance_key (str (default: 'cell_ID')) – Instance key. The name of the column in AnnData table .obs that will hold the instance ids.

  • region_key (str (default: 'fov_labels')) – Region key. The name of the column in AnnData table .obs that will hold the name of the elements that annotate the table.

  • output (str | Path | None (default: None)) – The path where the resulting SpatialData object will be backed. If None, it will not be backed to a zarr store.

Return type:

SpatialData