aristoteleo / spateo-release

Spatiotemporal modeling of spatial transcriptomics
https://spateo-release.readthedocs.io/
BSD 2-Clause "Simplified" License
151 stars 25 forks source link

KeyError: 'Index (0) not understood. ...' #240

Open Mollyx06 opened 1 month ago

Mollyx06 commented 1 month ago

Hello, I'm trying to build a 3D model using my own spatial slice information, the integration process is as follows, the slices have been aligned adata_list_coords = [adata.obsm['align_spatial_3d'] for adata in adata_list] merged_data0 = anndata.concat(adata_list, axis=0) merged_data0.obsm['align_spatial_3d'] = np.concatenate(adata_list_coords, axis=0) image But when I try to build the model, the indexing problem is reported as an error two_pc, plot_cmap = st.tdr.construct_pc(adata=merged_data0.copy(), spatial_key="align_spatial_3d", groupby=None, key_added="chip_id", colormap="rainbow") image I'd like to know what exactly is meant by indexing here, are the 3D coordinates corresponding to the cells? How do I go about troubleshooting this problem

caiquanyou commented 2 weeks ago

I got the same problem, any ideas?

caiquanyou commented 2 weeks ago

two_pc,= st.tdr.construct_pc(adata=merged_data0.copy(), spatial_key="align_spatial_3d", groupby=None, key_added="chip_id", colormap="rainbow") return one object would be ok