Closed vladimirkovacevic closed 10 months ago
Hi there,
Thanks for your interest in SpaGCN. The choice of radius (r) depends on the xy coordinates scale of your data. In the stpe-by-step tutorial, there is one function to search r automatically: https://github.com/jianhuupenn/SpaGCN/blob/master/tutorial/tutorial.md#6-identify-svgs
r=spg.search_radius(target_cluster=target, cell_id=adata.obs.index.tolist(), x=x_array, y=y_array, pred=adata.obs["pred"].tolist(), start=start, end=end, num_min=10, num_max=14, max_run=100)
Based on the message, the choice of r is too small. You can try a bigger value, for example, r x 5, r x 10. It seems you are running the ez mode, so some parameters maybe difficult to change, I would recommend running the step-by-step tutorial and using a customized r value. Hope this helps.
Thank you guys for developing it and for the detailed response. It is a very nice and useful tool. I'll try an automatic search for optimal r.
@jianhuupenn maybe I missed it in the paper, but can you tell me what is the logic behind using only neighbouring clusters when calculating DE genes and not all clusters in the tissue? Also, if I put r = MAX_INT will it then include all neighbouring clusters?
Actually, the code I was running was using search_radius()
and for some clusters, it returned 0 neighboring clusters.
I got an error:
I'm running the sample with 6000 observations. How to choose the radius for neighbouring domains?