Grouping/merging CosMx FOVs into cores in SpatialData

Hi all and thanks for the awesome Python ecosystem for single-cell and spatial omics data analysis!

I’m working with CosMx SpatialData from a TMA experiment, where each core consists of 4–9 FOVs. Currently, each FOV has its own image, labels, and shapes elements in the SpatialData object. All elements are already available in the "global" coordinate system.

My goal is mainly visualization ergonomics in Napari (via napari-spatialdata): I’d like to be able to easily show/hide entire cores rather than managing many per-FOV layers.

My question is: what is the best way in SpatialData for grouping elements (without duplicating data)?

Appreciate any guidance or examples from similar TMA workflows.

Thanks!

Hi, I suggest to add additional coordinate systems representing cores. An alternative approach is to fuse the data for certain FOVs, as sketched in this demo: 2026_04_hackathon_padua/transformations/fuse_sdata_images.ipynb at stitching · scverse/2026_04_hackathon_padua · GitHub.

Additional info. @timtreis and @quentinblampey have been working on a new reader for CosMx. Tim updated me that in a few weeks the reader will go online and will take care of the FOVs handling.

This notebook seems very promising! I will try to find some time and report back.

How will it know which FOVs should be stitched together?
In my case this will not be useful though, I am not using the data exported from AtoMx but data that has been preprocessed and transformed into a zarr file.

The notebook worked perfectly for sticking the images together. Do you know how I can do the same thing for labels, points and shapes?

Great to hear that the notebook covered your use case for images.

To make it work for labels, points and shapes one would have to implement an extension to multiview-stitcher. A new reader for cosmx() (the one mentioned here Grouping/merging CosMx FOVs into cores in SpatialData - #3 by LucaMarconato) is on the way, but unfortunately the timeline is being dilated. Stay tuned!

1 Like