STOmics / Stereopy

A toolkit of spatial transcriptomic analysis.
MIT License
195 stars 65 forks source link

using sc.pl.spatial in Scanpy: 'images' not found in stereo spatial data #318

Closed pmf816 closed 2 months ago

pmf816 commented 2 months ago

Hi there,

Thanks for the tool.

I saved the stereo-seq data as a .h5ad file according to the web manual (adata = st.io.stereo_to_anndata(data, flavor='scanpy', output='stereo_out_T312.h5ad)), and then used Scanpy for downstream analysis. Which went smoothly at first, but when running sc.pl.spatial() the following error occurred.

截屏2024-08-09 上午10 34 09

I understand that this error occurs because the 'images' key is not found in the spatial data. However, I'm unsure why this key is missing or how to resolve this issue?
I look forward to your reply.

The information of the input file is as follows:

截屏2024-08-09 上午10 34 24

tanliwei-coder commented 2 months ago

Our souce file GEF/GEM dosen't contain image information, so the h5ad file converted from GEF/GEM will also have no image, sc.pl.spatial has a parameter img, you can pass the corresponding image data through this parameter.

pmf816 commented 2 months ago

Thanks again, sc.pl.spatial(adata, color=['Wfs1'],sort_order=True, spot_size=2) is work for me.