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

fix ep.tl.umap when neighbors_key is not None #790

Merged
merged 3 commits into from
Aug 23, 2024
Merged

fix ep.tl.umap when neighbors_key is not None #790

merged 3 commits into from
Aug 23, 2024

Conversation

eroell
Copy link
Collaborator

@eroell eroell commented Aug 23, 2024

PR Checklist

Description of changes
Fix a bug blocking the native the use of ep.tl.umap when ep.pp.neighbors(adata, key_added=<custom>).

Technical details
Simply remove a faulty check & let scanpy handle it.

Adding tests for plotting and the way to there are an open issue #666, and will be added another time more comprehensively,

Additional context

@github-actions github-actions bot added the bug Something isn't working label Aug 23, 2024
@eroell eroell requested a review from VladimirShitov August 23, 2024 08:42
@eroell
Copy link
Collaborator Author

eroell commented Aug 23, 2024

@VladimirShitov if you want to quickly review (or particularly if you have a dev install of ehrapy, confirm this branch now works as it should for you), much appreciated :) else I'll bug Lukas ;)

@eroell eroell changed the title remove buggy extra uns checks of ep, let sc do it ep.tl.umap remove buggy extra uns checks of ep, let sc do it Aug 23, 2024
@Zethson
Copy link
Member

Zethson commented Aug 23, 2024

@eroell does scanpy suggest to run scanpy neighbors or just calculate neighbors in general? This is legacy code to suggest people to calculate neighbors using the ehrapy API

@VladimirShitov
Copy link
Collaborator

I don't have dev install, but the test case from the issue works with scanpy so should be fine now

ehrapy/tools/_scanpy_tl_api.py Outdated Show resolved Hide resolved
@eroell
Copy link
Collaborator Author

eroell commented Aug 23, 2024

@eroell does scanpy suggest to run scanpy neighbors or just calculate neighbors in general? This is legacy code to suggest people to calculate neighbors using the ehrapy API

you're right ofc it instructs to use sc.pp.neighbors. added the check again, this time with the proper logic

@eroell eroell changed the title ep.tl.umap remove buggy extra uns checks of ep, let sc do it fix bug ep.tl.umap when neighbors_key is not None Aug 23, 2024
@eroell eroell changed the title fix bug ep.tl.umap when neighbors_key is not None fix ep.tl.umap when neighbors_key is not None Aug 23, 2024
@eroell eroell merged commit 423a633 into main Aug 23, 2024
17 checks passed
@eroell eroell deleted the fix/tl-umap branch October 24, 2024 06:38
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 this pull request may close these issues.

Impossible to calculate UMAP with custom connectivities keys
3 participants