Hello I am working on 10X visium spatial transcriptome data which was processed in seurat pacakge with image data. For my downstream analysis, I am trying to import seurat normalized data into scanpy. For this I converted seurat object to h5ad using these steps.
SaveH5Seurat(test_object, overwrite = TRUE, filename = "A1")
Convert("A1.h5seurat", dest = "h5ad", overwrite = TRUE)
Next, imported h5ad format file into scanpy :
adata1 = sc.read_h5ad("A1.h5ad")
But it does not contain any spatial and image information.
obs: 'orig.ident', 'nCount_Spatial', 'nFeature_Spatial', 'cell.ids', 'nCount_SCT', 'nFeature_SCT', 'seurat_clusters', var: 'features', 'SCT_features', 'genename' obsm: 'X_pca', 'X_umap' varm: 'PCs' layers: 'SCT'
raise KeyError(
KeyError: "Could not find entry in obsm
for 'spatial'.\nAvailable keys are: ['X_pca', 'X_umap']."
How can I add image and coordinate information in 'obsm' for spatial information ?
I would appreciate all the suggestion .
Thanks in advance
Hi, were you able to figure this out? I found that I couldn't even transfer pca information using Convert, the result only had umap information.