JiekaiLab / scDIOR

scDIOR: Single cell data IO softwaRe
GNU General Public License v3.0
131 stars 11 forks source link

Can not save spatial data into h5ad #17

Open archanabhardwaj opened 1 year ago

archanabhardwaj commented 1 year ago

Hello I used following line of code to save spatial data into h5 and loaded in python.

in R

dior::write_h5(data, file='scdata.h5', object.type = 'singlecellexperiment')

in Python

adata = diopy.input.read_h5(file = 'scdata.h5')

But it does not show "spatial" data in obsm .

AnnData object with n_obs × n_vars = 100 x 200 obs: 'orig.ident', 'nCount_Spatial', 'nFeature_Spatial', 'cell.ids', 'nCount_SCT', 'nFeature_SCT', 'integrated_snn_res.0.1', 'seurat_clusters', 'integrated_snn_res.0.2', 'integrated_snn_res.0.3', 'integrated_snn_res.0.4', 'integrated_snn_res.0.5', 'integrated_snn_res.0.6', 'integrated_snn_res.0.7', 'integrated_snn_res.0.8', 'integrated_snn_res.0.9', 'ident' obsm: 'X_pca', 'X_umap'