By EVOBYTE Your partner in bioinformatics
Introduction
If single‑cell RNA‑seq (scRNA‑seq) is a high‑resolution portrait of cell states, spatial transcriptomics is the map that shows where those states live. On their own, each technology tells a compelling story; together, they turn expression profiles into tissue architecture. This post focuses on the “how”: what scRNA‑seq actually measures, why spatial assays still miss key details, and how to integrate the two in R with Seurat and in Python with Scanpy. Along the way, we’ll look at tools that deconvolute mixed spatial spots, methods that map single cells back into space, and guardrails for challenging scenarios where datasets come from similar—but not identical—specimens. We’ll finish by placing these workflows inside the broader world of multimodal integration.
What scRNA‑seq measures—and where spatial transcriptomics still falls short
scRNA‑seq captures gene expression per cell, typically as unique molecular identifier (UMI) counts. Because it profiles thousands of genes per cell, it is unmatched for discovering cell types, states, and trajectories. The trade‑off is that dissociation destroys spatial context; cells become points in latent space rather than positions in tissue.
Spatial transcriptomics restores location, but with its own compromises. Slide‑based approaches such as 10x Genomics Visium measure whole‑transcriptome expression per barcoded spot, yet each spot aggregates one to ten cells, so signals are mixed and sensitivity dips relative to single‑cell data. Even with Visium HD raising spatial granularity to single‑cell scale, coverage and capture efficiency remain variable, and formalin‑fixed (FFPE) sections bring chemistry and RNA quality constraints. Imaging‑based in situ platforms like 10x Xenium deliver subcellular localization but target predefined gene panels (hundreds to thousands of genes), so breadth is limited by panel design. In practice, no single platform simultaneously offers whole transcriptome, single‑cell sensitivity, and precise spatial localization without trade‑offs—hence the need for computational integration.
Deconvolution vs mapping: two integration mindsets
When you combine scRNA‑seq with spatial data, you usually pursue one of two goals.
The first is deconvolution: estimating the mixture of cell types (and sometimes within‑type states) inside each spatial spot. Probabilistic approaches like RCTD and cell2location explicitly model cross‑platform differences and noise, while DestVI goes further to capture continuous variation within a cell type. If you are working with Visium or other multi‑cell spots, deconvolution is often the right first step. Comparative benchmarks consistently find that cell2location, RCTD, and SpatialDWLS provide strong performance on proportion estimates across tissues and datasets.
The second goal is mapping: aligning individual single cells (or clusters) to spatial positions to create single‑cell resolution tissue maps. Tangram is a popular deep‑learning method for this; given shared genes between scRNA‑seq and spatial data from the same region, it finds an assignment that makes the scRNA‑derived expression match the observed spatial profiles. Mapping is compelling when you have high‑resolution spatial support (for example MERFISH or Xenium) or want to project annotations and unmeasured genes into space. Benchmarking suggests Tangram does well for “gene projection,” whereas deconvolution tools often excel for cell‑type proportion tasks, which reflects their design objectives.
Behind both strategies sit familiar data‑science ideas. Deconvolution is essentially a constrained regression or probabilistic factor model with priors from scRNA‑seq, while mapping optimizes a similarity objective across shared genes, sometimes with spatial regularization. These are complementary tools; many teams deconvolute first, then map fine‑grained states in regions of interest.
R‑first workflows: Seurat‑based label transfer and deconvolution that just works
If your analysis home is R, Seurat gives you a frictionless starting point. You can load Visium (or Visium HD) data directly, visualize tissue images, and attach scRNA‑seq‑derived labels with anchor‑based transfer. Under the hood, Seurat learns “anchors” that link biologically similar cells across datasets—even across assays—and uses them to transfer annotations or impute features. For spatial work, that means quickly assigning likely cell identities to spots, then layering deconvolution for proportions as needed.
Here’s a minimal Seurat snippet to load a Visium slice and transfer labels from an scRNA‑seq reference. It favors clarity over options, but it’s the pattern you’ll reuse:
library(Seurat)
# 1) Load spatial data (Visium/HD processed with Space Ranger)
spatial <- Load10X_Spatial(data.dir = "path/to/visium_dir", slice = "slice1")
# 2) Load or build your scRNA-seq reference (already normalized/clusters annotated)
# ref <- readRDS("sc_reference.rds")
# 3) Find anchors and transfer cell-type labels to spatial spots
anchors <- FindTransferAnchors(reference = ref, query = spatial, normalization.method = "SCT")
pred <- TransferData(anchorset = anchors, refdata = ref$celltype)
# 4) Store predictions and visualize
spatial$predicted_celltype <- pred$predicted.id
SpatialDimPlot(spatial, group.by = "predicted_celltype")
For true proportions per spot, add a dedicated deconvolution step. RCTD is widely used and robust to platform effects; SPOTlight provides an NMF‑based alternative; SpatialDWLS offers speed and accuracy with a lightweight interface. Seurat’s prediction scores are great for label‑on‑map views, while RCTD and peers deliver the quantitative mixing ratios biologists ask for.
A few practical tips help this pipeline stay honest. Use the same tissue type and condition for your scRNA‑seq reference whenever possible. Harmonize gene symbols and filter low‑quality spots before transfer. And don’t over‑interpret a single “predicted type” on a spot you know is a cellular neighborhood—the deconvolution proportions should drive questions about microenvironments, gradients, and boundaries.
Python‑first workflows: Scanpy, scvi‑tools, and Tangram in a few lines
If you prefer Python, the Scanpy/scverse ecosystem gives you two powerful roads: probabilistic deconvolution with scvi‑tools and explicit spatial mapping with Tangram.
DestVI (in scvi‑tools) learns a latent representation from scRNA‑seq, then explains each Visium spot as a mixture of types and within‑type states. It’s particularly helpful when state heterogeneity matters—for example, distinguishing activated from resting macrophages within the same cell type across tumor niches. cell2location is another scvi‑tools‑based workhorse; it aims for fine‑grained cell‑type maps using a Bayesian hierarchical model that borrows strength across locations and adjusts for technical variation. Both methods have been validated across multiple tissues and frequently top deconvolution benchmarks.
For spatial mapping, Tangram aligns single cells to tissue coordinates. Here is a compact example that projects scRNA‑seq expression into a Visium slice:
import scanpy as sc
import tangram as tg
# 1) Read data (AnnData). ad_sc: scRNA-seq cells x genes; ad_sp: Visium spots x genes
ad_sc = sc.read_h5ad("scRNA_ref.h5ad")
ad_sp = sc.read_h5ad("visium_slice.h5ad")
# 2) Preprocess to find shared genes and standardize
tg.pp_adatas(ad_sc, ad_sp, genes=None)
# 3) Map cells to space and project genes (or labels) onto the tissue
ad_map = tg.map_cells_to_space(ad_sc, ad_sp) # probabilities of cell->spot
ad_proj = tg.project_genes(ad_map, ad_sc) # predicted expression per spot
# ad_proj.var contains genes; ad_proj.obsm['tangram_ct_pred'] can hold transferred labels
Because Tangram optimizes an objective across shared genes, the quality of the mapping depends on the gene set and the match between datasets. Use a well‑annotated scRNA‑seq reference from the same region, balance marker and housekeeping genes, and, when needed, add spatial regularization or cluster‑level mapping for stability. Recent refinements explicitly improve run‑to‑run consistency by training on informative genes, filtering cells, and adding neighborhood priors. (github.com)
The hard part: mapping across similar, but not identical, specimens
Real projects rarely hand you perfect pairs. You might have a disease scRNA‑seq reference and a healthy spatial slice, or sections from adjacent—but not co‑registered—tissue. These “domain shifts” matter because integration assumes that key cell states are shared and measured comparably.
Start by acknowledging what is, and isn’t, shared. If the query contains new cell states, standard label transfer will either misassign them or return low confidence; treat high‑uncertainty calls as a feature, not a bug. Transfer‑learning frameworks like scArches help here: they map a query onto a frozen reference while preserving disease‑specific variation, and they provide uncertainty scores that flag out‑of‑distribution cells. This makes it easier to spot “unknowns” rather than forcing imperfect matches.
Spatial registration brings its own quirks. Adjacent sections can warp during processing, and biology changes along the z‑axis. If you are aligning multiple slices or building 3D tissue views, optimal‑transport methods like PASTE use both expression and spot coordinates to find correspondences across slices, then stack them into a consensus or 3D alignment. Variants such as PASTE2 even handle partial overlap and missing structures. If you later project scRNA‑seq into this aligned space, you reduce artifacts from mis‑registered sections.
Finally, recognize when tools are being asked to extrapolate. Tangram, for example, expects matched regions and a reasonable overlap in gene sets; it can be regularized, but irreconcilable differences in platform chemistry or tissue composition will still leak into the map. In those cases, down‑weight problematic genes, restrict to consensus markers, or consider deconvolution first to stabilize the downstream mapping.
How this all fits into multimodal integration
Spatial plus scRNA‑seq is one layer of a broader multimodal stack. Inside Seurat, weighted nearest neighbors (WNN) learn cell‑specific modality weights to jointly embed RNA with proteins (CITE‑seq) or chromatin accessibility, producing atlases you can map new data onto. In the scverse world, totalVI provides a unified probabilistic model for RNA and protein, and MultiVI does the same for RNA and ATAC. These models reduce batch effects, denoise measurements, and impute missing modalities—useful when you want to compare spatial niches defined by RNA with phenotypes defined by protein or regulatory state. As in spatial integration, you get the best results when you treat uncertainty explicitly and favor references from the same biological space.
The hardware is moving toward multimodality too. In situ platforms now add same‑section protein panels alongside targeted RNA, while Visium HD pushes whole‑transcriptome assays toward single‑cell scale. As those capabilities grow, computational integration will matter more, not less, because trade‑offs remain: breadth versus depth, sensitivity versus coverage, and generality versus context. The win comes from combining modalities, not choosing a single winner.
Summary / Takeaways
scRNA‑seq gives you a comprehensive catalog of cell states; spatial transcriptomics shows you where those states reside. Because neither platform is perfect, integration is the practical route to biological insight. Use deconvolution (cell2location, RCTD, DestVI) for quantitative cell‑type proportions in multi‑cell spots, and mapping tools (Tangram) to project single‑cell annotations or unmeasured genes into space. In R, Seurat’s anchor‑based label transfer gets you to a credible first map quickly; in Python, scvi‑tools and Tangram cover the probabilistic and deep‑learning ends of the spectrum. When specimens aren’t strictly matched, lean on transfer learning (scArches), uncertainty scores, and slice‑alignment methods (PASTE) to avoid over‑confident stories. Then, connect the result to your multimodal stack—WNN, totalVI, or MultiVI—to interpret spatial niches through RNA, protein, and chromatin together.
If you’re starting a new project this month, pick a reference scRNA‑seq dataset from the same tissue and condition as your spatial experiment, run a quick Seurat label transfer or DestVI deconvolution, and pressure‑test the result with uncertainty and known landmarks. What surprising microenvironment would you want to validate in situ next?
Further Reading
- Benchmarking spatial–single‑cell integration methods (Nature Methods, 2022)
- Tangram: deep learning alignment of scRNA‑seq to spatial data (Nature Methods, 2021)
- cell2location: Bayesian fine‑grained cell‑type maps (Nature Biotechnology, 2022)
- RCTD: robust deconvolution of spatial mixtures (Nature Biotechnology, 2021)
- Seurat v5: spatial analysis vignettes, including Visium HD
