Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WOTKernel requires KNN graph #599

Closed
Marius1311 opened this issue Jun 5, 2021 · 1 comment · Fixed by #600
Closed

WOTKernel requires KNN graph #599

Marius1311 opened this issue Jun 5, 2021 · 1 comment · Fixed by #600
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Marius1311
Copy link
Collaborator

When I initialize the WOTKernel via wk = WOTKernel(adata, time_key='day'), it complains that no KNN graph was found:

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
~/Projects/cellrank/cellrank/ul/_utils.py in _get_neighs(adata, mode, key)
    198         try:
--> 199             res = _read_graph_data(adata, key)
    200             assert isinstance(res, (np.ndarray, spmatrix))

~/Projects/cellrank/cellrank/ul/_utils.py in _read_graph_data(adata, key)
    236 
--> 237     raise KeyError(f"Unable to find key `{key!r}` in `adata.obsp`.")
    238 

KeyError: "Unable to find key `'connectivities'` in `adata.obsp`."

which is expected, because there is no KNN graph in this AnnData object. However, I don't think WOT needs one to compute the transition maps, so we should probably remove this requirement.

Versions:

cellrank==1.3.1+ga966e79 scanpy==1.7.2 anndata==0.7.5 numpy==1.19.2 numba==0.51.2 scipy==1.5.3 pandas==1.2.1 pygpcca==1.0.2 scikit-learn==0.24.0 statsmodels==0.12.1 python-igraph==0.8.3 scvelo==0.2.3 pygam==0.8.0 matplotlib==3.3.3 seaborn==0.11.0

@Marius1311 Marius1311 added the bug Something isn't working label Jun 5, 2021
@Marius1311 Marius1311 added this to the CellRank 1.4 milestone Jun 5, 2021
@michalk8 michalk8 mentioned this issue Jun 6, 2021
3 tasks
@michalk8
Copy link
Collaborator

michalk8 commented Jun 6, 2021

closed via #600

@michalk8 michalk8 closed this as completed Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants