Zubair Khalid

Virologist/Molecular Biologist | Veterinarian | Bioinformatician

Conventional & Molecular Virology • Vaccine Development • Computational Biology

Dr. Zubair Khalid is a veterinarian and virologist specializing in conventional and molecular virology, vaccine development, and computational biology. Dedicated to advancing animal health through innovative research and multi-omics approaches.

Dr. Zubair Khalid - Veterinarian, Virologist, and Vaccine Development Researcher specializing in Computational Biology, Multi-omics, Animal Health, and Infectious Disease Research

Category: Guides

Spatial Transcriptomics Spot Deconvolution

Spatial transcriptomics spot deconvolution is a computational method that estimates the cell type composition within each capture spot from spatial transcriptomics data, where a single spot often contains multiple cells. This guide is written for biologists, bioinformaticians, and computational researchers who need to interpret mixed spot signals and want a rigorous, practical framework to select, execute, and validate deconvolution. Start with the NCBI Bookshelf for a broad foundation on transcriptomics.

Many spatial transcriptomics platforms, such as 10x Visium or Slide seq, place barcoded capture spots at defined locations on a tissue section. Each spot typically contains from one to dozens of cells, producing a mixed gene expression profile. Deconvolution reverses that mixture by leveraging a single cell RNA sequencing reference. The goal is to infer the proportion of each cell type in every spot or, in advanced approaches, to reconstruct a virtual single cell map. See the EMBL EBI Training for structured tutorials on handling spatial data.

At a Glance

Concept Description
Input Spot level gene expression matrix, spatial coordinates, single cell reference (optional)
Output Cell type proportions per spot, or per cell expression estimates
Core assumption Each cell type has a stable expression profile that can be linearly combined
Common methods RCTD, CARD, SPOTlight, Stereoscope, SpatialDWLS, cell2location
Key software Bioconductor (packages: SpatialExperiment, CARD, RCTD), Python (squidpy, cell2location)
Validation Cross validation, histology alignment, spatial consistency metrics

What Is Spot Deconvolution?

Spot deconvolution solves a mixed signal problem. Each spot yields a vector of RNA counts that is a weighted sum of the expression profiles from the cells present. If we denote the spot expression as Y, the reference profiles as R (a matrix of genes by cell types), and the proportions as P (a vector of cell type fractions for that spot), then the model is Y = R x P plus noise. Deconvolution estimates P for each spot.

Methods differ in how they handle technical variation, spatial correlation, and prior knowledge. For instance, Galaxy Training Network provides workflow examples that incorporate quality control and deconvolution steps within reproducible pipelines. The choice of method depends on whether you have a matched single cell reference, the desired resolution, and computational resources.

Decision Criteria for Choosing a Deconvolution Method

Selecting the right method involves several trade offs.

Reference availability. If you have a high quality single cell RNA seq dataset from the same tissue and condition (preferred), you can use reference based methods like RCTD or CARD. If no reference exists, consider reference free approaches such as SpatialCell AI, which uses morphology to infer single cell signals. Always verify platform compatibility because reference and spatial data should be normalized consistently.

Spatial priors. Some tools incorporate spatial information to smooth estimates across neighboring spots. For example, the method described in Spatiotemporal cell type deconvolution leveraging tissue structure uses tissue architecture to guide inference. Using spatial covariance can reduce noise but risks over smoothing sharp boundaries.

Computational cost. Full Bayesian methods like cell2location are slower but provide uncertainty estimates. Faster regression based tools (e.g., SPOTlight) scale better for large datasets. Evaluating integrative strategies for incorporating phenotypic features in spatial transcriptomics compares trade offs between speed and accuracy.

Resolution goal. If you need per cell estimates rather than spot proportions, consider methods that integrate histology images. SpatioCell and SPADE combine morphology with transcriptomics to achieve sub spot resolution. For segmentation to define cell boundaries at the image level, CODAvision provides a best practices framework for medical image segmentation that can be adapted for histological images.

Practical Workflow

Here is a step by step sequence for performing spot deconvolution.

1. Quality Control and Preprocessing

Start with the spatial count matrix and metadata. Remove spots with low total counts (fewer than 500 1000 UMIs) and high mitochondrial read fraction (above 20%). Normalize the spatial data to account for sequencing depth. Use log1p or SCTransform. For reference data, obtain counts from the NCBI Sequence Read Archive and process them through a standard single cell pipeline. Ensure that genes are matched between reference and spatial data, keep only genes present in both.

2. Build or Select a Reference

If using a reference based approach, create a signature matrix. Cluster the single cell data and compute mean expression per cluster. Some methods require raw counts, others accept normalized data. Filter out lowly expressed genes. For publications, use a well annotated reference, for new tissues, validate clusters with known markers. If no single cell data is available, consider using public atlas references or reference free strategies as outlined in SpatialCell AI.

3. Run Deconvolution

Select a method based on the criteria above. For example, using CARD from Bioconductor: prepare a SpatialExperiment object, run CARD(), and obtain proportion estimates. For RCTD, use the spacexr package. Always set a seed for reproducibility. Many tools offer diagnostic plots, such as correlation between predicted and observed expression for held out genes.

4. Evaluate and Refine

After deconvolution, inspect the proportions. Low abundance cell types (below 5% of the mixture) are often unreliable. Compare the spatial distribution of predicted cell types against histological annotations. Use tools like SPADE to quantify cell cell interaction patterns based on deconvolved maps. If the results do not match known anatomy, revisit the reference or try a different method.

5. Downstream Analysis

Use the proportion matrix for differential cell type abundance across regions, correlation with pathology, or as input for spatial clustering. You can also map high resolution cell type maps by combining deconvolution with image based segmentation as in SpatioCell.

Quality Checks

After obtaining deconvolution results, verify their validity.

Marker gene validation. For each cell type, check that known marker genes are enriched in spots where the method predicts high proportions of that type. For example, if the reference indicates that oligodendrocytes express MBP, then spots with high oligodendrocyte proportion should also have high MBP expression.

Cross validation. Hold out a fraction of genes, run deconvolution on the remaining genes, and then predict expression of the held out genes. Calculate Pearson correlation between predicted and observed expression. A correlation above 0.7 is generally acceptable.

Spatial autocorrelation. For each cell type, compute Moran’s I or Geary’s C on the proportion map. Biologically meaningful cell types should show significant spatial clustering. Random noise would produce low autocorrelation.

Consistency with histology. Align the deconvolution map with the H&E image. Major tissue structures, such as the ventricle in a brain slice or the crypts in a colon section, should match. CODAvision provides segmentation tools that can help align these modalities.

Common Mistakes

Ignoring batch effects between reference and spatial data. Single cell data may come from a different experiment, tissue dissociation protocol, or sequencing platform. This mismatch can cause deconvolution to assign high proportions to cell types that are transcriptionally similar but biologically distinct. Always perform batch correction or at least compare the distributions of housekeeping genes.

Overinterpreting rare cell types. If a cell type constitutes less than 2% of the reference, its estimate in a spot will be noisy. Downsample or exclude such clusters unless you have strong prior evidence.

Using a reference with too many cell types. Including 30 or more subclusters often leads to correlated signatures and high co linearity. Merge subclusters into major lineages (e.g., CD4+ and CD8+ T cells into T cells) unless you need fine resolution and have enough spots to support it.

Forgetting spatial dependence. Treating each spot independently ignores the fact that neighboring spots share similar cell types. Some methods (e.g., CARD) explicitly model that correlation. If you run a non spatial method, apply a spatial smoothing step (e.g., using a kernel) or at least verify that the results are spatially coherent.

Neglecting quality control in spatial data. Spots with low UMI counts produce sparse expression vectors that deconvolution methods cannot reliably fit. Remove low quality spots before analysis.

Limits of Interpretation

Spot deconvolution does not provide true single cell resolution. Each spot’s proportion vector is an average over the cells present, cells within the same spot cannot be individually resolved unless you use integrative methods that incorporate morphology. The method described in SpatialCell AI attempts to overcome this limitation but still depends on image derived features that may not capture all transcriptomic states.

Another major limit is the reference dependence. If the reference does not include all cell types present in the tissue, the method may assign their expression to the nearest available type, leading to biased proportions. Likewise, if the reference profiles are derived from dissociated cells, they may differ from the in situ state due to processing stress. Evaluating integrative strategies for incorporating phenotypic features in spatial transcriptomics shows that integrating histology can partly mitigate such biases.

Finally, deconvolution assumes a linear mixture model. This assumption holds approximately when cell types express distinct sets of genes, but it breaks down for highly similar sub clusters or when cell state varies continuously. Non linear methods are emerging but remain computationally intensive.

Frequently Asked Questions

1. What is the minimum number of single cells needed for a good reference?
A robust reference requires at least 100 cells per major cell type and a total of 10 20 thousand cells across all types. More cells capture biological variability and improve signature stability. For rare cell types, you may need to enrich through FACS or microdissection.

2. Can I deconvolve spatial data without a single cell reference?
Yes. Several reference free methods use the spatial data itself to identify cell type signatures by exploiting spatial correlation. Tools like SpatialCell AI and NMF based approaches can infer profiles directly. However, the resulting cell type identities must be annotated using known markers, which introduces some uncertainty.

3. How do I choose between RCTD and CARD?
RCTD performs well when the reference is of high quality and the tissue has clear cellular niches. CARD additionally incorporates spatial correlation and handles missing cell types in the reference more robustly. If your tissue has smooth transitions (e.g., cortex layers), CARD is preferred. For tumors with sharp boundaries, RCTD may better preserve heterogeneity.

4. Why do my deconvolution results show high proportions of unexpected cell types?
Check for technical artifacts. High background in the spatial data can inflate ubiquitous transcripts. Also verify that your reference correctly labels cell types. Sometimes doublets or misannotated clusters in the single cell data contaminate the signature matrix. Re run the reference preprocessing and consider using a method that estimates an extra background component.

References and Further Reading

Related Articles