diff --git a/src/db_utils/populate_database.py b/src/db_utils/populate_database.py index 4fcf80ff8e7016ac9c37428f4d207ec44effd636..68d432433189707520c0b235153ddd747eb8978e 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 184339c9e9295cc462b8808c7e714b6be5726731..bbe8de7d9ffea0d258eed7839246b0cfcc71230d 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)