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

error on Run diffusion maps (KeyError: 'distances') #33

Closed
zmokhtari opened this issue May 19, 2020 · 1 comment
Closed

error on Run diffusion maps (KeyError: 'distances') #33

zmokhtari opened this issue May 19, 2020 · 1 comment

Comments

@zmokhtari
Copy link

Hi,
I am trying to use Palantir for mass cytometry data. I started first to reproduce the example data that you provided, however, I faced this error message:
dm_res = palantir.utils.run_diffusion_maps(pca_projections, n_components=5)

KeyError Traceback (most recent call last)
in
1 # Run diffusion maps
----> 2 dm_res = palantir.utils.run_diffusion_maps(pca_projections, n_components=5 ,knn=30, n_jobs=-1, alpha=0)

~/.local/lib/python3.7/site-packages/palantir/utils.py in run_diffusion_maps(data_df, n_components, knn, n_jobs, alpha)
41 temp = sc.AnnData(data_df.values)
42 sc.pp.neighbors(temp, n_pcs=0, n_neighbors=knn)
---> 43 kNN = temp.uns['neighbors']['distances']
44
45 # Adaptive k

KeyError: 'distances'

could you please help me to figure out what is going wrong?

Thanks in advance,
Zeinab

awnimo added a commit that referenced this issue May 20, 2020
A fix related to #33 and #31
@awnimo
Copy link
Contributor

awnimo commented May 20, 2020

Thank you @zmokhtari for using our package.
Please, upgrade to the latest release here

@awnimo awnimo closed this as completed May 20, 2020
christopheragnus pushed a commit to christopheragnus/Palantir that referenced this issue Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants