aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-08-09 07:22:58 +0300
committerFrederick Muriuki Muriithi2022-08-09 07:27:27 +0300
commitefd11112ccd7c13c694bd3668cbf54207d6d58f4 (patch)
tree91dd72712fc9448c3698a99f43a6fa45100f73fb
parentfcd2897fa0e96585c0add3e80681da38c30e6d12 (diff)
downloadgenenetwork2-efd11112ccd7c13c694bd3668cbf54207d6d58f4.tar.gz
Pass trait values (X) as list not string
The trait values (X values) are converted to JSON within the `run_correlation` call. Since JSON has the ability to represent lists of objects, there is no point for the added conversion to and from strings.
-rw-r--r--wqflask/wqflask/correlation/rust_correlation.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/wqflask/wqflask/correlation/rust_correlation.py b/wqflask/wqflask/correlation/rust_correlation.py
index ebb079fa..4106d3f0 100644
--- a/wqflask/wqflask/correlation/rust_correlation.py
+++ b/wqflask/wqflask/correlation/rust_correlation.py
@@ -28,10 +28,9 @@ def compute_correlation_rust(start_vars: dict, corr_type: str,
lts = [key] + [str(x) for x in val]
r = ",".join(lts)
target_data.append(r)
- # breakpoint()
- results = run_correlation(target_data, ",".join(
- [str(x) for x in list(sample_data.values())]), method, ",")
+ results = run_correlation(
+ target_data, list(sample_data.values()), method, ",")
if corr_type == "tissue":