Showing posts with label 10x Genomics. Show all posts
Showing posts with label 10x Genomics. Show all posts

Monday, September 7, 2026

Visium HD: What Changes When Resolution Goes Subcellular

Spatial transcriptomics · Visium HD · Xenium · CosMx · platform comparison

Why Resolution Matters (and Why It Is Not Everything)

Visium HD delivers 2 µm bins — roughly single-cell resolution — while the original Visium captures 55 µm spots that each contain 5–20 cells. That 27x improvement in resolution sounds decisive. In practice, the right platform depends on your biological question, not just the spec sheet.

This post covers what Visium HD actually changes analytically, where it outperforms its predecessor, and when Xenium or CosMx is the better choice despite having a fixed gene panel.

Figure 1. Left: spatial resolution comparison — Visium HD achieves 2 µm bins vs. 55 µm spots for Visium v1. Right: capability trade-offs across platforms normalized to maximum observed values.

What Visium HD Changes: The Bin Model

Visium HD does not capture individual cells — it captures 2 µm square bins that tile the tissue continuously. The key workflow difference is binning strategy: you choose a bin size at analysis time, not at capture time.

import squidpy as sq
import scanpy as sc

# Load Visium HD at 8 µm bins (good starting point — balances resolution and sparsity)
adata = sq.read.visium(
    path="visium_hd_output/",
    counts_file="filtered_feature_bc_matrix.h5",
    library_id="your_sample_id",
    bin_size=8,  # options: 2, 8, 16 micrometers
)

print(adata)
# AnnData: n_obs (bins) depends heavily on bin_size
# bin_size=2:  ~500,000 bins (very sparse, ~2-5 UMI/bin)
# bin_size=8:  ~30,000 bins (workable, ~50-100 UMI/bin)
# bin_size=16: ~8,000 bins (Visium-like density)

Start with 8 µm bins for exploratory analysis. At 2 µm, most bins will have fewer than 5 UMI — too sparse for reliable clustering without heavy smoothing. Only use 2 µm bins if you need subcellular resolution for a specific question (e.g., resolving nuclear vs. cytoplasmic transcript localization).

The Critical Difference: Deconvolution Is Optional

With Visium v1, cell2location or RCTD is mandatory to get cell type proportions per spot. With Visium HD at 8 µm bins, many bins will contain a single dominant cell type and can be annotated directly by marker expression — though mixed bins still exist at tissue interfaces.

# Standard clustering works directly on HD bins
sc.pp.filter_cells(adata, min_counts=10)
sc.pp.normalize_total(adata, target_sum=1e4)
sc.pp.log1p(adata)
sc.pp.highly_variable_genes(adata, n_top_genes=3000)
sc.tl.pca(adata)
sc.pp.neighbors(adata, n_neighbors=15)
sc.tl.leiden(adata, resolution=0.4)

# Annotate by marker expression (same workflow as scRNA-seq)
sc.pl.dotplot(adata, markers_dict, groupby="leiden")

# Optional: if you want single-cell precision at 2µm bins,
# still use cell2location with matched scRNA-seq reference

Visium HD vs. Xenium: Choosing the Right Tool

Choose Visium HD when:

  • You need whole-transcriptome coverage (not a fixed panel)
  • Your question involves discovery — finding unexpected cell states or pathways
  • You have FFPE tissue (Visium HD supports FFPE; Xenium also does)
  • You want spatial multi-omics (Visium HD + CUT&TAG or protein co-detection)

Choose Xenium/CosMx when:

  • You need subcellular resolution (mRNA localization within a cell)
  • Your target genes are already known and a panel of 100–500 genes is sufficient
  • You need higher sensitivity per transcript (in-situ amplification vs. sequencing)
  • Your tissue is thick or 3D (Xenium handles z-stacking)

Squidpy Compatibility

Visium HD AnnData loads exactly like Visium v1 from Squidpy's perspective. All tools covered in this series work without modification:

# Everything from earlier posts works identically on Visium HD
sq.gr.spatial_neighbors(adata, coord_type="generic", n_neighs=6)
sq.gr.nhood_enrichment(adata, cluster_key="leiden")
sq.gr.ligrec(adata, n_perms=500, cluster_key="leiden")
sq.gr.spatial_autocorr(adata, mode="moran")

# The only practical difference: more bins = longer runtime
# nhood_enrichment on 30,000 bins takes ~10 min vs ~2 min for Visium v1

One Practical Warning: Tissue Coverage

Visium HD captures a 6.5 mm × 6.5 mm area — identical to Visium v1. This is enough for most tissue sections but smaller than a typical whole-slide image. If your question requires comparing multiple tumor regions across a large section, you will need multiple capture areas or switch to a platform with larger footprint (some CosMx runs cover full slides).

Interested in what the immune cell types you are mapping at single-cell resolution are actually doing in the tumor? NeoantigenLab covers T cell exhaustion, checkpoint inhibitor mechanisms, and CAR-T biology at the molecular level.

Get the complete pack

SpatiaBio Squidpy Pack 1 — 16 Notebooks ($19)

All 16 notebooks — neighborhood enrichment, co-occurrence, ligand-receptor, spatial autocorrelation, publication figures, and the complete workflow. Includes memory tips for Visium HD. Ready to run on your own data.

Get it for $19 →

From the NeoantigenLab sister blog

Working with tumor transcriptomics for neoantigen research?

NeoantigenLab covers neoantigen biology, WES pipelines, pVACseq, and HLA typing for experimental researchers — the biology behind what you're sequencing.

Visit NeoantigenLab →

Saturday, August 1, 2026

Xenium vs Visium: Which Spatial Transcriptomics Platform Should You Use?

By Lociven · SpatiaBio · July 2026

Xenium and Visium are both spatial transcriptomics platforms, but they answer different questions. Choosing the wrong one for your experiment wastes months and tens of thousands of dollars. This post walks through the real differences — resolution, throughput, gene panel, data format — and tells you which to use for which biological question.


The core difference

Visium measures RNA from tissue sections using spatially barcoded capture spots (~55 µm diameter). Each spot captures transcripts from multiple cells — typically 2–10 depending on tissue density. You get whole-transcriptome coverage across thousands of spots.

Xenium is an in situ platform. It detects individual RNA molecules inside intact cells using fluorescent probes, then reads them with iterative cycles of imaging. Each transcript is localized to a single cell, and cells are segmented computationally. You get single-cell resolution — but only for the genes in your panel (up to ~5,000 currently).

Rule of thumb: If you need to discover new cell types or pathways, use Visium (whole transcriptome). If you already know what cell types to look for and want their exact spatial positions, use Xenium.


Side-by-side comparison

Feature Visium HD Xenium
Resolution 2 µm bins (HD) / 55 µm spots (v2) Single cell (~10–20 µm)
Gene coverage Whole transcriptome (~18,000) Panel-based (280–5,000 genes)
Cell segmentation Requires separate image + algorithm Built-in (nuclear + cell boundary)
Tissue area ~6.5 × 6.5 mm (v2) ~1 × 1 cm per run
Run time ~1 day (library prep + sequencing) ~1–3 days (imaging cycles)
Cost per sample ~$500–800 reagents + sequencing ~$1,500–2,500 per slide
FFPE compatible Yes (FFPE kit) Yes (optimized for FFPE)
Best use case Discovery, whole transcriptome atlas Cell-type mapping, spatial niches

The same specs as the table above, arranged so the decision is visible. Left: every platform trades spatial resolution against how much of the transcriptome you measure — the top-right corner (single-cell resolution and whole transcriptome) is still empty. Right: what a single measurement covers, drawn to scale — a 55 µm Visium spot averages 5–20 cells into one profile, while Xenium resolves each cell separately.

When to use Visium

Use Visium when you don't know what you're looking for. It captures the full transcriptome, which means you can cluster spots, identify marker genes, run differential expression between regions, and discover spatial domains you didn't know existed.

Good fits:

  • First spatial experiment on a tissue type you haven't profiled before
  • Identifying tumor microenvironment zones (stromal, immune, hypoxic)
  • Comparing spatial gene expression between conditions (treatment vs control)
  • Generating hypotheses for follow-up experiments

Visium HD (2 µm bins) closes most of the resolution gap with Xenium for many tissue types. If your core facility has it, run HD over v2 whenever possible.


When to use Xenium

Use Xenium when cell identity matters more than gene discovery. Because it localizes transcripts to individual cells without deconvolution, you get clean cell-level data — especially important in tissues where cells are tightly packed or interdigitated.

Good fits:

  • Tumor-immune interface: exact positions of CD8+ T cells relative to cancer cells
  • Validating scRNA-seq findings with spatial context
  • High-resolution niche analysis (tertiary lymphoid structures, invasive margin)
  • FFPE clinical samples where you need single-cell resolution

Watch out: Xenium panel design matters enormously. If you miss key marker genes in your panel, you cannot recover that information post-hoc. Spend time designing the panel before you run the experiment.


Running both together

The strongest experimental design uses both platforms on serial sections from the same tissue block:

  1. Run Visium for whole-transcriptome discovery → identify spatial domains, candidate cell types, and key marker genes
  2. Design a Xenium panel from the Visium data
  3. Run Xenium on an adjacent section for single-cell resolution validation

This is now a standard approach in high-impact spatial studies. The cost is roughly 3–4× a Visium-only experiment, but the resolution of cell-type assignments is incomparably better.


Analyzing Xenium data with Squidpy

Squidpy handles Xenium data natively. The sq.read.xenium() function loads the Xenium output folder directly into an AnnData object with spatial coordinates and transcript-level data.

import squidpy as sq

# Load Xenium output
adata = sq.read.xenium("path/to/xenium_output/")

# Compute spatial neighbors
sq.gr.spatial_neighbors(adata, coord_type="generic", spatial_key="spatial")

# Neighborhood enrichment
sq.gr.nhood_enrichment(adata, cluster_key="cell_type")
sq.pl.nhood_enrichment(adata, cluster_key="cell_type")

The key difference from Visium: Xenium coordinates are in microns (not pixel units), and the cell-level resolution means you can run co-occurrence and neighborhood enrichment at true single-cell scale rather than spot scale.


Other platforms worth knowing

MERSCOPE (Vizgen) — similar to Xenium, MERFISH-based, strong in neuroscience applications. Up to 500 genes per panel in the standard configuration.

CosMx (NanoString) — RNA + protein in the same experiment, good for immune profiling where protein markers are still the standard.

Slide-seqV2 — 10 µm resolution, whole transcriptome, but lower sensitivity than Visium HD. Used in academic settings with existing infrastructure.


Go deeper

SpatiaBio Pack 3 — Platform Selection Guide

Everything above, fact-checked against current spec sheets in one reference PDF — capture area, gene panel size, cost per sample, and the tradeoffs that actually matter when you're the one signing off on the platform choice.

Get Pack 3 →

From the NeoantigenLab sister blog

Working with tumor transcriptomics for neoantigen research?

NeoantigenLab covers neoantigen biology, WES pipelines, pVACseq, and HLA typing for experimental researchers — the biology behind what you're sequencing.

Visit NeoantigenLab →

Tags: Xenium, Visium, Visium HD, spatial transcriptomics, 10x Genomics, MERSCOPE, CosMx, single-cell resolution, Squidpy, spatial omics comparison

Squidpy's Delaunay Radius Pruning Builds a Graph You Can't Save — Here's the Workaround

Squidpy · spatial_neighbors_delaunay · h5ad · IORegistryError · still in latest release Squidpy's Delaunay Radius Pruning Builds a G...