Each capture spot in the spatial transcriptomics (ST) grid holds a true mixture of three cell types. A second spatial proteomics assay of the same tissue lands on the slide with a fixed unknown affine offset (translation + rotation) because it comes from a serial section on a different instrument. Before any joint modelling can happen, the two coordinate systems must be registered: the correction transform below is applied to the proteomics grid and its distance to the true ST spot is measured as RMSE.
Once a spot is registered within tolerance, its (noisy) 6-gene mixed signal is deconvolved into per-cell-type proportions using a non-negative least squares (NNLS) multiplicative update against a fixed 6×3 reference signature matrix W, then validated against the known ground-truth mixture with R².
registration: RMSE = sqrt( mean_i | R(-θ)(x_i - t) - g_i |^2 )
deconvolution (Lee-Seung NNLS update), per matched spot:
h ← h ⊙ (Wᵀy) / (WᵀWh + ε), repeated N times, h ← h / Σh
validation: R² = 1 − Σ(p_true − h_est)² / Σ(p_true − mean(p_true))²
- Rotation / Offset X / Offset Z — the affine registration correction; drag until the proteomics markers snap onto the ST spots and RMSE drops toward zero.
- Auto-align — jumps the sliders to the exact correction that undoes the true misalignment, instantly maximising matched spots.
- NNLS iterations — how many multiplicative-update steps the deconvolution solver runs before reporting proportions; too few under-fits the mixture.
- Measurement noise σ — additive Gaussian noise on the 6-gene signal at each spot, simulating assay/detection noise that degrades deconvolution R².
This mirrors real pipelines (10x Visium + CyTOF/IMC/MALDI-MSI, tools like cell2location or CytAssist alignment): spatial registration must succeed before any cross-modality deconvolution or joint modelling result can be trusted.