From 919ab7a956a00fc6464c3b0b93dbea5a646c3a04 Mon Sep 17 00:00:00 2001
From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr>
Date: Tue, 4 Aug 2020 14:52:29 +0200
Subject: [PATCH] src/db_utils/populate_database.py: refactoring of 2 lines

---
 src/db_utils/populate_database.py        | 8 ++------
 src/find_interaction_cluster/__main__.py | 4 ++--
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/db_utils/populate_database.py b/src/db_utils/populate_database.py
index 4fcf80ff..68d43243 100755
--- a/src/db_utils/populate_database.py
+++ b/src/db_utils/populate_database.py
@@ -43,8 +43,7 @@ def get_number_columns(table: str, cnx: sqlite3.Connection) -> List[str]:
     cursor.execute(query)
     cols_data = cursor.fetchall()
     cursor.close()
-    col_name = [col[1] for col in cols_data]
-    return col_name
+    return [col[1] for col in cols_data]
 
 
 def check_file(table: str, file: Union[Path, pd.DataFrame],
@@ -61,10 +60,7 @@ def check_file(table: str, file: Union[Path, pd.DataFrame],
     :return: The row in file.
     """
     column_names = get_number_columns(table, cnx)
-    if isinstance(file, Path):
-        df = pd.read_csv(file, sep="\t")
-    else:
-        df = file
+    df = pd.read_csv(file, sep="\t") if isinstance(file, Path) else file
     if len(df.columns) != len(column_names):
         msg = "Wrong number of columns"
         logging.exception(msg)
diff --git a/src/find_interaction_cluster/__main__.py b/src/find_interaction_cluster/__main__.py
index 184339c9..bbe8de7d 100644
--- a/src/find_interaction_cluster/__main__.py
+++ b/src/find_interaction_cluster/__main__.py
@@ -38,8 +38,8 @@ def launcher(weight: List[int] = (1),
     """
     if not ConfigGraph.get_hipmcl_prog().is_file():
         install_hipmcl("INFO")
-    multiple_community_launcher(1, weight, global_weight, same_gene, html_fig,
-                                logging_level)
+    # multiple_community_launcher(1, weight, global_weight, same_gene, html_fig,
+    #                             logging_level)
     multiple_stat_launcher(ps, weight, global_weight, same_gene,
                            logging_level)
 
-- 
GitLab