From 140dc53d6abac3a1c50072aa94781ca01b9f08ab Mon Sep 17 00:00:00 2001 From: Olivier Boulle <olivier.boulle@inria.fr> Date: Tue, 27 Oct 2020 14:50:10 +0100 Subject: [PATCH] =?UTF-8?q?petite=20correction=20d'une=20erreur=20caus?= =?UTF-8?q?=C3=A9e=20parce=20que=20la=20fonction=20nx.connected=5Fcomponen?= =?UTF-8?q?t=5Fsubgraphs(G)=20n'est=20plus=20support=C3=A9=20dans=20les=20?= =?UTF-8?q?derni=C3=A8res=20versions=20de=20la=20librairie=20networkx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ccsa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccsa.py b/ccsa.py index 20d0b3b..1df46e2 100644 --- a/ccsa.py +++ b/ccsa.py @@ -461,7 +461,7 @@ while True: GRAPH.add_edge(node_name1,node_name2,weight=k) G = GRAPH.to_undirected() - GC = max(nx.connected_component_subgraphs(G), key=len) + GC = max((G.subgraph(c) for c in nx.connected_components(G)), key=len) if START_KMER in GC and END_KMER in GC: list_nodes = list(GRAPH.nodes) for n in list_nodes: -- GitLab