spatialdata-io icon indicating copy to clipboard operation
spatialdata-io copied to clipboard

Reader does not support cell segmentation of visium hd got after using latest spaceranger version 4

Open rahmaqadeer opened this issue 5 months ago • 3 comments

I am using the visiumhd data from the latest spaceranger pipeline that also contain segmented outputs but the reader doesnot support it unfortunately. It just work with bins Is there any possibility to read the segmented outputs through the reader?

        sdata = visium_hd(
            path=full_path,
            dataset_id=sample_name,
            bin_size=8
        )

rahmaqadeer avatar Aug 22 '25 22:08 rahmaqadeer

I haven't tried this. But spaceranger v4 creates a folder named "segmented_outputs". In it, there are some ".geojson" files that can be parsed into shapes.

https://spatialdata.scverse.org/en/stable/tutorials/notebooks/notebooks/examples/models2.html#polygons-multipolygons

SizhaoLu avatar Aug 28 '25 19:08 SizhaoLu

I just realized it can be parses easily sd_io.geojson({path_to_geojson}, coordinate_system={sample_id})

SizhaoLu avatar Aug 28 '25 19:08 SizhaoLu

Further discussed in https://github.com/scverse/spatialdata-io/issues/310

NadineBestard avatar Sep 10 '25 13:09 NadineBestard