Spatial
Spatial workflows operate on AnnData objects with coordinates in obsm['spatial'] — the layout used by Visium-class datasets.
Requirements
- Uploaded or converted
.h5adwith spatial coordinates - Typically one spot (or cell) per row in
obs - Gene expression matrix aligned to spot barcodes
The test fixture data/test_visium_brain.h5ad (~1155 spots) is included for local development.
Spatial domains step
Under Analyze → Find Structure → Spatial domains, the pipeline:
- Builds a spatial neighbor graph
- Clusters spots into tissue domains (Leiden on spatial + expression features)
- Identifies spatially variable genes (SVGs) in the engine
Explore spatial viewer
Explore → Spatial renders spots in coordinate space with:
- Domain or cluster coloring
- Gene expression overlay on selection
- Pan and zoom for tissue navigation
H&E histology image pyramids are not yet wired into the UI (the tiling engine writes OME-Zarr pyramids, but the viewer only renders spots).
Spatial results also include neighborhood enrichment, domain-by-condition comparison, and lightweight niche candidates from enriched domain co-localization, shown below the spot viewer.
Reference deconvolution
A standalone Reference Deconvolution Analyze step estimates cell-type composition fractions from sample- or spot-level expression profiles when marker-gene overlap is sufficient.
Enrichment and DE
Use standard DE and enrichment steps on spatial datasets when contrasts or domains define groups of interest. Domain labels appear in obs after a spatial run completes.
Planned extensions
- Tiled H&E image overlay
- Platform-specific ingest (Xenium, MERFISH, CosMX)