Learn R Programming

coFAST (version 0.2.0)

Addcoord2embed: Add the spatial coordinates to the reduction slot

Description

Calculate the adjacency matrix given a spatial coordinate matrix with 2-dimension or 3-dimension or more.

Usage

Addcoord2embed(seu, coord.name, assay = "RNA")

Value

return a revised Seurat object with a slot `Spatial` in the reductions slot.

Arguments

seu

a SeuratObject with spatial coordinate information in the meta.data slot.

coord.name

a character vector, specify the names of spatial coordinates in the meta.data slot. For example, c("x", "y").

assay

a string, specify the assay.

References

None

See Also

None

Examples

Run this code
data(CosMx_subset)
library(Seurat)
Addcoord2embed(CosMx_subset, coord.name = c("x", "y"))


Run the code above in your browser using DataLab