omics.co.in logo omics.co.in

6. Spatial Transcriptomics & Cellular Spot Deconvolution

⚡ Pipeline 6 of 16  ·  🧬 Spatial Biology

Mapping spatially resolved gene expression in intact histological tissue sections, identifying spatially variable genes via Moran’s I, and deconvolving multi-cell spots with scRNA-seq reference atlases using RCTD.

🔍 Ctrl + K
RNA • Spatial Biology Authority: 10x Visium / Space Ranger / Giotto
Production Blueprint v4.5

6. Spatial Transcriptomics & Cellular Spot Deconvolution

Mapping spatially resolved gene expression in intact histological tissue sections, identifying spatially variable genes via Moran's I, and deconvolving multi-cell spots with scRNA-seq reference atlases using RCTD.

Metric / RequirementSpecificationTarget Configuration
Core Engine / FrameworkSpace Ranger + Seurat Spatial / Giotto + RCTDNextflow / Snakemake Compatible
Benchmark Runtime~3 – 5 hours per slide16 CPU cores / 32 GB RAM
Standard Container10xgenomics/spaceranger:3.0.0Docker • Singularity • Conda
Input → DeliverableVisium FASTQs + High-Res H&E TIFF → Spatial Feature Matrix, Spot Deconvolution
Workflow Chain: Visium FASTQs + H&E Image → Space Ranger → Seurat Load10X_Spatial → SCTransform → FindSpatiallyVariableFeatures → RCTD Deconvolution
⚡

Step 1: Spatial Read Mapping & Image Fiducial Registration with Space Ranger

Space Ranger count

Aligns tissue H&E microscopy images to capture area fiducials, maps sequencing reads, and assigns counts to coordinates.

spaceranger count --id=Cortex_Visium \
                  --transcriptome=/ref/refdata-gex-GRCh38-2020-A \
                  --fastqs=/data/visium_fastqs \
                  --sample=cortex_sample \
                  --image=cortex_he_image.tif \
                  --slide=V10M12-001 --area=A1 \
                  --localcores=16 --localmem=32
Key Flags & Notes: --slide and --area retrieve exact manufacturing array masks for spot spatial coordinate tracking.
⚡

Step 2: Spatial Expression Matrix Ingestion & SCTransform Normalization

Seurat v5 Spatial

Ingests spatial spot coordinates and H&E overlays into Seurat, applying regularized negative binomial regression.

library(Seurat)
library(ggplot2)

spatial_obj <- Load10X_Spatial(data.dir = "Cortex_Visium/outs/")
spatial_obj <- SCTransform(spatial_obj, assay = "Spatial", verbose = FALSE)
spatial_obj <- RunPCA(spatial_obj, assay = "SCT", verbose = FALSE)
spatial_obj <- FindNeighbors(spatial_obj, reduction = "pca", dims = 1:30)
spatial_obj <- FindClusters(spatial_obj, verbose = FALSE)
spatial_obj <- RunUMAP(spatial_obj, reduction = "pca", dims = 1:30)

SpatialDimPlot(spatial_obj, label = TRUE, label.size = 3)
Key Flags & Notes: Load10X_Spatial loads the lowres/hires histology image and aligns spatial pixel coordinates with matrix columns.
⚡

Step 3: Spatially Variable Gene (SVG) Discovery with Moran's I

Moran's I • Seurat

Identifies genes whose expression levels exhibit non-random spatial autocorrelation across tissue architecture.

spatial_obj <- FindSpatiallyVariableFeatures(
  spatial_obj, assay = "SCT", 
  features = VariableFeatures(spatial_obj)[1:1000], 
  selection.method = "moransi"
)

top_svgs <- head(SpatiallyVariableFeatures(spatial_obj, selection.method = "moransi"), 6)
SpatialFeaturePlot(spatial_obj, features = top_svgs, ncol = 3)
Key Flags & Notes: selection.method = 'moransi' computes spatial autocorrelation scores between adjacent histological spots.
⚡

Step 4: Spot Multi-Cellular Deconvolution with RCTD & scRNA Reference

spacexr / RCTD

Deconvolves the 1-10 cells captured in each Visium spot using single-cell RNA-seq reference profiles.

library(spacexr)

# Ingest single-cell reference and spatial query
sc_ref <- Reference(counts = sc_counts, cell_types = sc_cell_types)
puck <- SpatialRNA(coords = spatial_coords, counts = spatial_raw_counts)

# Run Robust Cell Type Decomposition (RCTD)
myRCTD <- create.RCTD(puck, sc_ref, max_cores = 8)
myRCTD <- run.RCTD(myRCTD, doublet_mode = 'doublet')
results <- myRCTD@results$weights
Key Flags & Notes: doublet_mode = 'doublet' infers primary and secondary cell-type proportions per capture spot.
← Return to Home Hub