Gradient Biotech

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

DataModality ownerPurpose
Whole-slide H&E or IHCPathologyTissue structure, segmentation, region context
Visium/Xenium .h5adComputational BiologySpot/cell expression, spatial domains, gene overlays
Completed compbio spatial run (or its dataset)Computational BiologySource 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:

  1. Upload and tile the WSI
  2. Run tissue detection for tumor/stroma region boundaries
  3. Segment cells and run spatial quantification
  4. 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:

  1. Spatial domain clustering
  2. Spatially variable gene identification
  3. Gene expression overlays in Explore → Spatial

See Spatial transcriptomics.

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 outputCompbio outputIntegrated question
Infiltration phenotypeImmune-high spatial domainDoes histological infiltration match immune-enriched spots?
Tumor/stroma annotations + region expression summaryDomain DE resultsAre DEGs concentrated in tumor-labeled regions?
Cell density heatmapSpot deconvolution fractionsDo segmented cell counts align with deconvolved immune proportions?
Region metrics CSVCluster marker genesWhich 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