Closed KoichiHashikawa closed 1 week ago
Hello,
Please , i am trying to run "BuildNicheAssay" on my 10x visium data, but I am having error with the Fov, please can you guide me on how i can access this from my seurat object. here is my code :
coords <- sample39_obj@images$slice1@boundaries$centroids@coords coords
rownames(coords) <- sample39_obj@images$slice1@boundaries$centroids@cells
fov <- list(FOV = coords)
sample39_obj <- BuildNicheAssay( object = sample39_obj, fov = fov, group.by = "predicted.celltype", assay = "niche", cluster.name = "niches", neighbors.k = 30, niches.k = 5 )
Thank you. Odunola
Originally posted by @odunola26 in https://github.com/satijalab/seurat/issues/9044#issuecomment-2187182694
Please see https://github.com/satijalab/seurat/issues/9047.
Please , i am trying to run "BuildNicheAssay" on my 10x visium data, but I am having error with the Fov, please can you guide me on how i can access this from my seurat object. here is my code :
Extract spatial coordinates from the centroids object
coords <- sample39_obj@images$slice1@boundaries$centroids@coords coords
Ensure the coordinates matrix has proper row names
rownames(coords) <- sample39_obj@images$slice1@boundaries$centroids@cells
Create the FOV list with the correct format
fov <- list(FOV = coords)
Run BuildNicheAssay
sample39_obj <- BuildNicheAssay( object = sample39_obj, fov = fov, group.by = "predicted.celltype", assay = "niche", cluster.name = "niches", neighbors.k = 30, niches.k = 5 )
Thank you. Odunola
Originally posted by @odunola26 in https://github.com/satijalab/seurat/issues/9044#issuecomment-2187182694