Spatial omics context
Ground spatial transcriptomics in tissue morphology — pathology provides the WSI tissue context layer that makes Visium, Xenium, and MERFISH results interpretable in histological space.
Research question
Where do spatial gene expression signals originate relative to tissue structure, and how can morphology-guided regions connect molecular data to what pathologists see on the slide?
Who this is for
- Spatial biology labs running Visium or Xenium who need tissue morphology context
- Computational pathology groups linking segmented cell tables to deconvolved cell types
- Oncology and translational teams integrating histology with spatial omics in multi-modal studies
Data requirements
| Data | Modality owner | Purpose |
|---|---|---|
| Whole-slide H&E or IHC | Pathology | Tissue structure, segmentation, region context |
Visium/Xenium .h5ad | Computational Biology | Spot/cell expression, spatial domains, gene overlays |
| Completed compbio spatial run (or its dataset) | Computational Biology | Source for the pathology spatial_align pipeline |
Pathology does not duplicate compbio spatial omics ingestion or neighborhood analysis. Each area owns its layer; the two connect through a real coordinate-alignment pipeline that overlays compbio spatial points directly on the pathology slide.
Workflow
Pathology: WSI → tiles → tissue detect → segment → quantify
Compbio: spatial .h5ad → spatial domains → spot viewer → DE/enrichment
Alignment: Pathology "Spatial align" (slide + compbio run/dataset)
→ coordinate transform → overlay points on SlideViewer → region expression summary
Step 1 — Pathology tissue context
In a pathology study, process the H&E or IHC slide matched to the spatial sample:
- Upload and tile the WSI
- Run tissue detection for tumor/stroma region boundaries
- Segment cells and run spatial quantification
- Optionally import pathologist annotations for compartment labels
See Slide quantification and TME infiltration.
Step 2 — Compbio spatial analysis
In a linked compbio study, upload the spatial .h5ad and run:
- Spatial domain clustering
- Spatially variable gene identification
- Gene expression overlays in Explore → Spatial
Step 3 — Align pathology and compbio coordinates
On the pathology slide detail page, run Spatial align, pointing it at the completed compbio spatial run (or its .h5ad dataset directly). The pipeline computes a coordinate transform — a landmark-based affine fit when three or more matched points are supplied, or an automatic bounding-box-fit affine otherwise — and applies it to every compbio spot/cell coordinate.
Step 4 — Review the overlay and region summary
Toggle the spatial alignment layer in the Slide viewer to see compbio spots/cells rendered at their transformed positions directly on the WSI. The run also produces a region-level expression/cluster-composition summary — average expression and cluster composition aggregated within each pathology region (tumor, stroma, necrosis, invasive margin, or your imported annotations) — plus a hand-off link back to the compbio spatial result view.
Step 5 — Cross-modal interpretation
Connect findings across layers using the region-level summary and shared sample identifiers:
| Pathology output | Compbio output | Integrated question |
|---|---|---|
| Infiltration phenotype | Immune-high spatial domain | Does histological infiltration match immune-enriched spots? |
| Tumor/stroma annotations + region expression summary | Domain DE results | Are DEGs concentrated in tumor-labeled regions? |
| Cell density heatmap | Spot deconvolution fractions | Do segmented cell counts align with deconvolved immune proportions? |
| Region metrics CSV | Cluster marker genes | Which genes define morphology-distinct compartments? |
Step 6 — Oncology overlay (optional)
The Oncology area adds clinical endpoint integration — survival, immune profiling, and mutation landscape — when spatial and pathology findings feed translational cohort analysis.
Expected outputs
- Pathology: tissue mask, cell overlay, density heatmap, region metrics
- Compbio: spatial domains, SVG rankings, spot viewer with gene overlays
- Alignment: coordinate transform (
alignment.json), overlay points, region-level expression/cluster-composition summary - Cross-study: aligned sample keys and comparable region/cluster summaries for multi-modal reports
Planned extensions
- Tiled H&E image overlay in the compbio spatial viewer itself (today the overlay is one-directional: compbio points onto the pathology slide)
- Mapping deconvolved cell types directly onto individual segmented WSI cells (today aggregation is by pathology region, not per cell)
- Platform-specific ingest (Xenium, MERFISH, CosMx) with pathology co-registration
Related guides
- TME infiltration
- Computational Biology Spatial transcriptomics
- Oncology Multi-omic integration