theMILOlab / SPATA2

A Toolbox for Spatial Transcriptomics Analysis
https://themilolab.github.io/SPATA2/
93 stars 16 forks source link

issue with VisiumV2 class object #125

Open thdk13 opened 4 months ago

thdk13 commented 4 months ago

Hi, I faced the issue with Seuratv5, when it produces a VisiumV2 class. It failed to convert this seurat object to spata2 object. spata2_object_zh1019T1 <- SPATA2::asSPATA2( object = seurat_objects[[1]], sample_name = "SPATA2_ZH1019T1", image_name = "tissue_lowres_image.png", spatial_method = "Visium" ) 13:45:28 Setting up new spata2 object. 13:45:28 Transferring data. Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘asHistologyImaging’ for signature ‘"VisiumV2"’ It would be great if you can add one more VisiumV2 in 'spatial_method' Thank you

Wangzy00 commented 4 months ago

the same problem when using initiateSpataObject_10X: spata2_object <- initiateSpataObject_10X( directory_10X = "./space/shNC", sample_name = "shNC" ) ........ Using method 'umap' 13:08:14 Optimization finished 13:08:14 Initiating spata2 object. 13:08:14 Setting up new spata2 object. 13:08:14 Transferring data. Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘asHistologyImaging’ for signature ‘"VisiumV2"’

with : Seurat v5.1.0 Spata2 v2.0.4

It would be great if you can add VisiumV2 in 'spatial_method' Thank you for making such a great package

Wangzy00 commented 4 months ago

For now, returning to Seurat v5.0.3 works.

thdk13 commented 4 months ago

For now, returning to Seurat v5.0.3 works.

Thank you so much for your suggestion. It works now.

Rashmithapa commented 3 months ago

I am trying to install SPATA2 but getting these warnings: in method for ‘asHistologyImaging’ with signature ‘"AnnDataR6"’: no definition for class “AnnDataR6” in method for ‘asSPATA2’ with signature ‘"AnnDataR6"’: no definition for class “AnnDataR6” Note: possible error in 'getTrajectoryLength(object = object, ': unused arguments (trajectory_name = trajectory_name, binwidth = binwidth, of_sample = of_sample) Note: possible error in 'asSingleCellExperiment(object, ': unused argument (type = "BayesSpace") Note: possible error in 'getGeneMetaDf(object = object, ': unused argument (of_sample = of_sample) Note: possible error in 'add_outline_variable(coords_df = getCoordsDf(object), ': unused arguments (coords_df = getCoordsDf(object), ccd = getCCD(object, unit = "px")) Note: possible error in 'getGeneMetaDf(object = object, ': unused argument (of_sample = of_sample)

I am using R version 4.4.1 (2024-06-14) Platform: aarch64-apple-darwin20 Running under: macOS Sonoma 14.5 Seurat 5.0.3. Also got the same error when using Seurat 5.1.0. I would be very grateful if this issue would be solved.

simonmfr commented 3 months ago

Dear all, thank you for reporting the issue. We are about to release a new version with improved core architecture, along with a publication (currently in press). This should resolve the current issue. Please bear with us for a few more weeks.

AMAwatermelon commented 3 months ago

Is there any way around that now? 【【 unable to find an inherited method for function ‘asHistologyImaging’ for signature ‘"VisiumV2"’】】

pnolabs commented 2 months ago

Dear MILOlab,

I was also wondering if there is currently a way around this incompatability.

I have a seurat v5 object (a merged object of 4 samples and 4 spatial images). I tried converting the seurat v5 object to v3 and switching back from the current seurat package version (v5.1.0) to v4.4.0 however without success. The issue persists: Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘asHistologyImaging’ for signature ‘"VisiumV2"’

Do you have any other suggestions what I could try in the meantime until your new version is released?

Thank you very much!

kueckelj commented 1 month ago

Dear all, I am sorry for the late reply. The last version release has been quite time and energy consuming and our team is small. We have adjusted the asSPATA2() function to work with the new Seurat v5. The tutorial on package compatibility elaborates on that. I hope that this fixes any problems. If you still encounter some with the function asSPATA2() please let us know. We will be able to fix these things faster from now on.