aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/data_set.py
diff options
context:
space:
mode:
authorZachary Sloan2014-01-03 21:47:58 +0000
committerZachary Sloan2014-01-03 21:47:58 +0000
commitbd48ca02770735cff482b1612399f236e8ac377f (patch)
tree156e444cf93272ff01f4380cfa5a00adb8ee059d /wqflask/base/data_set.py
parent127cbe756059dc95e3c37cb2783df5296bafc362 (diff)
downloadgenenetwork2-bd48ca02770735cff482b1612399f236e8ac377f.tar.gz
Wrote some code for the histogram figure
Changed some code in dataset to try and track down the issue with Amelie's file
Diffstat (limited to 'wqflask/base/data_set.py')
-rwxr-xr-xwqflask/base/data_set.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index fbe78d5d..d421f21e 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -168,13 +168,14 @@ 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']):
+ if math.isnan(marker['p_value']) or marker['p_value'] <= 0:
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
-
-
+ 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
class HumanMarkers(Markers):