diff options
author | Frederick Muriuki Muriithi | 2022-08-09 07:22:58 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-08-09 07:27:27 +0300 |
commit | efd11112ccd7c13c694bd3668cbf54207d6d58f4 (patch) | |
tree | 91dd72712fc9448c3698a99f43a6fa45100f73fb | |
parent | fcd2897fa0e96585c0add3e80681da38c30e6d12 (diff) | |
download | genenetwork2-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.py | 5 |
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": |