Closed wangjiawen2013 closed 2 years ago
hi @wangjiawen2013 sorry for late reply and thanks for interest in squidpy. Let me try to answer your questions
1, what's the difference between them and which one should I use for downstream analysis ?
spatial neighbors compute neighbors on spatial coordinates in different fashions, check out the paper and this tutorial https://squidpy.readthedocs.io/en/latest/auto_examples/graph/compute_spatial_neighbors.html
2, If I want to use the union of the two kinds of neighbors, how to merge them ?
you'd have to aggregate the connectivities, e.g.
adata.obsp["connectivities"] + adata.obsp["spatial_connectivities"]
The clusters were pre-annotated in all the examples in squidpy's tutorial, then how were the annotation pefromedt ? Why can't we cluster the spots just like what we did in single cell RNAseq analysis (find neighbors, and clustering with leiden algorithm and annotate the spots with marker genes) ?
you can indeed, this is what we did, checkout the reproducibility repo https://github.com/theislab/squidpy_reproducibility
let me know if it helps!
@giovp Hi, How to set n_rings and neighbors when using ST (grid) or visium (hexagon) platforms ?
sq.gr.spatial_neighbors(adata, coord_type="grid", n_neighs=6)
or 4 for ST
... Hi, we can find neighbors with both sq.gr.spatial_neighbors() of squidpy and sc.pp.neighbors() of scanpy. here's my question: 1, what's the difference between them and which one should I use for downstream analysis ? 2, If I want to use the union of the two kinds of neighbors, how to merge them ? 3, The clusters were pre-annotated in all the examples in squidpy's tutorial, then how were the annotation pefromedt ? Why can't we cluster the spots just like what we did in single cell RNAseq analysis (find neighbors, and clustering with leiden algorithm and annotate the spots with marker genes) ?