You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve trying to extract the spot coordinates from Staffli object in order to integrate single-cell RNA-seq with Spatial data.
I gotta the x and y by this data.frame(GetStaffli(A1_ST)[[]][,c(1,2)]),
I run my own code; the plot looks like this:
If I use ST.FeaturePlot, plot looks like this
The image generated by ST.FeaturePlot is correct since it’s the same as CellRanger. But image on my codes is upside down. I want to figure out what I did is wrong, if I pick up the wrong coordinate value? Would you please advise? Thanks
The text was updated successfully, but these errors were encountered:
The coordinates you are using are not the same ones used by ST.FeaturePlot. It uses either the pixel_x, pixel_y coordinates or warped_x, warped_x coordinates if the images have been processed. If you want to use these coordinates, you can just do something like:
Regardless of what coordinates you use, the y-axis goes from top to bottom. If you're using ggplot2 for example, the y-axis goes from bottom to top, so you need to invert the y axis to get the correct orientation. This can for example be done using scale_y_reverse(). Alternatively, you can invert the y-axis values like this: y_inv <- maxy - y
Hi Joe,
I’ve trying to extract the spot coordinates from Staffli object in order to integrate single-cell RNA-seq with Spatial data.

I gotta the x and y by this data.frame(GetStaffli(A1_ST)[[]][,c(1,2)]),
I run my own code; the plot looks like this:
If I use ST.FeaturePlot, plot looks like this

The image generated by ST.FeaturePlot is correct since it’s the same as CellRanger. But image on my codes is upside down. I want to figure out what I did is wrong, if I pick up the wrong coordinate value? Would you please advise? Thanks
The text was updated successfully, but these errors were encountered: