Spatial Transcriptomics Quality Control
Spatial transcriptomics quality control (QC) is the set of steps you take to verify that the RNA capture, sequencing, and spatial alignment of your tissue section have produced data trustworthy enough for downstream analysis. This guide is for computational biologists, bioinformaticians, and bench scientists who generate or analyze spatial transcriptomics data and need a practical framework to separate technical noise from biological signal. Whether you use commercial platforms like 10x Visium or custom in situ sequencing methods, the core QC principles remain the same: assess tissue coverage, count quality, and spatial artifacts before drawing biological conclusions.
The first step in any spatial transcriptomics project is to confirm that the tissue section was correctly placed on the capture area and that the imaging and barcode alignment are accurate. Without this foundational check, all subsequent analyses risk being misleading. Tools such as those described in the Galaxy Training Network provide step‑by‑step workflows for aligning raw sequencing data to a reference genome and mapping barcode spots to tissue images. These training materials are invaluable for establishing a reproducible QC pipeline.
At a Glance: Core QC Metrics for Spatial Transcriptomics
| Metric | What It Checks | Typical Threshold / Action |
|---|---|---|
| Tissue coverage fraction | Proportion of capture spots with detectable tissue | >50% of spots in tissue area, if low, flag for dissection or imaging issues |
| Total UMI count per spot | Amount of captured RNA per spot | Remove spots with total UMI < threshold (e.g., 500,1000) to exclude empty or damaged areas |
| Number of unique genes per spot | Gene detection sensitivity | Filter spots with <200,500 unique genes, compare with expected tissue complexity |
| Fraction of mitochondrial reads | Cellular health / cell lysis | Remove spots with >20% mitochondrial reads (lower for some tissues) |
| Spatial autocorrelation (e.g., Moran’s I) | Whether expression patterns are spatially coherent | Low Moran’s I may indicate technical noise or batch effects |
| Reads mapping to off‑target features | Alignment accuracy | High off‑target fraction suggests poor sample preparation or reference bias |
These thresholds are starting points. You must adjust them based on your tissue type, platform, and biological question. A comprehensive discussion of metric interpretation is available in the Bioconductor documentation for packages such as STUtility and Seurat.
Decision Criteria: What to Filter and Why
Deciding which spots to retain is not purely a statistical exercise. You must consider the tissue architecture and the expected cell density. For example, a section from a dense tumor may have high UMI counts across most spots, while a diffuse tissue like brain cortex may show variation across layers. The NCBI Sequence Read Archive contains many spatial transcriptomics datasets that you can use to benchmark your own QC thresholds. Use these public datasets to see how different filtering decisions affect downstream clustering and spatial mapping.
Key decision points include:
- Tissue versus background spots. Most platforms include probes or barcodes outside the tissue area. Use the brightfield or fluorescence image to define a tissue mask. Remove any spot whose center lies outside the mask. Over‑aggressive masking can remove valid edge spots, so consider using a probability mask.
- Minimum UMI threshold. Set a lower bound based on the library complexity. If your total UMI count per spot shows a bimodal distribution, the lower mode often represents empty spots or damaged regions. Remove these.
- Mitochondrial fraction. High mitochondrial reads can indicate lysed cells. A common threshold is 20%, but some tissues (e.g., liver) naturally have higher mitochondrial content. Check the distribution across spots before applying a hard cutoff.
- Spatial outliers. Use local autocorrelation or neighborhood detection to find spots that deviate dramatically from their neighbors. These may be artifacts from edge effects or air bubbles.
Work through these decisions with a test dataset before applying them to your main experiment. The EMBL‑EBI Training platform provides courses on spatial transcriptomics that cover these filtering criteria in depth.
Practical Workflow: From Raw Data to Filtered Counts
The workflow below assumes you have already performed basic sequencing QC (read quality, adaptor trimming) and aligned reads to the transcriptome. The focus here is on spatial‑specific QC.
Step 1: Image Registration and Spot Mapping
Align the tissue image (H&E or immunofluorescence) with the spatial barcode layout. For 10x Visium, the spaceranger pipeline outputs a tissue detection mask. Verify that the mask aligns with the visible tissue edges. Manual correction may be necessary if the fiducial alignment failed. Document any manual adjustments.
Step 2: Count Matrix Generation
Generate the spot‑by‑gene count matrix from aligned reads. The matrix includes total UMI counts per spot. Create diagnostic plots:
- Histogram of total UMI counts per spot.
- Spatial heatmap of total UMI counts.
- Spatial heatmap of mitochondrial fraction.
Step 3: Filter Spots Based on Tissue Mask
Remove spots that fall outside the tissue mask. For 10x Visium, spaceranger provides a tissue_positions_list.csv file with a column in_tissue (1 = in tissue, 0 = background). Keep only in_tissue == 1 spots. For other platforms, compute a mask from the image registration overlay.
Step 4: Filter Spots by UMI and Gene Count
Apply minimum thresholds for total UMI and number of unique genes. Use the distribution to determine outlier boundaries. For example, remove spots with log10(total UMI) less than Q1 , 1.5*IQR. Write the filtering criteria in a reproducible script.
Step 5: Filter Spots by Mitochondrial Fraction
Compute percent mitochondrial reads per spot (genes with prefix MT‑ in human, mt‑ in mouse). Remove spots where this fraction exceeds a tissue‑specific cutoff. Visualize the filtered spots on the tissue image to confirm that you are not removing biologically meaningful regions (e.g., hypoxic areas).
Step 6: Normalize and Assess Spatial Autocorrelation
After filtering, normalize raw counts (e.g., SCTransform or log‑normalization). Then compute spatial autocorrelation for a handful of known marker genes. Low Moran’s I for expected tissue markers may indicate residual artifacts or that the tissue section was damaged. This step is also a good sanity check before clustering.
A reproducible example of this workflow using R is provided by Bioconductor in the STexampleData package. The Galaxy Training Network also offers a fully documented pipeline using Seurat.
Quality Checks That Catch Hidden Problems
Even after filtering, you must verify the quality of your final dataset with additional checks.
- Library complexity saturation. Plot the number of unique genes versus total UMI per spot. A curve that plateaus suggests that additional sequencing will not increase gene detection. If the curve is still rising steeply, deeper sequencing may be needed.
- Spatial batch effects. If you processed multiple tissue sections in different batches, check whether the first principal components correlate with batch. Use integration methods if necessary.
- Gene dropout patterns. High dropout rates (absence of expression in expected cell types) can indicate assay failure. Compare your gene detection rates with published datasets from the same tissue. The Spatial Transcriptomics in Ovarian Biology review highlights how dropout rates vary by platform and tissue preparation.
- Cross‑contamination of spots. In platforms using solid‑phase capture, RNA can diffuse between adjacent spots. Compute the spatial correlation of highly expressed genes. If two separate tissue structures show uniform expression, contamination may be occurring.
- Alignment of serial sections. If you have multiple sections from the same block, align them computationally to verify that identified tissue regions are reproducible. This cross‑sectional comparison is discussed in a region‑aware bridge modeling paper that developed mesoscale representations of tissue sections.
Common Mistakes in Spatial Transcriptomics QC
Even experienced analysts make these errors. Watch for them.
- Relying solely on automatic tissue detection. Spaceranger and similar tools set a default tissue‑area threshold that may exclude thin tissue borders or include debris. Always inspect the mask manually.
- Over‑filtering low‑UMI spots. In heterogeneous tissues, certain cell types (e.g., quiescent fibroblasts) naturally produce fewer transcripts. Aggressive UMI filtering can remove these populations and bias your analysis toward highly‑expressing cells.
- Ignoring slide‑level batch effects. Spatial transcriptomics experiments often use multiple capture areas on a single slide. Different capture areas can have systematic differences in RNA capture efficiency. Treat each capture area as a separate batch and correct for it.
- Assuming that spatial structure equals biological structure. Artifacts like tissue folds, air bubbles, or uneven permeabilization create spatial patterns that look like real biology. Use negative control probes (e.g., intronic sequences) to estimate background noise. The unified spatial transcriptome profiling of ten mouse organs demonstrates how to detect such artifacts across diverse tissues.
- Not saving pre‑filtered raw counts. Filtering decisions are subjective. Always keep the unfiltered count matrix so you can re‑evaluate thresholds later. This is especially important when using public data for reanalysis.
Limits of Interpretation: What Quality Control Cannot Tell You
QC ensures that your data are of sufficient technical quality, but it does not guarantee biological validity. Be aware of these limits.
- Limited resolution. Most current spatial transcriptomics platforms capture RNA from multiple cells per spot (e.g., 1,10 cells for Visium). QC cannot resolve single‑cell heterogeneity, it only measures the aggregate expression. If you need single‑cell resolution, consider higher‑resolution methods or combine with single‑cell RNA‑seq data for deconvolution.
- Dropout is not always noise. A gene absent in a spot may reflect true low expression in that tissue region. QC filters based on “too few genes per spot” may discard biologically meaningful areas like quiescent zones. Always use tissue‑specific knowledge to set thresholds.
- Spatial autocorrelation can mislead. Clustering spots based on high autocorrelation may simply reflect a large scale gradient (e.g., blood vessel distribution) rather than discrete cell‑type domains. Visual inspection of gene expression maps remains essential.
- No ground truth. Unlike synthetic datasets, real spatial transcriptomics has no known “correct” spot assignment. QC metrics are heuristics. Cross‑validation across multiple sections or with orthogonal methods (e.g., immunohistochemistry) provides stronger support. The cross‑species systems analysis of inflammatory bowel disease shows how spatial transcriptomics can be validated by comparing across species and with histology.
- Platform‑specific biases. Each platform has its own gene detection biases (e.g., poly‑A capture bias, probe selection). QC metrics from one platform may not transfer directly to another. Read platform documentation carefully.
Frequently Asked Questions
1. What is the minimum number of spots I should keep after QC?
There is no universal answer. For large tissue sections, you might retain thousands of spots. For small biopsies, as few as 50,100 high‑quality spots can be sufficient if they represent the tissue architecture. Focus on the representativeness of retained spots (e.g., covering all expected zones) rather than a raw count.
2. How do I handle tissue that was damaged during sectioning?
If the tissue contains tears or folds, exclude spots that overlap with these regions. You can draw a polygon around the damaged area manually in the image and remove corresponding spots. Do not attempt to repair the data by imputation across a tear, the spatial relationships are lost.
3. Should I filter out ribosomal RNA reads?
Most spatial transcriptomics protocols use poly‑A capture, which enriches for mRNA and largely excludes rRNA. However, residual rRNA can appear. Many pipelines do not explicitly filter rRNA genes because they are not abundant. If you see a high fraction of rRNA reads, it may indicate degraded mRNA. Check with a quality metric like the ratio of exonic to intronic reads.
4. Can I combine spatial datasets from different platforms?
Yes, but with caution. Different platforms have different spot sizes, capture efficiencies, and gene lists. Standardize the gene symbols, then apply platform‑specific QC thresholds before integration. Use batch correction methods that account for spatial location. The subregion‑specific insular dysconnectivity study integrated transcriptomic data from multiple sources (though not spatial) and describes challenges in aligning different data modalities.
References and Further Reading
- Galaxy Training Network , Practical workflows for spatial transcriptomics QC.
- Bioconductor , R packages for spatial analysis, including
STUtility,Seurat, andSTexampleData. - NCBI Sequence Read Archive , Repository for raw spatial transcriptomics datasets.
- EMBL‑EBI Training , Online courses covering spatial transcriptomics data analysis.
- Spatial Transcriptomics in Ovarian Biology Technologies, Computational Challenges, and Biological Insights , Review of technical challenges in ovarian tissue.
- Region‑aware bridge modeling enables interpretable mesoscale representation of spatial transcriptomic tissue sections , Method for tissue section alignment and QC.
- A unified spatial transcriptome profiling of ten mouse organs , Benchmarking QC across multiple tissues.
- Cross‑species systems analysis distinguishes inflammatory remodeling from primary mucus secretory failure in inflammatory bowel disease , Example of validation using histology and cross‑species comparison.
- TAM‑targeted nanomedicine in cancer: biological basis, therapeutic strategies, and translational perspectives , Discusses tumor microenvironment spatial analysis (relevant for QC of tumor samples).
- Subregion‑specific insular dysconnectivity in internet gaming disorder: From macroscale network abnormalities to transcriptomic and cellular substrates , Demonstrates integration of spatial transcriptomic data with other modalities.