pachterlab / voyager

From geospatial to spatial -omics
https://pachterlab.github.io/voyager/
Artistic License 2.0
61 stars 6 forks source link

A bug of Blank plots in workflow: Seurat V5 (with image) ->toSpatialFeatureExperiment -> plotSpatialFeature #34

Open huiyijiangling opened 1 week ago

huiyijiangling commented 1 week ago

image

Excellent work of your team in creating voyager!!! Thank you!

And I have to report a bug in using toSpatialFeatureExperiment. workflow: Seurat V5 (with image) ->toSpatialFeatureExperiment -> plotSpatialFeature toSpatialFeatureExperiment function seurat delete the image info (should be placed in imgData) which result in blank plotSpatialFeature().

In your example, the image were not embedded in example visium data, which resulting in failure of plotSpatialFeature() in data from seurat.

But the function of read10xVisiumSFE from original data from space ranger outputs is totally no problem. Could you help me to fix this? Or I should use addImg function after transformation?

alikhuseynov commented 1 week ago

Hi @huiyijiangling Thanks! Could you please show your code and sessionInfo(). I guess it is Visium data and not image-based ST like Xenium, since for those techs Seurat doesn't store any image. Currently toSpatialFeatureExperiment from Seurat to SFE doesn't support adding images yet (that's something I have on todo list) since Seurat stores H&E Visium image differently. You can try to add image manually addImg but coordinates of image or spot geometries would need to be flipped to match spots and corresponding image.