question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Leiden now included in python-igraph

See original GitHub issue

The Leiden algorithm is now included in the latest release of python-igraph, version 0.8.0. I believe this alleviates the need to depend on the leidenalg packages. The Leiden algorithm provided in python-igraph is substantially faster than the leidenalg package. It is simpler though, providing fewer options, but I believe the more extensive options of the leidenalg package are not necessarily needed for the purposes of scanpy. We provide binary wheels on PyPI and binaries for conda are available from the conda-forge channel, also for Windows.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:27 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
mezwickcommented, Feb 15, 2022

The Leiden algorithm is now included in the latest release of python-igraph, version 0.8.0. I believe this alleviates the need to depend on the leidenalg packages. The Leiden algorithm provided in python-igraph is substantially faster than the leidenalg package. It is simpler though, providing fewer options, but I believe the more extensive options of the leidenalg package are not necessarily needed for the purposes of scanpy. We provide binary wheels on PyPI and binaries for conda are available from the conda-forge channel, also for Windows.

I have now done a speed comparison with adata object of 1.85 million cells.

igraph on adata as implemented above ran in 33 minutes vs sc.tl.leiden() which took ~14 hours

1reaction
mezwickcommented, Apr 19, 2022

This issue appears due to a memory overflow on the number of edges in my graph. Fixing will probably need to wait till igraph 0.10, which should handle 64-bit integers, and so be able to handle far larger graphs https://github.com/igraph/python-igraph/issues/531#issuecomment-1102792526

Read more comments on GitHub >

github_iconTop Results From Across the Web

leiden/README.md at master - GitHub
pip install leidenalg numpy python-igraph. Note you may need to uninstall the igraph 0.1.11 (now deprecated to jgraph) and install python-igraph or ...
Read more >
Introduction — leidenalg 0.9.2.dev0+gb530332.d20221214 ...
We abbreviate the leidenalg package as la and the igraph package as ig in all Python code ... Now detecting communities with modularity...
Read more >
cluster_leiden - igraph R manual pages
Each iteration may improve the partition further. vertex_weights. the vertex weights used in the Leiden algorithm. If this is not provided, it will...
Read more >
How to get the members of the clusters instead of index in igraph
Now when I am trying to get the members of the cluster with index 0. ... As I am new to igraph and...
Read more >
leiden: vignettes/benchmarking.Rmd - RDRR.io
Here we compare calling modularity clustering in igraph (R and C) to calling Python via reticulate. Note this is only available for undirected...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found