- scanpy.read_visium(path, genome=None, *, count_file='filtered_feature_bc_matrix.h5', library_id=None, load_images=True, source_image_path=None)¶
Read 10x-Genomics-formatted visum dataset.
In addition to reading regular 10x output, this looks for the
spatialfolder and loads images, coordinates and scale factors. Based on the Space Ranger output docs.
spatial()for a compatible plotting function.
- path :
Path to directory for visium datafiles.
- genome :
Filter expression to genes within this genome.
- count_file :
Which file in the passed directory to use as the count file. Typically would be one of: ‘filtered_feature_bc_matrix.h5’ or ‘raw_feature_bc_matrix.h5’.
- library_id :
Identifier for the visium library. Can be modified when concatenating multiple adata objects.
- source_image_path :
Path to the high-resolution tissue image. Path will be included in
- path :
- Return type
Annotated data matrix, where observations/cells are named by their barcode and variables/genes by gene name. Stores the following information:
The data matrix is stored
Dict of spaceranger output files with ‘library_id’ as key
Dict of images (
Scale factors for the spots
Files metadata: ‘chemistry_description’, ‘software_version’, ‘source_image_path’
Spatial spot coordinates, usable as