squidpy.read.vizgen
- squidpy.read.vizgen(path, *, counts_file, meta_file, transformation_file=None, library_id='library', **kwargs)[source]
Read Vizgen formatted dataset.
In addition to reading the regular Vizgen output, it loads the metadata file and optionally loads the transformation matrix.
See also
squidpy.pl.spatial_scatter()on how to plot spatial data.
- Parameters:
path (
str|Path) – Path to the root directory containing Vizgen files.counts_file (
str) – File containing the counts. Typically ends with _cell_by_gene.csv.meta_file (
str) – File containing the spatial coordinates and additional cell-level metadata.transformation_file (
str|None) – Transformation matrix file for converting micron coordinates into pixels in images.library_id (
str) – Identifier for the Vizgen library. Useful when concatenating multipleanndata.AnnDataobjects.
- Return type:
- Returns:
Annotated data object with the following keys:
anndata.AnnData.obsm['spatial']- spatial spot coordinates in microns.anndata.AnnData.obsm['blank_genes']- blank genes from Vizgen platform.anndata.AnnData.uns['spatial']['{library_id}']['scalefactors']['transformation_matrix']- transformation matrix for converting micron coordinates to pixels. Only present iftransformation_file != None.