Closed ilibarra closed 3 years ago
right, this is the notebook we should look at yes https://github.com/theislab/spatial-tools/blob/master/notebooks/permutation_test.ipynb ? what is node dev again?
@ilibarra do you mind explaining again whats' node dev? I don't remember it sorry
@giovp there are currently three implementations, nodes
, edges
, and nodes-dev
edges
is based on manipulation of variables that are very fast @Koncopd drove all suggestions for that.nodes-dev
is an equivalent version from edges but applied to nodes. In the test cases it so far still does not give the expected values so requires debugging.nodes
is an preliminary implementation that for nodes that I did. It is not so fast but gets the expected in the notebooks so atm it is the default.The goal is to keep debugging nodes-dev
and eventually rename it nodes
.
ok great, thank you for the explanation! Let me know if I can help with debugging etc.
I was wondering whether I can convert the adata, conn graph and visium viz to a down-scaled version of those? For example: this one here is ~2700x2700. If I can down-scale it somehow to 50,50 and 100,100 I could troubleshoot issue I am getting faster (same pattern, much less edges).
Thank you,
Would something like this works for your purpose?
adata_subset = adata[adata.obsm["spatial"][:, 1] < adata.obsm["spatial"][:, 1].mean()]
sc.pl.spatial(adata_subset, img_key="hires", color=["leiden"])
adata
is the same as in your case, so standard preprocessing and then leiden
Hey,
I have tested in the big versus small example for the same case, but unfortunately the pattern is not maintained i.e. the z-score for edges returns to negative values when doing this (bottom case).
I think I should maintain the big example to reproduce this case (top case with high, unexpected z-score). Still wondering how to visualize this. Is there a visualization package suggestion for the connectivity graphs? e.g. a networkx.
closed with #140
The function
permtest_leiden_pairs
works well for nodes so far. However, it reports inflated number of observed edges between leiden pairs when n_rings is 2 or higher. This can be visually inspected in visium cases where the top selected leiden pairs actually separated by many nodes.I can attach images for this issue. It needs to be however tackled to allow the mode edges to be accepted.