Understanding SpatialFeaturePlot alignment of points to image #10098
Replies: 1 comment
-
Got it to work - here´s the solution if anyone is in the same situation. The trick is to scale the coordinates retrieved by GetTissueCoordinates() with the scale factor, then switch rows/x and cols/y coordinates - and finally, invert the y coordinates (and position the grob accordingly). Here´s a minimalistic example: tmp_img=object_to_use@images[[image]]@image #Convert to grob #Spot coordinates #Scale coords to image #Get gene information #Plot everything |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I´m working with 10x HD Visium data in Seurat and trying to replicate the output of SpatialFeaturePlot - in part to understand it, but also to customize the plot to my liking.
I am having trouble aligning the points. The following code does not align points/spots to the image correctly. I have implemented size factors. What information am I missing?
Best,
Beta Was this translation helpful? Give feedback.
All reactions