Table of Contents

An Introduction to Spatial Proteomics: From Raw Images to Spatial Analysis

阅读中文版 →

How multiplexed protein imaging data are shaped, the three families of platforms, the preprocessing pipeline, and how the analysis differs from spatial transcriptomics

Spatial proteomics means staining a single tissue section with dozens of antibodies, each "painting" a different protein, imaging it, and then segmenting the image into individual cells. The end product is a quantitative answer to "how much of each protein is in each cell, and where that cell is".

This post uses real data from SPORA, a public collection hosted by EMBL-EBI (35 cohorts), together with other public repositories such as Zenodo. Following the data format, the imaging platforms, the underlying image structure and the analysis pipeline, it lays out the main path from a tissue section to spatial analysis.

A piece of tissue (real IMC sample)1ChannelsOne image = one protein2Cell ID mapOne color = one cell3TablecellxyE-cadCD3CD6815069998121044.71.31.22149514.97.34.2101851798452.30.3180.6One row = one cell
Figure 0 | A real IMC lung cancer sample: from multichannel grayscale images and a numbered cell mask to the single-cell table.

The post has seven parts:

  1. Why keeping spatial coordinates matters.
  2. Comparing the three platform families: mass spectrometry, cyclic fluorescence, and single-round multispectral imaging.
  3. Breaking an image down into pixels, channels and bit depth.
  4. Walking through the pipeline from preprocessing and cell segmentation to annotation.
  5. File sizes, pyramids, and the four-layer data structure.
  6. Comparing spatial transcriptomics and spatial proteomics point by point on real data.
  7. A checklist of the most common mistakes when standardizing data.
01

Why must we keep the spatial position of cells?

Key points
  • Dissociation-based sequencing loses the spatial relationships between cells in their microenvironment
  • Only original coordinates can reconstruct tumor nests and immune infiltration
  • Spatial proteomics quantifies protein abundance and cell boundaries directly on the section

Before encountering multiplexed imagingdetecting many proteins on one section, simultaneously or over several rounds, many researchers know single-cell sequencing better. Conventional single-cell sequencing dissociates tissue into a suspension. You can still count the proportions of each cell type, but once cells leave their microenvironment, the information about which cells were next to which is lost completely.

DissociateTissue blockDigest into a cell suspensionSequence cell by cellCell × gene tableNo coordinatesIn situTissue blockCut 4–5 µm sectionsMultiplexed imagingCell × protein tablex, y in µm
Figure 1 | The basic difference between the two routes: dissociation sequencing breaks the tissue into a cell suspension first, so the resulting table has no coordinates; in situ imaging reads the signal directly on the section, point by point or field by field, so every cell keeps its own coordinates (schematic).

The figure below comes from SPORA (a public data collection hosted by EMBL-EBI; names in parentheses below such as allam2022 are its cohort IDs). It shows one lung cancer core from the allam2022 cohort's tissue microarraydozens of ~1 mm tissue cores stained and imaged on one slide (TMA): about 1.5 mm across, 1 µm/pixel, 26 channels, segmented into 17,388 cells. 2,500 randomly sampled cells are shown:

  • Left: original coordinates discarded and cells scattered randomly in a disk, mimicking the loss of spatial relationships after dissociation.
  • Right: each cell keeps its original coordinates, recovering the real arrangement in the tissue.
Simulated dissociation: coordinates droppedIn situ: real coordinatesvsEpi./tumorT cellB cellMyeloidStromalOther
Figure 2 | 2,500 cells from the same IMC lung cancer sample: left, a dissociation-like view with shuffled positions; right, the real arrangement with in situ coordinates.

Put the two side by side and the difference is obvious:

  • Shuffled positions: epithelial/tumor, T, B, myeloid and stromal cells are simply mixed in the disk in proportion. You cannot tell which cells surround which.
  • Real coordinates restored: on the right, orange epithelial/tumor cells form clear tumor nests, blue T cells gather mostly between the nests, green B cells are scattered, and stromal cells run in between.
Key pointFor studying the tumor microenvironment and cell–cell interactions, these original coordinates are the most important information spatial proteomics adds over dissociation-based methods.
DNATranscriptionRNATranslationProteinSpatial transcriptomics: reads RNASpatial proteomics: antibodies → protein
Figure 3 | Different layers of the same central dogma: spatial transcriptomics reads RNA, spatial proteomics uses antibodies to read protein (schematic).
Spatial proteomics measures only dozens of proteins, far fewer than transcriptomics. What else can it answer?

The two answer questions at different levels:

  • Transcriptomics: good for genome-wide discovery, but sequencing-based single-cell methods lose spatial coordinates after dissociation, and imaging-based spatial transcriptomics detects only RNA.
  • Spatial proteomics: each experiment focuses on 20–60 validated antibody markers (some cyclic platforms reach over a hundred). Directly on FFPE or frozen sections (about 4–5 µm thick), it quantifies the molecules that actually do the work: protein abundance. Its clear cell boundaries reveal immune infiltration, tumor compartments and the cellular microenvironment.
02

How do the three imaging platforms get past the color bottleneck?

Key points
  • Spectral overlap limits conventional filters to 4–5 colors per acquisition
  • Mass spectrometry, cyclic fluorescence and single-round multispectral imaging each solve this differently
  • Choosing a platform trades off channel count, pixel size and field of view
Metal isotope→ mass spec imagingDNA barcode→ CODEX etc.Fluorophore→ cyclic / multispectral
Figure 4 | The antibody recognizes the protein, and the tag on its tail is what the instrument reads. The type of tag determines which platform family is used (schematic).

If spatial proteomics needs dozens of antibodies to "paint" a section, why not stain everything at once and image it once on an ordinary fluorescence microscope? The bottleneck is a physical one: spectral overlap. A microscope separates signals with color filters, but each fluorescent dye emits over a fairly broad peak, not a thin line.

Put 40 dyes in at once and their spectra crowd together and bleed into each other, as on the right of the figure below. A conventional filter set can barely separate about 4–5 colors at a time. To read dozens or even hundreds of proteins on one section, you have to get around the need to resolve 40 spectra at once, and this has given rise to three technical routes.

Want 40 proteinsFluorescence microscopeColors resolvedAbout 4–5Spectra crowd together (schematic)Wavelength →
Figure 5 | The color bottleneck: fluorescence emission spectra overlap, so conventional filters can reliably separate only about 4–5 colors.

Grouped by how they read out the signals carried by dozens of antibodies, mainstream imaging-based spatial proteomics platforms fall into three routes: mass spectrometry imaging, cyclic fluorescence and single-round multispectral imaging. The three cards below compare their tagging, readout, channel capacity, pixel size and main cost. These are also what ultimately determine image size and the preprocessing steps later on.

Mass spec imagingIMC · MIBITag: rare metal isotopesReadout: ablate spots → ions sorted by mass~40 proteins at oncePixel ~0.4–1 µm · field ~1 mm acrossNo autofluorescence; slowCyclic fluorescenceCODEX · CyCIFCell DIVE · MACSima · COMETTag: fluorophore (or DNA barcode + probe)Readout: 3–4 proteins/round, strip, repeat20–100+ proteins in total (by platform)Pixel ~0.17–0.65 µm · whole slidePer-round registration; many slow roundsSingle-round multispectralOrion · Vectra (Opal)Tag: many fluorophores on the slideReadout: one spectral scan → unmixing~6–20 proteins at oncePixel ~0.33–0.5 µm · whole slideFast, suits large cohorts; limited by overlap
Figure 6 | The three routes side by side: mass spectrometry imaging, cyclic fluorescence and single-round multispectral imaging compared by tagging, channel count and resolution.
  • Mass spectrometry imaging (IMC, MIBI): metal isotopes as tags, ablated point by point and read by mass, with no autofluorescence. One run measures about 40 channelsone grayscale layer, usually one marker (mostly proteins, plus DNA dyes and background channels), but it is slow and a single field is usually about 1 mm across.
  • Cyclic fluorescence (CODEX, CyCIF, Cell DIVE, MACSima, COMET): reads 3–4 proteins per round, then elutes or bleaches and repeats. The total can reach 20–100+ proteins (depending on the platform) over a whole slide, at the cost of time and the need for per-round registrationaligning the coordinates of each round.
  • Single-round multispectral (Orion, Vectra): one scan reads fluorescence from about 6–20 proteins, followed by spectral unmixingsplitting mixed signal using reference spectra. Scanning is fast and suits large cohorts, but the channel count is limited.
MACSima0.17 µm/pixel → 294 × 294COMET0.28 µm/pixel → 179 × 179CODEX0.5065 µm/pixel → 99 × 99IMC1 µm/pixel → 50 × 50Author-exported TIFF1.517 µm/pixel → 33 × 33Small pixels, more detailLarge pixels, less detail
Figure 7 | The same 50 µm of tissue at different pixel sizes: 294×294 pixels on MACSima, 50×50 on IMC. The last panel is a low-resolution multicolor TIFF the author exported with ImageJ (not an imaging platform), only 33×33 pixels.

The square cost of pixel size

Figure 7 shows the pixel-size trade-off. The same 50 µm square of tissue (about 4–5 cells across) takes 294×294 pixels on MACSima (0.17 µm/pixel), 50×50 on IMC (1 µm/pixel), and only 33×33 in the low-resolution TIFF the author exported with ImageJ (1.517 µm/pixel). Smaller pixels give sharper cell boundaries, but the number of pixels for the same area grows with the square.

Choosing a platform

Choosing a platform means trading off channel count, resolution and field of view:

  • Large whole-slide cohorts: Orion or Vectra are common choices.
  • Deep whole-slide profiling of dozens to hundreds of proteins: cyclic platforms such as CODEX or CyCIF.
  • Small TMA fields: IMC and MIBI are common.
03

What is a multiplexed image inside a computer?

Key points
  • A multiplexed image is a stack of 2D grayscale matrices of identical size
  • Channel count matches the number of markers; bit depth sets intensity precision
  • JPG/PNG cannot hold dozens of channels; research uses TIFF-type formats

The colorful tissue images in software are pseudocolor overlays made for human eyes. In storage, a spatial proteomics image is really a stack of 2D grayscale images with exactly the same height and width.

Figure 8 shows 12 of the 26 channels from the IMC lung cancer core in Section 01, all protein channels: epithelial (E-cadherin, PanKeratin), stromal (Vimentin, SMA), immune (CD3, CD8a, CD4, FoxP3, CD20, CD68, CD163) and proliferation (Ki-67), one image each. Each channel corresponds to one protein, and brighter means stronger local signal.

Figure 8 | Grayscale images of 12 channels from the same IMC lung cancer sample, each recording the spatial distribution of one protein signal.

Zoom in to the pixel level and a grayscale image is really a table of numbers. Take the DNA channel of a real CyCIF file (exemplar-001): in a 4×4 block at the edge of a nucleus, each cell of the grid stores an integer from 0 to 65,535 (from 60,580 inside the nucleus to 36,678 at the edge). The computer records protein signal as numbers: a larger value means a brighter pixel, meaning more protein or dye at that spot.

A grayscale image (DNA stain)60,58060,12160,33160,47357,64860,71060,26060,08349,47756,61359,65761,24336,67844,08750,40254,117Zoom to pixels: each square is a numberBrighter = larger number= stronger signal hereDNA dye here; proteins work the sameEach value 0–65,535 (16-bit)
Figure 9 | Zoomed to pixels: real 16-bit values in a 4×4 region of the DNA channel. Larger numbers mean stronger signal.

Two things need to be kept apart here: channel count and bit depththe number of intensity levels a pixel can take. An everyday RGB photo stores only 3 numbers per pixel (red, green, blue), while this CyCIF dataset stores 12 numbers per pixel, one for each of 12 markers.

Precision depends on bit depth: 8-bit gives only 0–255 (256 levels), 16-bit gives 0–65,535 (65,536 levels). On the right of the figure below, the same dim region of weak FOXP3 signal keeps 534 distinct values at 16 bits, but compressed to 8 bits over the full image range only 68 remain, and weak positive detail collapses into coarse banding.

Multichannel ≠ RGBBit depth: same weak signal (FOXP3)RGB photo3 numbers per pixelCyCIF file: 12 numbers per pixel(12 markers, one grayscale image each)16-bit: 534 valuesAs 8-bit: 68
Figure 10 | Left: RGB (3 numbers) vs CyCIF (12 numbers). Right: weak FOXP3 signal has 534 distinct values at 16 bits and 68 after compression to 8 bits.

This is why spatial proteomics analysis cannot use everyday image formats such as JPG or PNG. There are three reasons:

  • They are designed for RGB display to the human eye and cannot hold dozens of independent channels.
  • JPG is only 8-bit and uses lossy compression.
  • They lack standard fields for channel names and the physical pixel size.
SummaryResearch generally uses formats that support multiple pages and metadata: the TIFF family (e.g. OME-TIFF) or chunked multidimensional array formats (e.g. OME-Zarr).
04

How does an image become a single-cell table, step by step?

Key points
  • Preprocessing differs by platform; once artifacts are removed, all data join one workflow
  • Cell segmentation produces a mask; averaging each channel within it gives the single-cell table
  • Over-wide segmentation lets neighbor signal spill over and creates false double positives

Images straight off the instrument cannot be analyzed directly: post-acquisition preprocessing depends on how the platform works (Figure 11):

  • Mass spectrometry imaging: split acquisition regions (ROIs), read metal channels, remove outlier bright spots (hot pixels), compensate isotope spillover, and drop background metal channels.
  • Cyclic fluorescence: correct uneven illumination, stitch small fields of view, register each round to align the section across rounds, and subtract per-round background.
  • Single-round multispectral: centered on spectral unmixing, autofluorescence subtraction, and registration to an H&Ehematoxylin and eosin, the routine pathology stain image of the same section.

Once these platform-specific noise sources and offsets are removed, all data join the same downstream analysis path.

Platform-specific: post-acquisition preprocessingShared by all: the analysis that followsMass specSplit ROIsRemove hot pixelsSpillover comp.Drop bkg metalsCyclic IFIllum. correctionField stitchingRound alignmentBkg subtractionMultispectralSpectral unmixingRemove autofluor.H&E registrationCell segmentationSingle-cell quantificationAnnotation (cluster/gate)Spatial analysis
Figure 11 | Each platform handles different physical artifacts during post-acquisition preprocessing, then all converge on the same segmentation, quantification, annotation and spatial analysis workflow.

The first step after preprocessing is cell segmentationmarking the boundary of each cell in the image. Common models include Mesmer and Cellpose (pipelines such as steinbock and MCMICRO integrate them). The algorithm combines nuclear stain and membrane protein signals and outputs an integer label image with the same height and width as the original, called a maskpixel integers give the cell ID; 0 is background.

Input: nuclear + membrane channelsOutput: mask (one ID per cell)
Figure 12 | The segmentation model takes nuclear and membrane channels as input and outputs a mask with one ID per cell (schematic: colors stand for IDs; a real mask is an integer matrix with background 0, see below).

Figure 13 shows a three-panel comparison of a real tile, which makes it easy to check whether the segmentation follows the cell outlines:

  • Left: four-channel overlay.
  • Middle: mask with each cell in a different color.
  • Right: boundaries overlaid on the original image.
Figure 13 | Cell segmentation in three panels (a 200 × 200 µm region of the same IMC sample): the four-channel image (left; red = E-cadherin, green = CD3, blue = CD20, yellow = CD68), the color-coded segmentation mask (middle), and the boundary overlay for quality control (right).

With a mask you can do single-cell quantificationaveraging each channel over a cell's pixels. As Figure 14 shows, the program takes every pixel labeled 1777 in the mask, averages them in each channel (E-cadherin, CD3, CD68 and so on), and that gives one row of the table (E-cad 2.04, CD3 2.42, CD68 3.16), together with coordinates and area. IMC pixel values are ion counts, so they are much smaller than the 16-bit grayscale values in the tens of thousands in the CyCIF fluorescence image above. A whole slide often has hundreds of thousands of cells, beyond the 16-bit integer limit of 65,535, so masks are usually stored as 32-bit integers.

●●●●●●●●●●●●●●●●Pixels of cell 1777 in the label image(a small patch of a real mask)E-cadherinAverageCD3AverageCD68Averagecell1777E-cad2.04CD32.42CD683.16One row of the single-cell table
Figure 14 | Averaging the pixels of cell 1777 in the mask, channel by channel, gives one row of the single-cell table.

With the single-cell table in hand, each cell still needs a cell type annotation. The usual approach is unsupervised clustering followed by naming clusters by their highly expressed markers, or the gatingmanually drawing regions on 2D scatter plots to select positive populations used in mass cytometry (CyTOF). Figure 15 takes 250 random cells from the full single-cell table of this core and sorts them by their top marker. Epithelial (E-cadherin/PanKeratin), stromal (Vimentin/SMA), T cell (CD3/CD8a/CD4), B cell (CD20), macrophage (CD68/CD163) and proliferating (Ki-67) cells appear one block after another.

Figure 15 | Heatmap of 12 markers in 250 random cells (sorted by each cell's top marker): distinct cell populations form clear blocks.099th percentile of this marker
If segmentation is inaccurate, how much does it affect downstream analysis?

The single-cell table averages the pixels inside each mask boundary, so if a boundary takes in a few extra pixels from a neighbor, that neighbor's strong signal "spills over" into it. For example, when a T cell sits right against a tumor cell, an over-wide segmentation gives the T cell both high CD3 and high E-cadherin, creating a false "double positive".

NoteDifferent segmentation models also disagree on cell size and cell count. After segmentation, overlay the boundaries on the original image and spot-check them, and filter out abnormal cells by cell area and DNA intensity.
05

Why is the data so large? Four layers and metadata

Key points
  • Single images range from tens of MB to tens of GB; whole slides take most of the storage
  • Pyramids and tiling let you read a 100 GB image one field of view at a time
  • A sample contains images, masks, tables and metadata; metadata is the most error-prone

Spatial proteomics data sizes vary enormously (Figure 16):

  • Small-field samples: an IMC core is only about 20 MB (allam2022) to 40 MB (cords2024); a MIBI field (greenwald2026) is about 170 MB.
  • Resampled large tissue: a CODEX intestine section (hickey2023) resampled to 1 µm/pixel is about 0.6 GB.
  • Whole-slide images: covering 1–2 cm of tissue at 0.3–0.5 µm/pixel gives about 2 billion pixels per channel. CODEX liver cancer whole slides (ruf2023) average about 35 GB, and Orion whole slides (lin2023) about 50 GB.

Of SPORA's 4.9 TB in total, just 4 whole-slide cohorts account for 73%.

10 MB100 MB1 GB10 GB100 GBIMC tissue microarray core (allam2022)~20 MBIMC core (cords2024, mean)~40 MBMIBI field (greenwald2026, mean)~170 MBCODEX intestine section, 1 µm (hickey2023)~0.6 GBCODEX liver cancer whole slide (ruf2023, mean)~35 GBOrion whole slide (lin2023, mean)~50 GB
Figure 16 | Measured size of single images (log scale): small fields are tens to a hundred-odd MB, whole slides often reach tens of GB.

At 20–60 channels and 16 bits, an uncompressed whole-slide image can reach about 170 GB, far too large to load into the memory of an ordinary computer. For smooth viewing and computation, mainstream formats use pyramidmultiple copies of the image at progressively lower resolution and tilingeach level cut into fixed-size tiles compressed separately structures.

As Figure 17 shows, when you view the whole slide the software reads only the smallest thumbnail level, and when you zoom in it reads only the few tiles that fall in the field of view. Both OME-TIFF and OME-Zarr, which suits on-demand loading from the cloud, rely on this "read only what you need" mechanism.

One image stored at several levels (pyramid), each cut into tilesOverview: low-resZoom: mid levelDetail: needed tiles onlyWhole slide as one imageUp to ~170 GBCannot load into memory
Figure 17 | Pyramids and tiling: browsing reads the smallest level, zooming in reads only the tiles hit, avoiding loading an image of 100+ GB.

A complete spatial proteomics sample is not just images. As Figure 18 shows, it consists of four layers:

  1. Multichannel images (images)
  2. Segmentation masks (labels)
  3. Single-cell table (tables): e.g. .h5adan HDF5-based AnnData single-cell table file.
  4. Metadatathe "manual" describing sample and image properties: records each channel's antibody and target protein UniProt ID, physical pixel size, sample information, and registration to H&E.

Modern container formats such as SpatialData are built on OME-Zarr and use images, labels, tables and attrsglobal attributes and metadata fields to put the four layers into one folder with a shared coordinate system, so images, masks and tables can be queried together.

c × y × x Images · images Dozens of channels, uint16/float 25 Masks · labels Each pixel = ID of its cell cellxyareaCD3 … 2412871315.3 5430120980.4 … Single-cell table · tables AnnData / CSV, row = cell Channel → antibody clone → tag→ target protein (UniProt)Pixel size (µm/pixel)Sample, patient, tissue, diseaseRegistration to H&E Metadata Without it, the image can't be read SpatialData puts the four layers in one container (images · labels · tables · attrs) with a shared coordinate system (incl. the transform to H&E)
Figure 18 | The four layers of a sample: images, segmentation masks, single-cell table and metadata, which SpatialData can package together.

When analyzing public data, the most common problem is usually not the pixel matrix but metadata that is missing or easy to misread. Figure 19 compares three real cases:

  • Complete file: correct channel names and pixel size.
  • Unnamed channels: some public MIBI files have all 20 channels unnamed (the pixel size is there: 0.39 µm). You can only match them to the antibody table in the paper, and one row off means every channel is mislabeled.
  • Unusual units: a CODEX file records pixel size in centimeters (5.065E-5 cm, i.e. 0.5065 µm). This is legal in the OME standard, but software that ignores the unit and assumes micrometers will be off by a factor of 10,000.
Complete fileChannel names:DAPI, CD45 …Pixel:0.65 µmPixels + manualChannel names lostChannel names:???Pixel:0.39 µmPublic MIBI file: all 20 channels unnamedUnits easy to misreadChannel names:DAPI, CD45RA …Pixel:5.065E-5 cmIn cm: 5.065E-5 cm = 0.5065 µm
Figure 19 | Three real states of a file: complete manual (left), missing channel names (middle), and pixel size recorded in centimeters, easy to misread (right).

So when you get a file from a public download or straight off the instrument, do a round of metadata checks:

  1. Check channel order and protein names against the paper's methods section, and flag and exclude antibody-free background metal channels such as ArAr80 and Xe131.
  2. Check the pixel size value and its unit.
  3. Confirm that the bit depth has not been silently reduced, and whether multiple ROIs or TMA cores have been split into separate samples.
Key pointOnly when the "manual" is accurate does downstream quantitative analysis hold up.
06

How do spatial proteomics and spatial transcriptomics compare?

Key points
  • They start from opposite data shapes and sparsity; preprocessing and normalization must differ
  • Proteomics has few, dense features and often skips PCA for direct clustering or gating
  • After annotation both are stored with coordinates, and spatial tools are fully shared

Researchers with spatial transcriptomics experience often ask whether their existing pipeline carries over. The answer is: the second half is shared; the first half must be handled separately. Below, the same pipeline is run on a Xenium whole-slide breast cancer sample, an imaging-based spatial transcriptomics method (GSM9509156, 69,009 cells × 498 genes), and on the SPORA allam2022 IMC lung cancer cohort (26 TMA cores, 187,028 cells in total).

Difference 1: the shape of the raw data

The first difference is in the raw form (Figure 20):

  • Xenium: produces coordinates of RNA molecules labeled with gene names, which must be assigned to cells. (Sequencing-based Visium has capture spots that cover several cells, so it also needs deconvolutionestimating the proportions of cells within one spot.)
  • IMC: continuous grayscale pixel images; cell segmentation must draw the boundaries before averaging.
Spatial transcriptomics (Xenium)Spatial proteomics (IMC)
Figure 20 | Different starting points: left, Xenium's discrete RNA molecule coordinates (the gray background is DAPI nuclear stain; field about 150 µm across); right, IMC's continuous multichannel pixels and segmentation boundaries.

Different starting data lead directly to single-cell tables with opposite sparsity. Figure 21 takes 8 cells × 10 features from each of two real samples:

  • Xenium: stores integer counts of RNA molecules captured in each cell. The median cell has only 88 molecules and 41 genes, and 91.6% of the full table is 0, so it suits a sparse matrix.
  • IMC: stores the mean ion intensity within each cell boundary. The background itself carries weak signal, so only 0.7% of the full table is 0; it is a dense, continuous matrix with almost no zeros.
Spatial transcriptomics (Xenium)000000000000000000000000000000000000000000000000000091.6% of the full table is 0Shown: 8 real cells × 10 featuresSpatial proteomics (IMC)Only 0.7% of the full table is 0Shown: 8 real cells × 10 features
Figure 21 | 8 real cells × 10 features from each (the zero fraction of a patch is not that of the whole table): the full Xenium table is 91.6% zeros (integer counts); the full IMC table is only 0.7% zeros (continuous intensities).

Because the value distributions differ, normalizationremoving scale differences and extreme values to make data comparable must also be handled differently (Figure 22):

  • Transcriptomics: in Xenium, EPCAM is 0 in 77% of cells. The usual practice is to scale by each cell's total molecule count, then apply a log1p transform (i.e. ln(x+1)).
  • Proteomics: only a few dozen antibodies are measured and total signal differs greatly between cell types, so you cannot scale by the total. Instead, arcsinh (inverse hyperbolic sine; log-like in shape but defined at 0, usually applied after dividing by a cofactor) is used to compress the long high tail, and each marker is then clipped at its 99th percentile and scaled to 0–1, so that a few extremely high cells do not push most cells toward 0.
Figure 22 | Distributions and normalization: transcriptomics uses total-count scaling plus log1p; proteomics uses arcsinh plus 99th-percentile clipping.

Dimensionality also affects dimension reduction and clustering. Figure 23 runs the same PCAprincipal component analysis, compressing high-dimensional features first and UMAPa dimension reduction method that places cells on a 2D plane workflow on quality-controlled Xenium data (cells with fewer than 10 molecules removed, leaving 68,196 cells × 498 genes) and on subsampled IMC data (the 18 proteins measured in all 26 cores, 60,000 random cells). With 498 genes the cell populations separate very cleanly. With 18 proteins there is less information, the clusters run into each other, and the "other" fraction is higher.

That is why proteomics often skips PCA and clusters or gates directly on the markers. And if the panel has no endothelial marker, there is no way to find an endothelial population.

Figure 23 | UMAP comparison: Xenium (498 genes) has well-separated clusters, IMC (18 proteins) clusters sit closer together. This coarse clustering of Xenium merged B cells into the lymphocyte group, and the IMC panel has no endothelial marker, so each side is missing one class.

Once cells are annotated and placed back at their in situ coordinates, spatial analysis methods are fully shared between the two data types. Take neighborhood enrichmentcomparing how often each cell type occurs among neighbors versus after random shuffling as an example: take the 10 nearest neighbors of each cell, count them, and compute a z-score (positive/red means a tendency to cluster, negative/blue means mutual avoidance).

As Figure 24 shows, although the tissues differ, the pattern of results is strikingly similar: positive values on the diagonal show same-type cells clustering, and tumor and T cells show strongly negative values on both sides (Xenium −79, IMC −90; strongly negative in both the row and column direction).

Figure 24 | Neighborhood enrichment z-score heatmaps (color scale clipped at ±20): both show same-type clustering, and tumor and T cells are neighbors far less often than by chance (−79 / −90).
SummarySpatial transcriptomics has many features, sparse values, and starts from molecule points; spatial proteomics has few features, continuous values, and starts from multichannel images. As long as each gets its own preprocessing, segmentation and normalization, and the single-cell table and coordinates are saved as AnnData (or as the table layer in a SpatialData container), downstream clustering and spatial statistics can share one set of tools.
07

Run through a checklist before you start analyzing

Key points
  • Standardization errors mostly come from metadata and precision checks
  • Before ingestion, check channel mapping, background removal and pixel units one by one
  • Keep the matrix, the pipeline and the metadata in view and you avoid most detours

When organizing spatial proteomics data from many sources into a standard container (for example into SpatialData), errors usually come not from the algorithms but from details that were not checked. The table below lists the five most common pitfalls and how to check for each.

Misordered channels or inconsistent protein namesE.g. PanCK and Pan-Keratin used interchangeably, or mass spec export files ordered by metal isotope mass rather than antibody name; map each to a UniProt ID using the metadata
Non-protein background or blank channels mixed into the tableE.g. IMC argon/xenon background channels ArAr80 and Xe131, or blank background rounds in CyCIF; mark them as non-protein channels and remove them before single-cell quantification
Missing pixel size or units easy to misreadE.g. no µm information, or a value recorded in cm (5.065E-5 cm = 0.5065 µm) that software reads as µm; go back to the raw file or the paper and record the source
Reduced numeric precision or accidentally changed data typeE.g. a 16-bit image compressed to 8 bits, or integers (counts, mask IDs) saved as floating point float64; compare value ranges and types against the source file value by value
Several samples in one file or mismatched mask IDsE.g. raw IMC .mcd files often bundle several acquisition regions (ROIs) and laser test areas; split them by region, and check that mask IDs and the cell IDs in the single-cell table (cell_id) match one to one

Whether you are reusing a large public collection like SPORA or analyzing fresh sections from your own lab, at the start you do not need to memorize byte-level format details. Keep these three core ideas in mind and you will avoid most detours when reading images, choosing a platform and running the analysis.

1An image is a table of numbersChannel count, bit depth and resolution set the storage size. Know the shape of the matrix before drawing conclusions.
2Different preprocessing, shared downstreamOnce the three platform families remove their physical artifacts, segmentation through spatial statistics can share tools with transcriptomics.
3Check metadata before analysisIf channel mapping, pixel units, bit depth or mask IDs don't match, every later calculation is distorted.