about summary refs log tree commit diff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2021-06-03 20:41:43 +0000
committerzsloan2021-06-03 20:41:43 +0000
commit91ca999f8d24ab135d3fa31bbbbd97cd0648889c (patch)
tree1a8334e4e5587faebacaddb47237c6dbc845e668 /wqflask
parent792095994bcc999779235bb953e85430f5073552 (diff)
downloadgenenetwork2-91ca999f8d24ab135d3fa31bbbbd97cd0648889c.tar.gz
Change LRS scores of 0.000 to N/A since they're listed wrong in the DB + fix issue where locus_chr and locus_mb pointing to the wrong positions in the query results
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/gsearch.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py
index e541b705..2516e4fb 100644
--- a/wqflask/wqflask/gsearch.py
+++ b/wqflask/wqflask/gsearch.py
@@ -244,13 +244,16 @@ class GSearch:
 
                     if line[10] != "" and line[10] != None:
                         this_trait['LRS_score_repr'] = f"{line[10]:.3f}"
+                        # Some Max LRS values in the DB are wrongly listed as 0.000, but shouldn't be displayed
+                        if this_trait['LRS_score_repr'] == "0.000":
+                            this_trait['LRS_score_repr'] = "N/A"
                     if line[11] != "" and line[11] != None:
                         this_trait['additive'] = f"{line[11]:.3f}"
                     if line[13] != "" and line[13] != None:
                         this_trait['mean'] = f"{line[13]:.3f}"
 
-                    locus_chr = line[16]
-                    locus_mb = line[17]
+                    locus_chr = line[15]
+                    locus_mb = line[16]
 
                     max_lrs_text = "N/A"
                     if locus_chr and locus_mb: