seurat
seurat copied to clipboard
Shifted high resolution image with Load10X_Spatial()?
Hi,
I am not sure it's a bug or not. Anyway, no problem to use the default low resolution PNG image. But when I used the high resolution PNG image, I got something like this:
code: plot2 <- SpatialFeaturePlot(MG.spatila_data, features = "nCount_Spatial") + theme(legend.position = "right")
Seems the dots are not overlapped with the image. By the way. I noticed my section is pretty small and have only 375 dots on it.
Thanks
Hi,
I have the same issue. The plot does not overlay correctly when high resolution PNG image is used.
Could you fix that? Thank you!
When I loaded high resolution image, SpatialFeaturePlot cannot works well.
img <- Read10X_Image(paste(dat.dir,'spatial',sep='/'),image.name = 'tissue_hires_image.png') seurat.obj <- Load10X_Spatial(dat.dir,image=img)
Could you fix it? Thank you.
I used Seurat 4.1.1
Hi, @biosyssun I encountered the same problem. Have you solved it? Could you help me?
Hi,
I encountered the same problem as @Mnew1288 and I found a solution that works for me. I noticed that the points seemed scaled down small in the upper left corner and I figured that we must be using the wrong scalefactor. Seurat uses something they call scalefactors
to adjust the size of the dots/image. This is stored in object@[email protected]
and there are 4 of these scale factors: spot, fiducial, hires, and lowres. Seurat seems to expect in general that low-res images are being used, so it uses the lowres scalefactor during plotting. Since we're trying to use the high-res image, we want to use the hires scalefactor instead. I don't there's a direct way to tell Seurat to do this, but instead we can just set the lowres scalefactor to the hires scalefactor. Like this:
object@images@[email protected]$lowres = object@images@[email protected]$hires
Hope this helps!
@ggruenhagen3 thank you so much for this solution!
And how to upscale the spot size ?
It works for me. Thanks so much @ggruenhagen3
Thanks so much for providing folks with a workaround @ggruenhagen3 🙌
As of v5.1.0 it is finally possible to pass image.scale = "hires"
to SpatialDimPlot
and SpatialFeaturePlot
which should resolve this issue. If the spot size isn't quite to your liking it can also be adjusted using pt.size.factor
(default is 1.6).
Closing for now but feel free to open another issue if you run into any other issue 😄