Picture this: you have spinal cord sections from three different people. Same tissue, same protocol… and yet one is tilted, another has wandered off to a corner of the slide, and the third looks a bit bigger than the rest. Before comparing what happens in, say, the dorsal horn across subjects, all of them need to line up first. That is the alignment problem, and it is what Victor has been working on for a while now with his new tool, STIMA 🚀
Why another alignment tool?
Spatial transcriptomics (ST) lets us measure gene expression while keeping track of where in the tissue it happens. As costs keep going down, experiments generate more and more slices per assay, and every one of them needs to be put in place.
There are already quite a few alignment methods out there, but many of them do two jobs at once: they move the samples into a common coordinate system, and they also merge their gene expression into a single integrated dataset. Useful sometimes, but it can blur the transcriptomic independence of each subject. And if what you want is to compare subjects, you would rather each of them stayed itself.
Enter STIMA
STIMA (Spatial Transcriptomics Image-based Methods for Alignment) is an open-source R package that aligns ST samples pairwise using only the tissue image. No gene expression involved, and no stretching or warping of the tissue either: just good old translation, rotation and scaling. It comes in three flavours:
- 📐 GTEM (Geometric Transformation Estimation Model): you click a few reference landmarks on both images, and the model estimates the transformation.
- 🔄 Procrustes transformation: same hand-picked landmarks, different maths to find the best fit.
- 🤖 RVSS-ImageJ (Register Virtual Stack Slices): the ImageJ plugin finds the landmarks for you through automatic feature extraction.
Under the hood, STIMA gets along with the tools you are probably already using. You give it a merged Seurat v5 object (your reference subject plus the unaligned ones), it relies on semla (yes, named after the Swedish cream bun 🥐) to load the images and apply the transformation, and you get back the same object with every subject aligned and ready for downstream analysis.
Does it actually work?
Naturally, it had to be put to the test. Victor benchmarked STIMA against two widely used tools, STalign and PASTE2, on two datasets: healthy human spinal cord (Yadav et al., 2023) and mouse brain (Basu et al., 2026). Alignment quality was measured in four ways:
- 🖼️ Two pixel-similarity metrics (grayscale MSE and SSIM)
- 📍 How close the reference landmarks end up after alignment
- 🧬 A biological check: how similar the cell-type proportions of the reference and aligned samples are after deconvolution (RV coefficient)
The result: STIMA consistently did better than the published methods, and among its three approaches, GTEM was the most accurate one.
Give it a spin
STIMA is free and open-source, so feel free to try it on your own slides at github.com/ConesaLab/STIMA. And if something breaks, let us know (that is how tools get better, folks).
This work is by Victor, together with Sonia Tarazona (UPV) and Ana. Congrats, Victor, all those hours of clicking landmarks paid off 😉
Ever noticed the little heart over the “i” in the STIMA logo? In Valencian, estimar means “to love”… so yes, this is a tool made with a lot of estima for your tissues ❤️