scverse / squidpy

Spatial Single Cell Analysis in Python
https://squidpy.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
400 stars 70 forks source link

Using squidpy.pl.spatial_segment on Xenium data #811

Closed justinesjw closed 3 weeks ago

justinesjw commented 3 months ago

Hi,

Thanks for building Squidpy!

May I know how to implement squidpy.pl.spatial_segment on Xenium data? I might have missed it, but I could not find it in any tutorial.

This is the code that I am using sq.pl.spatial_segment( adata, seg_cell_id="cell_id", crop_coord=[(0, 0, 200, 200)] )

and I get this error.

image

I've tried substituting library_id with some parameters I can find in the adata, but I can't seem to fix this.

Thanks!

Best, Justine

LLehner commented 3 weeks ago

Hi @justinesjw, thank you for using squidpy.

I don't think this method can be robustly used for all spatial omics technologies anymore and it will also be deprecated eventually because plotting and visualization of spatial omics data is now done with spatialdata-plot and napari-spatialdata. I would recommend using those tools for plotting the segmentation mask on top of spatial omics data.