BuildNicheAssay; best practice for optimal usage #9235
Replies: 4 comments 2 replies
-
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 objectcoords <- sample39_obj@images$slice1@boundaries$centroids@coords Ensure the coordinates matrix has proper row namesrownames(coords) <- sample39_obj@images$slice1@boundaries$centroids@cells Create the FOV list with the correct formatfov <- list(FOV = coords) Run BuildNicheAssaysample39_obj <- BuildNicheAssay( Thank you. |
Beta Was this translation helpful? Give feedback.
-
@odunola26 |
Beta Was this translation helpful? Give feedback.
-
@igrabski |
Beta Was this translation helpful? Give feedback.
-
Hi Koichi, we use GitHub issues as a way to address bugs -- for more open-ended analysis questions like these, we would like to direct people to the Discussions tab, so I will go ahead and convert this to a discussion where any members of the community can participate. |
Beta Was this translation helpful? Give feedback.
-
Hello Satija group,
Thanks so much for adding many exciting functionalities in the new V5.
I have a few questions around "BuildNicheAssay". I appreciate if you can share your insights when you have a chance.
how are niches computed?
Is the computation flow as the following?
neighborhood graph is generated by searching for k near neighbor cells of each cell in space. Is this based on euclidean distance or delaunay network? This is stored as obj@assays$niche@counts.
obj@assays$niche@counts or obj@assays$[email protected] is used as inputs for clustering
dimensionality reduction using PCA or using all features as inputs?
k-mean clustering, using the user defined number of clusters, k
how to find optimal number of near neighbor, k?
Default seems 30. Is this a good number to stick to or should we change it depending on the number of cell types in space (e.g. more cell types, higher k)?
how to find optimal number of clusters, k?
I feel that this is the most critical point that may make significant differences in the final analytical results.
If k-mean clustering is used, do you recommend silhouette method to identify optimal k? I tried silhouette method to find optimal number, but the scale of the spatial data is too large and it could easily crash the computational environment (my guess is dist(df) may be the cause).
Or do you have any other ways (including empirical suggestions; XX number of niches are good for YY number of cell types) to define the number of niches?
Thank you!
best,
Koichi
Beta Was this translation helpful? Give feedback.
All reactions