This skill covers loading spatial transcriptomics data from various platforms including 10X Visium, Xenium, MERFISH, Slide-seq, and more using Squidpy and SpatialData.
pip install squidpy spatialdata spatialdata-io scanpy anndataTell your AI agent what you want to do:
- "Load my Visium data from the Space Ranger output"
- "Read this Xenium experiment"
- "Load my MERFISH spatial data"
"Load my 10X Visium data"
"Read the Space Ranger output in this folder"
"Load my Xenium data"
"Read single-cell spatial data from Xenium"
"Load my MERFISH data"
"Read Slide-seq bead coordinates"
"Import CosMx data"
- Identify the appropriate reader for your platform
- Load expression data into AnnData format
- Extract spatial coordinates
- Load tissue images if available
- Return a properly formatted spatial object
- Visium uses spots (~55um), while Xenium/MERFISH have single-cell resolution
- SpatialData is the newer format that handles multi-modal spatial data well
- Library ID is needed to access images in Visium data
- Coordinates are stored in
adata.obsm['spatial']as (x, y) pairs