R/Visium_hull.R
getFlippedTissueCoordinates.Rd
Seurat object internally store spot coordinates (see Seurat::GetTissueCoordinates()). However, at least in the case of Visium, data are flipped and rotated before SpatialDimPlot. This function return the rotated/flipped tissue Coordinates from a Seurat object.
getFlippedTissueCoordinates(seurat_obj, as_data_frame = FALSE)
a seurat object with tissue coordinates.
return x/y coords as data.frame. Default to SeuratObject.
a seurat object with slots/metadata $x_coord and $y_coord (or a dataframe if as_data_frame is TRUE).
display_visium_hull
load_example_dataset("7870305/files/lymph_node_tiny_2")
#> |-- INFO : Dataset 7870305/files/lymph_node_tiny_2 was already loaded.
lymph_node_tiny <- getFlippedTissueCoordinates(lymph_node_tiny_2)
df <- getFlippedTissueCoordinates(lymph_node_tiny_2, as_data_frame=TRUE)