squidpy.read.visium

squidpy.read.visium(path, *, counts_file='filtered_feature_bc_matrix.h5', library_id=None, load_images=True, source_image_path=None, **kwargs)[source]

Read 10x Genomics Visium formatted dataset.

In addition to reading the regular Visium output, it looks for the spatial directory and loads the images, spatial coordinates and scale factors.

See also

Parameters
  • path (Union[PathLike, str]) – Path to the root directory containing Visium files.

  • counts_file (str) – Which file in the passed directory to use as the count file. Typically either filtered_feature_bc_matrix.h5 or raw_feature_bc_matrix.h5.

  • library_id (Optional[str]) – Identifier for the Visium library. Useful when concatenating multiple anndata.AnnData objects.

  • kwargs (Any) – Keyword arguments for scanpy.read_10x_h5(), anndata.read_mtx() or read_text().

Return type

AnnData

Returns

Annotated data object with the following keys: