satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.18k stars 891 forks source link

BuildNicheAssay run error. #9050

Closed KoichiHashikawa closed 1 week ago

KoichiHashikawa commented 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 :

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

dcollins15 commented 1 week ago

Please see https://github.com/satijalab/seurat/issues/9047.