theMILOlab / SPATA2

A Toolbox for Spatial Gene Expression Analysis
77 stars 15 forks source link

gdata remains empty after asSPATA2 conversion #108

Closed deprodas closed 2 months ago

deprodas commented 3 months ago

Hi there, I have used the SPATA2::asSPATA2() function to convert the Seurat object to a SPATA2 object. Everything else is fine but, the gdata remains empty after the conversion. I have attached a screenshot of the SPATA2 object.

Screenshot (28)

I am using Seurat v 5.0.2 and SPATA2 v 2.0.4. The code I have used to convert the Seurat object to SPATA2 object is given below-

spata_obj <- SPATA2::asSPATA2(object = seurat_obj, 
                              sample_name = "ST21",
                              assay_name = "Spatial",
                              image_name = "tissue_lowres_image.png", 
                              spatial_method = "Visium", 
                              transfer_meta_data = TRUE)  

I have been stuck with this issue for couple of days. So, any suggestion would be helpful.

simonmfr commented 3 months ago

Hi @deprodas, thanks for reporting. Please update SPATA2 and retry. Everything from seurat_object[[assay_name]][[]] should now be correctly moved to gdata.

deprodas commented 3 months ago

Dear @simonmfr, thank you for responding so quickly. Even after updating SPATA2 the gdata is still empty. However, I have been able to bypass this issue by calculating the gdata using the computeGeneMetaData2() function. Afterwards, I added the vector to the SPATA2 object. 

simonmfr commented 2 months ago

@deprodas Thanks - given that we will release a major update with improved handling of feature/gene-level metadata, I'm closing this. Feel free to re-open if necessary.