From 42f465b7327090d3e648c69c73b3cc3e0f452a6f Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 6 Apr 2016 19:36:53 +0000 Subject: Setting lodm to always be 1.0 fixes the issue where it would incorrectly display LOD scores for the Y-Axis instead of LRS values --- .../wqflask/marker_regression/marker_regression_gn1.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/wqflask/wqflask/marker_regression/marker_regression_gn1.py b/wqflask/wqflask/marker_regression/marker_regression_gn1.py index b8307aaa..692e381b 100644 --- a/wqflask/wqflask/marker_regression/marker_regression_gn1.py +++ b/wqflask/wqflask/marker_regression/marker_regression_gn1.py @@ -1869,17 +1869,19 @@ class MarkerRegression(object): #LRSTop is then defined to be above the LRSMax by enough to add one additional LRSScale increment. #if we are using a set-scale, then we set LRSTop to be the user's value, and LRSMax doesn't matter. - if self.LRS_LOD == 'LRS': - lodm = self.LODFACTOR - else: - lodm = 1.0 + #ZS: I'm not sure what this if statement is supposed to do. It appears to work correctly for both LOD and LRS if I just set lodm to 1.0 + #if self.LRS_LOD == 'LRS': + # lodm = self.LODFACTOR + #else: + # lodm = 1.0 + lodm = 1.0 if self.lrsMax <= 0: #sliding scale - if "lod_score" in self.qtlresults[0]: - LRSMax = max([result['lod_score'] for result in self.qtlresults]) + if self.LRS_LOD == "LRS" and "lrs_value" in self.qtlresults[0]: + LRSMax = max([result['lrs_value'] for result in self.qtlresults]) #LRSMax = max(map(max, self.qtlresults)).lrs_value else: - LRSMax = max([result['lrs_value'] for result in self.qtlresults]) + LRSMax = max([result['lod_score'] for result in self.qtlresults]) #LRSMax = max(map(max, self.qtlresults)).lod_score #genotype trait will give infinite LRS LRSMax = min(LRSMax, webqtlConfig.MAXLRS) -- cgit v1.2.3