From 3edbe8a321104e75fe8c8215fd22bb7f19f366f0 Mon Sep 17 00:00:00 2001
From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr>
Date: Tue, 19 Jan 2021 11:50:02 +0100
Subject: [PATCH] src/find_interaction_cluster/community_finder.py: call
 get_community -> get_communities_basefile

---
 src/find_interaction_cluster/community_finder.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/find_interaction_cluster/community_finder.py b/src/find_interaction_cluster/community_finder.py
index d65d5a81..b7467fc4 100644
--- a/src/find_interaction_cluster/community_finder.py
+++ b/src/find_interaction_cluster/community_finder.py
@@ -11,7 +11,7 @@ import networkx as nx
 import numpy as np
 from networkx.algorithms import community
 import sqlite3
-from .config import ConfigGraph, get_communities
+from .config import ConfigGraph, get_communities_basefile
 from ..nt_composition.make_nt_correlation import get_project_colocalisation
 from ..logging_conf import logging_def
 import pandas as pd
@@ -19,11 +19,9 @@ import logging
 import plotly.graph_objects as go
 import plotly
 from pathlib import Path
-from typing import Tuple, Dict, List
+from typing import Tuple, Dict
 import matplotlib.cm as cm
 from matplotlib.colors import to_rgba
-from itertools import product
-import multiprocessing as mp
 import json
 import subprocess as sp
 
@@ -106,7 +104,7 @@ def find_communities(graph: nx.Graph, project: str,
         cmd = f"mpirun -np 1 {ConfigGraph.get_hipmcl_prog()} -M {outfile} " \
               f"-I 1.5 -per-process-mem 50 -o {result_file}"
         sp.check_call(cmd, shell=True, stderr=sp.STDOUT)
-    communities = get_communities(result_file)
+    communities = get_communities_basefile(result_file)
     dic_community = {}
     cov = round(community.coverage(graph, communities), 2)
     modularity = community.modularity(graph, communities, weight='X')
-- 
GitLab