From 7438f3c45122f02c25155b42ede703ad2845649c Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 17 Jun 2020 13:40:10 -0500 Subject: Fixed issue caused by mapping scale sometimes being wrong + fixed Verify link --- wqflask/wqflask/marker_regression/gemma_mapping.py | 2 -- wqflask/wqflask/marker_regression/run_mapping.py | 1 + wqflask/wqflask/show_trait/show_trait.py | 8 ++++---- .../wqflask/static/new/javascript/show_trait_mapping_tools.js | 4 ++-- wqflask/wqflask/templates/show_trait_mapping_tools.html | 11 +++++++++++ 5 files changed, 18 insertions(+), 8 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/marker_regression/gemma_mapping.py b/wqflask/wqflask/marker_regression/gemma_mapping.py index 88d27517..b858b573 100644 --- a/wqflask/wqflask/marker_regression/gemma_mapping.py +++ b/wqflask/wqflask/marker_regression/gemma_mapping.py @@ -136,9 +136,7 @@ def gen_covariates_file(this_dataset, covariates, samples): #trait_samples = this_dataset.group.all_samples_ordered() this_dataset.group.get_samplelist() trait_samples = this_dataset.group.samplelist - logger.debug("SAMPLES:", trait_samples) trait_sample_data = trait_ob.data - logger.debug("SAMPLE DATA:", trait_sample_data) for index, sample in enumerate(trait_samples): if sample in samples: if sample in trait_sample_data: diff --git a/wqflask/wqflask/marker_regression/run_mapping.py b/wqflask/wqflask/marker_regression/run_mapping.py index 0711b852..c859fdaa 100644 --- a/wqflask/wqflask/marker_regression/run_mapping.py +++ b/wqflask/wqflask/marker_regression/run_mapping.py @@ -162,6 +162,7 @@ class RunMapping(object): self.perm_output = [] self.bootstrap_results = [] self.covariates = start_vars['covariates'] if "covariates" in start_vars else "" + self.categorical_vars = [] #ZS: This is passed to GN1 code for single chr mapping self.selected_chr = -1 diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py index c77e247f..ed4ff0ad 100644 --- a/wqflask/wqflask/show_trait/show_trait.py +++ b/wqflask/wqflask/show_trait/show_trait.py @@ -22,7 +22,7 @@ from base.trait import create_trait from base import data_set from db import webqtlDatabaseFunction from utility import webqtlUtil, Plot, Bunch, helper_functions -from utility.authentication_tools import check_owner +from utility.authentication_tools import check_owner_or_admin from utility.tools import locate_ignore_error from utility.redis_tools import get_redis_conn, get_resource_id Redis = get_redis_conn() @@ -72,11 +72,11 @@ class ShowTrait(object): cellid=None) self.trait_vals = Redis.get(self.trait_id).split() - self.resource_id = check_owner(self.dataset, self.trait_id) + self.admin_status = check_owner_or_admin(self.dataset, self.trait_id) #ZS: Get verify/rna-seq link URLs try: - blatsequence = self.this_trait.sequence + blatsequence = self.this_trait.blatseq if not blatsequence: #XZ, 06/03/2009: ProbeSet name is not unique among platforms. We should use ProbeSet Id instead. query1 = """SELECT Probe.Sequence, Probe.Name @@ -256,7 +256,7 @@ class ShowTrait(object): hddn['export_data'] = "" hddn['export_format'] = "excel" if len(self.scales_in_geno) < 2: - hddn['mapping_scale'] = self.scales_in_geno[self.scales_in_geno.keys()[0]][0] + hddn['mapping_scale'] = self.scales_in_geno[self.scales_in_geno.keys()[0]][0][0] # We'll need access to this_trait and hddn in the Jinja2 Template, so we put it inside self self.hddn = hddn diff --git a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js index 01da3f74..db17af40 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js +++ b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js @@ -3,9 +3,9 @@ var block_outliers, composite_mapping_fields, do_ajax_post, get_progress, mapping_method_fields, open_mapping_results, outlier_text, showalert, submit_special, toggle_enable_disable, update_time_remaining; submit_special = function(url) { - console.log("In submit_special"); $("#trait_data_form").attr("action", url); - return $("#trait_data_form").submit(); + $("#trait_data_form").submit(); + return false; }; update_time_remaining = function(percent_complete) { diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html index a2416ced..e851a81e 100755 --- a/wqflask/wqflask/templates/show_trait_mapping_tools.html +++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html @@ -140,6 +140,17 @@ + {% else %} +
+ +
+ +
+
{% endif %}
-- cgit v1.2.3