Skip to content

User guide

This guide explains how SMINT works, so you can choose the right path for your data and spot a bad result when you see one. Start with the workflow, then read the page for the step you are on. The how-to guides further down the navigation give the exact commands; the concept pages explain why they work the way they do.

The mental model

SMINT does two jobs, in order. First it finds cells. Cellpose segments cells and nuclei in a whole-slide image tile by tile, and SMINT stitches the tiles back into one set of outlines in which every nucleus sits inside exactly one cell. Then it puts everything in one coordinate system. Each extra modality, such as post-stain nuclei or spatial metabolomics pixels, is registered onto the spatial transcriptomics (ST) cells, which stay fixed as the reference. How SMINT registers depends on one question: was the second modality measured on the same physical section as the ST data, or on a neighbouring one? On the same section the cells correspond one-to-one, so SMINT matches points. On sequential sections they do not, so SMINT warps one image onto the other with landmarks and STalign LDDMM. Everything you get at the end is a table with coordinates in the ST frame, ready for the R scripts that assign transcripts and metabolites to cells.

flowchart LR
    I[Whole-slide image] --> S[Segment and stitch]
    S --> C[Cells and nuclei<br/>in image pixels]
    C --> R{Same section<br/>as the ST data?}
    R -- yes --> P[Match centroids]
    R -- no --> W[Warp with landmarks<br/>and LDDMM]
    P --> O[Tables in the ST frame]
    W --> O

Concepts

  • The SMINT workflow


    Every step from image to integrated table: what goes in, which function, command or napari widget runs it, what comes out and how long it takes.

    The SMINT workflow

  • Choosing a registration method


    A decision tree for same-section and sequential data, measured results on real data, and the two ways validation numbers can mislead you.

    Choosing a registration method

  • Coordinate frames


    Pixels versus microns, the order of pre-registration operations, the STalign row/column transpose, and which output column is in which frame.

    Coordinate frames

  • Tiling and stitching


    How a slide is cut into overlapping tiles, how duplicate cells are merged, trimmed or removed, and how to choose tile_overlap.

    Tiling and stitching

How-to guides

Once you know which path you are on, these pages cover every option:

If you would rather learn by running code, the tutorials walk through each path on example data with every output shown.