aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
authorZachary Sloan2013-08-16 16:26:06 -0500
committerZachary Sloan2013-08-16 16:26:06 -0500
commit99a0faffb1a42a379b72a4572088c1ad588fca3e (patch)
tree7dde335c6d6fa35eb63922a21224d94a1feb5eae /wqflask/base
parentac4ba08c41de06f7aa91696b3643df3ff66aea46 (diff)
parent63a6ab2f565611bbe1464d718acff4398de12a19 (diff)
downloadgenenetwork2-99a0faffb1a42a379b72a4572088c1ad588fca3e.tar.gz
Merge https://github.com/zsloan/genenetwork
Diffstat (limited to 'wqflask/base')
-rwxr-xr-xwqflask/base/data_set.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 091433a6..0b9b1ce0 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -168,11 +168,13 @@ class Markers(object):
for marker, p_value in itertools.izip(self.markers, p_values):
marker['p_value'] = p_value
- if math.isnan(marker['p_value']):
- print("p_value is:", marker['p_value'])
- marker['lod_score'] = -math.log10(marker['p_value'])
- #Using -log(p) for the LRS; need to ask Rob how he wants to get LRS from p-values
- marker['lrs_value'] = -math.log10(marker['p_value']) * 4.61
+ if marker['p_value'] == 0:
+ marker['lod_score'] = 0
+ marker['lrs_value'] = 0
+ else:
+ marker['lod_score'] = -math.log10(marker['p_value'])
+ #Using -log(p) for the LRS; need to ask Rob how he wants to get LRS from p-values
+ marker['lrs_value'] = -math.log10(marker['p_value']) * 4.61