getFlippedTissueCoordinates: Seurat object internally store spot coordinates (see...

View source: R/Visium_hull.R

getFlippedTissueCoordinatesR Documentation

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.

Description

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.

Usage

getFlippedTissueCoordinates(seurat_obj, as_data_frame = FALSE)

Arguments

seurat_obj

a seurat object with tissue coordinates.

as_data_frame

return x/y coords as data.frame. Default to SeuratObject.

Value

a seurat object with slots/metadata $x_coord and $y_coord (or a dataframe if as_data_frame is TRUE).

See Also

display_visium_hull

Examples

load_example_dataset("7870305/files/lymph_node_tiny_2")
lymph_node_tiny <- getFlippedTissueCoordinates(lymph_node_tiny_2)
df <- getFlippedTissueCoordinates(lymph_node_tiny_2, as_data_frame=TRUE)

dputhier/dbfmcl documentation built on May 31, 2024, 8:57 a.m.