scverse / scverse/scanpy

UMAP implementation in igraph

Open
#3,408 4 comments 0 reactions 1 assignee View on GitHub

@Riccardo231 is already working on this.

Since Jan 9, 2025.

Dominant language
Python
Stars
2.6k
Forks
779
Avg merge
1d 4h
Merged PRs (30d)
27

Description

What kind of feature would you like to request?

Additional function parameters / changed functionality / changed defaults?

Please describe your wishes

dear devs,

Thank you for maintaining scanpy, which is a great piece of software.

I am a core developer of igraph and around a year ago we started providing an implementation of UMAP. It is accessible via the igraph Python package and the actual computations run entirely in C. This is designed to be an alternative to the original UMAP implementation that requires numba, llvmlite, etc. Since scanpy relies on igraph for clustering already, this might be useful for folks who have trouble with the dependency stack.

Just like Leiden clustering can now use either leidenalg or directly igraph, it would be nice to let people choose flavor='igraph' for embedding as well.

Our implementation requires as input a nearest neighbor graph with distances and has two parts, just like the original umap:

  1. a function to compute what are now called in scanpy "connectivities" from the distances. This is among other things a symmetrysation of the knn graph.
  2. a function to compute the embedding from the connectivity graph.

Would you be interested in this? If so, I can make a PR for scanpy and perhaps one of you can review it?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.