# Spatially aware clustering (SpaGCN, KNN smoothing)

Source: https://onco.cc/terms/spagcn/  
OnCo record `spagcn` (Term). Data CC BY-NC 4.0, attribute "Data from OnCo (onco.cc)"; commercial use needs a licence.

## TL;DR

Spatially aware clustering groups the spots of a tissue section into domains using both what they express and where they sit, so the domains are contiguous regions rather than scattered spots.

## Summary

SpaGCN, from Hu and colleagues, uses a graph convolutional network over spots linked by spatial proximity and histology to identify spatial domains and their marker genes. Simpler versions average each spot with its k nearest neighbours (Wikipedia on k-NN) before principal components and k-means clustering (Wikipedia), which reduces the sparsity of spatial counts and yields coherent regions at the cost of blurring boundaries. Moran's I then tests whether the resulting labels or risk scores are spatially structured.

## Fields

- Kind: Term
- Last checked: 2026-09-24
- Also known as: SpaGCN; spatially aware clustering; spatial clustering; neighbour-smoothed PCA; KNN neighbourhood smoothing; KNN smoothing; graph convolutional clustering
- Tags: cansim-terms

## Notes

- Listed in the CanSim terms map 1.0.0 (docs/onco/terms.json, generated 2026-09-24), CC BY 4.0, attribution: CanSim project, an open, public-data-first cancer foundation-model programme; CanSim page path /terms/spagcn.

## Sources

- Hu et al., SpaGCN: integrating gene expression, spatial location and histology to identify spatial domains (Nature Methods 2021): https://doi.org/10.1038/s41592-021-01255-8
- SpaGCN on GitHub: https://github.com/jianhuupenn/SpaGCN
- Wikipedia: k-nearest neighbours: https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm
- Wikipedia: k-means clustering: https://en.wikipedia.org/wiki/K-means_clustering

## Connected records

- terms: [Cancer AI vocabulary (CanSim terms map)](https://onco.cc/terms/cancer-ai-vocabulary/), [Principal component analysis (PCA) as a feature compressor](https://onco.cc/terms/pca/), [Spatial autocorrelation (Moran's I)](https://onco.cc/terms/spatial-autocorrelation/), [Spatial transcriptomics platforms (Visium HD, Xenium, MERFISH, CosMx, CODEX)](https://onco.cc/terms/spatial-transcriptomics-platforms/)
- technologies: [Spatial transcriptomics](https://onco.cc/technologies/spatial-transcriptomics/)

---
JSON: https://onco.cc/api/v1/entities/spagcn.json