mojaveazure / seurat-disk

Interfaces for HDF5-based Single Cell File Formats
https://mojaveazure.github.io/seurat-disk
GNU General Public License v3.0
139 stars 44 forks source link

Converting .rds (spatial transcriptomics) to anndata. #144

Open bogdan-bios opened 1 year ago

bogdan-bios commented 1 year ago

Hi,

I am new to this topic, so please do not mind any noob question. I downloaded .rds file (https://ftp.cngb.org/pub/CNSA/data4/CNP0002432/CRC_Stereo.rds) and read it using readRDS.

Next, I followed the instructions for the conversion to anndata (https://mojaveazure.github.io/seurat-disk/articles/convert-anndata.html).

However, after the function SaveH5Seurat(myfile, filename = "myfile.h5Seurat") , I get the following error.

Creating h5Seurat file for version 3.1.5.9900 Adding counts for Spatial Adding data for Spatial No variable features found for Spatial No feature-level metadata found for Spatial Adding image image Adding image image_P19_T Error in [.data.frame(x, , i, drop = TRUE) : undefined columns selected

Any solution/advice on this?

Thank you very much.

wqy399 commented 11 months ago

Try to rename the colnames of coordinates. For example, I found the name of one column in F3.bin40@images$F3_bin40@coordinates was "NA", when I changed the name, the problem was solved.