diff options
author | zsloan | 2015-11-09 17:38:50 +0000 |
---|---|---|
committer | zsloan | 2015-11-09 17:38:50 +0000 |
commit | 74ba4029f0160f0c4708a8c4b291c05184d3993d (patch) | |
tree | e7af5cb1a4849d948d4343cb9e33f75f7869a6ee /wqflask/wqflask | |
parent | f93874f512ee07072bab46bfacc9282df4e12172 (diff) | |
download | genenetwork2-74ba4029f0160f0c4708a8c4b291c05184d3993d.tar.gz |
Fixed issue that caused mapping to not work; for some reason the path to pylmm was wrong
Diffstat (limited to 'wqflask/wqflask')
-rwxr-xr-x | wqflask/wqflask/marker_regression/marker_regression.py | 4 | ||||
-rwxr-xr-x | wqflask/wqflask/my_pylmm/data/genofile_parser.py | 10 | ||||
-rwxr-xr-x | wqflask/wqflask/show_trait/show_trait.py | 2 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/chr_lod_chart.js | 2 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/panelutil.js | 2 | ||||
-rwxr-xr-x | wqflask/wqflask/views.py | 8 |
6 files changed, 15 insertions, 13 deletions
diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py index dc7ebfcc..553b4358 100755 --- a/wqflask/wqflask/marker_regression/marker_regression.py +++ b/wqflask/wqflask/marker_regression/marker_regression.py @@ -74,7 +74,7 @@ class MarkerRegression(object): self.significant = "" self.pair_scan = False # Initializing this since it is checked in views to determine which template to use self.score_type = "LRS" #ZS: LRS or LOD - self.mapping_scale = "megabase" + self.mapping_scale = "physic" self.dataset.group.get_markers() if self.mapping_method == "gemma": @@ -87,7 +87,7 @@ class MarkerRegression(object): results = self.run_rqtl_plink() elif self.mapping_method == "rqtl_geno": self.score_type = "LOD" - self.mapping_scale = "centimorgan" + self.mapping_scale = "morgan" if start_vars['num_perm'] == "": self.num_perm = 0 else: diff --git a/wqflask/wqflask/my_pylmm/data/genofile_parser.py b/wqflask/wqflask/my_pylmm/data/genofile_parser.py index 9191f345..61a00136 100755 --- a/wqflask/wqflask/my_pylmm/data/genofile_parser.py +++ b/wqflask/wqflask/my_pylmm/data/genofile_parser.py @@ -65,11 +65,11 @@ class ConvertGenoFile(object): self.configurations = {} #self.skipped_cols = 3 - if self.input_file.endswith(".geno.gz"): - print("self.input_file: ", self.input_file) - self.input_fh = gzip.open(self.input_file) - else: - self.input_fh = open(self.input_file) + #if self.input_file.endswith(".geno.gz"): + # print("self.input_file: ", self.input_file) + # self.input_fh = gzip.open(self.input_file) + #else: + self.input_fh = open(self.input_file) with open(self.output_file, "w") as self.output_fh: #if self.file_type == "geno": diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py index 850c99a7..aa6f9562 100755 --- a/wqflask/wqflask/show_trait/show_trait.py +++ b/wqflask/wqflask/show_trait/show_trait.py @@ -167,7 +167,7 @@ class ShowTrait(object): return False def check_pylmm_rqtl(): - if os.path.isfile(webqtlConfig.GENODIR+self.dataset.group.name+".geno"): + if os.path.isfile(webqtlConfig.GENODIR+self.dataset.group.name+".geno") and (os.path.getsize(webqtlConfig.NEWGENODIR+self.dataset.group.name+".json") > 0): return True else: return False diff --git a/wqflask/wqflask/static/new/javascript/chr_lod_chart.js b/wqflask/wqflask/static/new/javascript/chr_lod_chart.js index 60878978..c6fb52d8 100644 --- a/wqflask/wqflask/static/new/javascript/chr_lod_chart.js +++ b/wqflask/wqflask/static/new/javascript/chr_lod_chart.js @@ -119,7 +119,7 @@ Chr_Lod_Chart = (function() { }; Chr_Lod_Chart.prototype.create_scales = function() { - if (this.mappingScale == "centimorgan") { + if (this.mappingScale == "morgan") { max_pos = 0 for (i = 0, len = this.these_results.length; i < len; i++) { marker = this.these_results[i] diff --git a/wqflask/wqflask/static/new/javascript/panelutil.js b/wqflask/wqflask/static/new/javascript/panelutil.js index 5a931f7d..4c8e77ba 100644 --- a/wqflask/wqflask/static/new/javascript/panelutil.js +++ b/wqflask/wqflask/static/new/javascript/panelutil.js @@ -157,7 +157,7 @@ chrscales = function(data, width, chrGap, leftMargin, pad4heatmap, mappingScale) data.chrEnd.push(cur + w); cur = data.chrEnd[i] + chrGap; - if (mappingScale == "centimorgan") { + if (mappingScale == "morgan") { max_pos = d3.max(data.posByChr[chr[0]]) console.log("max_pos:", max_pos) data.xscale[chr[0]] = d3.scale.linear().domain([chrStart[i], max_pos]).range([data.chrStart[i], data.chrEnd[i]]); diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index ba96428d..588433f0 100755 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -335,6 +335,8 @@ def marker_regression_page(): 'trait_id', 'dataset', 'method', + 'mapping_scale', + 'score_type', 'suggestive', 'num_perm', 'maf', @@ -352,7 +354,7 @@ def marker_regression_page(): if key in wanted or key.startswith(('value:')): start_vars[key] = value - version = "v4" + version = "v1" key = "marker_regression:{}:".format(version) + json.dumps(start_vars, sort_keys=True) print("key is:", pf(key)) with Bench("Loading cache"): @@ -404,8 +406,8 @@ def marker_regression_page(): result['pair_scan_array'] = bytesarray rendered_template = render_template("pair_scan_results.html", **result) else: - #rendered_template = render_template("marker_regression.html", **result) - rendered_template = render_template("marker_regression_gn1.html", **result) + rendered_template = render_template("marker_regression.html", **result) + #rendered_template = render_template("marker_regression_gn1.html", **result) return rendered_template |