aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-09-06 13:53:40 +0300
committerFrederick Muriuki Muriithi2022-09-06 13:53:40 +0300
commit399fc011556793b3039f64a0050bb112c09ade6d (patch)
tree36a58600f9b1aa2ebf3477af49f0782a6c3bf942
parent96d7b81cff1b4cf9334b5e37556e0323ac9ef154 (diff)
downloadgenenetwork2-399fc011556793b3039f64a0050bb112c09ade6d.tar.gz
Placeholder: Set trait location to ??? if the Mb is NULL
-rw-r--r--wqflask/wqflask/correlation/rust_correlation.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/wqflask/wqflask/correlation/rust_correlation.py b/wqflask/wqflask/correlation/rust_correlation.py
index a4a08a54..cfa360d0 100644
--- a/wqflask/wqflask/correlation/rust_correlation.py
+++ b/wqflask/wqflask/correlation/rust_correlation.py
@@ -47,6 +47,11 @@ def query_probes_metadata(dataset, trait_list):
def get_metadata(dataset, traits):
+ """Retrieve the metadata"""
+ def __location__(probe_chr, probe_mb):
+ if probe_mb:
+ return f"Chr{probe_chr}: {probe_mb:.6f}"
+ return f"Chr{probe_chr}: ???"
return {trait_name: {
"name": trait_name,
@@ -58,7 +63,7 @@ def get_metadata(dataset, traits):
"description": description,
"additive": additive,
"lrs_score": f"{lrs:3.1f}",
- "location": f"Chr{probe_chr}: {probe_mb:.6f}",
+ "location": __location__(probe_chr, probe_mb),
"lrs_location": f"Chr{chr_score}: {mb:.6f}"
} for trait_name, probe_chr, probe_mb, symbol, mean, description,