From d6227b9e0a331b2cb3db705a503dcfa5bbaf1555 Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 12 Nov 2020 13:42:18 -0600 Subject: Substituted -log(p) with -logP as mentioned in Rob's e-mail --- wqflask/wqflask/marker_regression/display_mapping_results.py | 6 +++--- wqflask/wqflask/marker_regression/run_mapping.py | 8 ++++---- wqflask/wqflask/templates/mapping_results.html | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py index 6d6572ff..3f6de2b2 100644 --- a/wqflask/wqflask/marker_regression/display_mapping_results.py +++ b/wqflask/wqflask/marker_regression/display_mapping_results.py @@ -2076,7 +2076,7 @@ class DisplayMappingResults(object): if self.lrsMax <= 0: #sliding scale if "lrs_value" in self.qtlresults[0]: LRS_LOD_Max = max([result['lrs_value'] for result in self.qtlresults]) - if self.LRS_LOD == "LOD" or self.LRS_LOD == "-log(p)": + if self.LRS_LOD == "LOD" or self.LRS_LOD == "-logP": LRS_LOD_Max = LRS_LOD_Max / self.LODFACTOR if self.permChecked and self.nperm > 0 and not self.multipleInterval: self.significant = min(self.significant / self.LODFACTOR, webqtlConfig.MAXLRS) @@ -2172,7 +2172,7 @@ class DisplayMappingResults(object): TEXT_X_DISPLACEMENT = -12 else: TEXT_X_DISPLACEMENT = -30 - if self.LRS_LOD == "-log(p)": + if self.LRS_LOD == "-logP": TEXT_Y_DISPLACEMENT = -242 else: TEXT_Y_DISPLACEMENT = -210 @@ -2397,7 +2397,7 @@ class DisplayMappingResults(object): if 'lrs_value' in qtlresult: - if self.LRS_LOD == "LOD" or self.LRS_LOD == "-log(p)": + if self.LRS_LOD == "LOD" or self.LRS_LOD == "-logP": if qtlresult['lrs_value'] > 460 or qtlresult['lrs_value']=='inf': #Yc = yZero - webqtlConfig.MAXLRS*LRSHeightThresh/(LRSAxisList[-1]*self.LODFACTOR) Yc = yZero - webqtlConfig.MAXLRS*LRSHeightThresh/(LRS_LOD_Max*self.LODFACTOR) diff --git a/wqflask/wqflask/marker_regression/run_mapping.py b/wqflask/wqflask/marker_regression/run_mapping.py index 9625349c..31d6a67c 100644 --- a/wqflask/wqflask/marker_regression/run_mapping.py +++ b/wqflask/wqflask/marker_regression/run_mapping.py @@ -228,7 +228,7 @@ class RunMapping(object): self.output_files = start_vars['output_files'] if 'first_run' in start_vars: #ZS: check if first run so existing result files can be used if it isn't (for example zooming on a chromosome, etc) self.first_run = False - self.score_type = "-log(p)" + self.score_type = "-logP" self.manhattan_plot = True with Bench("Running GEMMA"): if self.use_loco == "True": @@ -327,7 +327,7 @@ class RunMapping(object): self.control_marker, self.manhattan_plot) elif self.mapping_method == "plink": - self.score_type = "-log(p)" + self.score_type = "-logP" self.manhattan_plot = True results = plink_mapping.run_plink(self.this_trait, self.dataset, self.species, self.vals, self.maf) #results = self.run_plink() @@ -539,8 +539,8 @@ def export_mapping_results(dataset, trait, markers, results_path, mapping_scale, output_file.write("Location: " + str(trait.chr) + " @ " + str(trait.mb) + " Mb\n") output_file.write("\n") output_file.write("Name,Chr,") - if score_type.lower() == "-log(p)": - score_type = "-log(p)" + if score_type.lower() == "-logP": + score_type = "-logP" if 'Mb' in markers[0]: output_file.write("Mb," + score_type) if 'cM' in markers[0]: diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html index e68a792a..28d93542 100644 --- a/wqflask/wqflask/templates/mapping_results.html +++ b/wqflask/wqflask/templates/mapping_results.html @@ -99,7 +99,7 @@ LRS ? @@ -235,8 +235,8 @@ Row Marker - {% if LRS_LOD == "-log(p)" %} -
–log(p)
+ {% if LRS_LOD == "-logP" %} +
–logP
{% else %}
{{ LRS_LOD }}
{% endif %} @@ -259,7 +259,7 @@ {{ loop.index }} {% if geno_db_exists == "True" %}
{{ marker.name }}{% else %}{{ marker.name }}{% endif %} - {% if LRS_LOD == "LOD" or LRS_LOD == "-log(p)" %} + {% if LRS_LOD == "LOD" or LRS_LOD == "-logP" %} {% if 'lod_score' in marker %} {{ '%0.2f' | format(marker.lod_score|float) }} {% else %} -- cgit v1.2.3