From d84f1487b9768a2b8b6e14a7dbcbcd8685ce01a6 Mon Sep 17 00:00:00 2001 From: sichao Date: Fri, 12 Jul 2024 14:49:10 -0400 Subject: [PATCH] replace louvain with leiden --- dynamo/tools/clustering.py | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dynamo/tools/clustering.py b/dynamo/tools/clustering.py index 8136e0671..a2fb8c77e 100644 --- a/dynamo/tools/clustering.py +++ b/dynamo/tools/clustering.py @@ -494,7 +494,7 @@ def cluster_community( def cluster_community_from_graph( graph=None, graph_sparse_matrix: Union[np.ndarray, csr_matrix, None] = None, - method: Literal["leiden", "louvain"] = "louvain", + method: Literal["leiden", "louvain"] = "leiden", directed: bool = False, **kwargs ) -> Any: diff --git a/requirements.txt b/requirements.txt index 017dcaa76..16ffa2214 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,7 +15,7 @@ seaborn>=0.9.0 colorcet>=2.0.1 tqdm igraph>=0.7.1 -louvain==0.8.0 +leidenalg pynndescent>=0.5.2 pre-commit networkx>=2.6