Demonstration only. Corollary is a non-commercial research demo — no warranty, no support, not for commercial use or clinical decisions. Read the disclaimer

All use cases

Single-cell and tissue · What you can do here

Analyse spatial transcriptomics data

Analyse spatial transcriptomics data across sequencing and imaging platforms. Inspect QC, calculate spatially variable genes, map neighbourhoods, and deconvolve mixed spots using reference atlases.

What this involves

Spatial transcriptomics preserves anatomical coordinates to resolve where transcripts occur across a tissue. How data must be handled depends directly on the measurement unit: sequencing technologies such as 10x Genomics Visium capture mixtures of cells across 55 µm spots, sub-cellular platforms such as Visium HD or Stereo-seq aggregate transcripts into bins, and targeted imaging platforms such as Xenium, MERFISH, and CosMx profile single cells subject to segmentation accuracy.

Doing spatial analysis properly requires distinguishing spot-level mixtures from true single cells, tailoring quality control to the physical assay rather than borrowing standard single-cell assumptions, and ranking spatial patterns using neighbour graphs. Downstream analysis maps spatial autocorrelation, neighbourhood enrichments, and cellular microenvironments across tissue sections.

For multi-cellular spots such as Visium, interpreting cell-type composition requires deconvolution against a matched single-cell reference atlas. The platform runs spatial pipelines and tools like Rectangle on its own compute environment, handling count matrices, image coordinates, and spatial graphs without local installation.

How it goes

  1. 1Dataset acquisition and ingestionData is located from CZ CELLxGENE, GEO deposits, or local Space Ranger and SpatialData directories using find_spatial_datasets, loading counts, coordinates, and images directly into AnnData objects.
  2. 2Platform-specific quality control and overviewThe spatial_overview tool verifies in-tissue spots, inspects segmentation areas and transcript distributions for imaging panels, and assesses tissue-appropriate mitochondrial fractions while generating initial tissue plots.
  3. 3Spatially variable gene discoveryA Delaunay spatial neighbour graph is constructed to calculate spatial autocorrelation via Moran's I across the top variable genes using sq.gr.spatial_autocorr, ranking genes that form spatial territories.
  4. 4Spatial neighbourhood and niche analysisNeighbourhood enrichment and co-occurrence are evaluated across clusters with sq.gr.nhood_enrichment and sq.gr.co_occurrence to detect cellular interfaces and spatial niches.
  5. 5Cell-type deconvolutionFor multi-cellular spot data like Visium, deconvolve_cell_types executes Rectangle against an annotated raw-count single-cell reference to infer cell-type proportions per spot.

Start it here

Ask in plain language. The agent works on a Linux machine of its own — it installs and runs what the job needs, keeps every file, and reads the results back with the numbers explained. Nothing to set up, and a long run continues after you close the page.

What to watch for

  • Treating Visium spots as single cells; each 55 µm spot contains a mixture of 1 to 10 cells, so cluster labels represent mixture profiles rather than isolated cell types.
  • Applying single-cell doublet filters or standard droplet-removal thresholds to Visium, which erroneously discards low-count spots at real tissue boundaries.
  • Assuming unlisted genes are absent from the tissue when analysing targeted imaging platforms such as Xenium or MERFISH, which measure pre-selected gene panels rather than whole transcriptomes.
  • Treating Moran's I p-values as rigorous significance metrics, as spatial neighbour graphs inflate analytical p-values; genes should instead be ranked primarily by the Moran's I statistic.
  • Interpreting two tissue sections from different conditions as a replicated experimental comparison, when n = 1 per condition only allows a comparison of sections.

What it runs

Questions

Do I need to install anything to analyse spatial transcriptomics data?

No. The research agent does this work on a Linux machine of its own — it runs Rectangle there, keeps the files, and reads the results back to you. Long runs continue if you close the page.

Can I annotate single cells directly from Visium spots?

No. A Visium spot contains a mixture of 1 to 10 cells. To determine cellular composition, spots must be deconvolved against a matched single-cell reference using tools such as Rectangle, or scored for marker genes and reported as enrichment scores rather than absolute cell types.

How should quality control differ between imaging platforms and sequencing-based spatial methods?

Sequencing platforms such as Visium focus on spot filtering (such as ensuring in_tissue == 1) and tissue-calibrated mitochondrial reads without doublet filtering. Imaging platforms like Xenium or CosMx require QC centred on segmentation quality, identifying artifacts by looking for spikes of tiny low-transcript cells or tails of excessively large merged cells.

What reference is needed to deconvolve Visium spots with Rectangle?

Rectangle requires an annotated single-cell reference dataset of the same tissue and species with raw counts, not normalised or log-transformed data. The single-cell reference must share gene nomenclature with the spatial mixture and contain at least 10 cells per defined cell type.

Written from the method the research agent follows for this work and the documentation of the tools listed above. Statements citing a figure that does not appear there are removed before publication. Corollary is a non-commercial research demonstration; results are not for clinical use.