From 5ad7a862dfa4d53fac9ddf7fd86075faa5167df5 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Fri, 8 Jul 2022 15:13:12 +0300 Subject: fix for bug splitting list data --- gn3/computations/rust_correlation.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'gn3/computations') diff --git a/gn3/computations/rust_correlation.py b/gn3/computations/rust_correlation.py index d206065..4438d79 100644 --- a/gn3/computations/rust_correlation.py +++ b/gn3/computations/rust_correlation.py @@ -84,10 +84,6 @@ def parse_correlation_output(result_file: str, top_n: int = 500) -> list[dict]: corr_results = [] - breakpoint() - - - with open(result_file, "r", encoding="utf-8") as file_reader: lines = [next(file_reader) for x in range(top_n)] @@ -164,9 +160,10 @@ def parse_tissue_corr_data(symbol_name: str, try: corr_vals = dataset_vals.get(symbol.lower()) - corr_vals.insert(0, trait) + if corr_vals: + corr_vals = [str(trait)] + corr_vals - data.append(",".join([str(val) for val in corr_vals])) + data.append(",".join([str(x) for x in corr_vals])) except Exception as e: pass -- cgit v1.2.3