Open swbioinf opened 8 months ago
Hi - glad you were able to find a solution! Just out of curiosity, do you think you could achieve something similar if you ran BuildNicheAssay on the images separately, joined those niche assays, and then ran FindClusters on that joined assay? Since niches are calculated based on spatial proximity, it doesn't make much sense to me to try to join 2 FOVs unless you expect larger neighborhoods across them, but if you could expand that would be great!
Hi @zskylarli ah yes, that does sound more efficient! (and avoids the adjacentcy patchwork quilt!). Counts of neighbourhood cell types can be calculated independanly per layer, as you say its only the clustering step where we need to pool it.
Have moved on with my analysis for now though, If I get the chance to tidy that up next time I'll drop an update here. (or do a pull request if I get keen).
Sarah.
Hello! I have a single seurat object with 13 different tissues. I am wondering if I can just run BuildNicheAssay on this single object (which runs successfully) or if I need to run 13 separate BuildNicheAssays separately as described above and then combine?
Hi @andrewsong777 Interesting. Where these run on 13 different slides/runs? ie. Are the 13 images or one? object@images
My issue was for a few tissue samples spread over two slides (so two images confusingly called 'fov' and 'fov.1' -, but with multiple fovs on each (NB: What seurat calls an fov is different to what nanostring calls a fov)). I wrote this workaround to handle that.
If the current function works for you then great - maybe your object is built differently? (For my interest - how did you prepare it? How are the global x/y coordinates on different slides handled?)
Hi,
I've been wanting to identify cellular niches within my cosmx dataset - which has two slides (images/ or 'fovs' in seurat's examples).
The 'BuildNicheAssay' function expects an fov to be supplied. But I want niches to be calculated across both images together.
It looks like that the fov is needed used to get the tissue coordinates to calculate the spatial neighbour network. I hacked up a version of that function (below) that builds a number of spatial networks then glues them all together (making a disjoint network where cells on different slides are never adjacent.).
My code is not great, but the general approach seems to work. Any chance of such a modification making it into the main Seurat function?
This issue is also described here: https://github.com/satijalab/seurat/issues/8126
Thanks