aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2022-10-18 22:16:03 +0000
committerzsloan2022-10-18 22:16:03 +0000
commit6a6ae30c56df04ad2505f6e58d677049045b0bbe (patch)
treec74d974bf88277f193e59af80e9a72c4467532e3
parent060c50532161cfdbd61096ef02cdee614b886fbb (diff)
downloadgenenetwork2-6a6ae30c56df04ad2505f6e58d677049045b0bbe.tar.gz
Convert LRS to LOD/-logP for global search results
-rw-r--r--wqflask/wqflask/gsearch.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py
index 0c13fc62..4efa6740 100644
--- a/wqflask/wqflask/gsearch.py
+++ b/wqflask/wqflask/gsearch.py
@@ -42,6 +42,7 @@ class GSearch:
chr_mb = curry(2, lambda chr, mb: f"Chr{chr}: {mb:.6f}")
format3f = lambda x: f"{x:.3f}"
hmac = curry(2, lambda dataset, dataset_fullname: f"{dataset_fullname}:{dataset}")
+ convert_lod = lambda x: x / 4.61
self.trait_list = []
# pylint: disable=invalid-name
with xapian_database() as db:
@@ -56,7 +57,7 @@ class GSearch:
trait["index"] = Just(i)
trait["location_repr"] = (Maybe.apply(chr_mb)
.to_arguments(trait.pop("chr"), trait.pop("mb")))
- trait["LRS_score_repr"] = trait.pop("lrs").map(format3f)
+ trait["LRS_score_repr"] = trait.pop("lrs").map(convert_lod).map(format3f)
trait["additive"] = trait["additive"].map(format3f)
trait["mean"] = trait["mean"].map(format3f)
trait["max_lrs_text"] = (Maybe.apply(chr_mb)