aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander_Kabui2022-07-08 15:13:12 +0300
committerBonfaceKilz2022-07-22 14:52:08 +0300
commit5ad7a862dfa4d53fac9ddf7fd86075faa5167df5 (patch)
treecc2b98885e1f0e443fdb04a2a66b0fbc47fb5363
parent3b6b25ab0c0410db9cb32c787b87e1a60dc02803 (diff)
downloadgenenetwork3-5ad7a862dfa4d53fac9ddf7fd86075faa5167df5.tar.gz
fix for bug splitting list data
-rw-r--r--gn3/computations/rust_correlation.py9
1 files changed, 3 insertions, 6 deletions
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