Skip to content
Snippets Groups Projects
Commit 3edbe8a3 authored by nfontrod's avatar nfontrod
Browse files

src/find_interaction_cluster/community_finder.py: call get_community -> get_communities_basefile

parent b76ca88f
No related branches found
No related tags found
No related merge requests found
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment