aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2020-06-17 13:40:10 -0500
committerzsloan2020-06-17 13:40:10 -0500
commit7438f3c45122f02c25155b42ede703ad2845649c (patch)
tree383096092ba1f7cedc89450afec67f3ab20bfd83
parentccae8abe246af7b8f27fbcb9a37a3d242e594126 (diff)
downloadgenenetwork2-7438f3c45122f02c25155b42ede703ad2845649c.tar.gz
Fixed issue caused by mapping scale sometimes being wrong + fixed Verify link
-rw-r--r--wqflask/wqflask/marker_regression/gemma_mapping.py2
-rw-r--r--wqflask/wqflask/marker_regression/run_mapping.py1
-rw-r--r--wqflask/wqflask/show_trait/show_trait.py8
-rw-r--r--wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js4
-rwxr-xr-xwqflask/wqflask/templates/show_trait_mapping_tools.html11
5 files changed, 18 insertions, 8 deletions
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 @@
</select>
</div>
</div>
+ {% else %}
+ <div class="mapping_method_fields form-group">
+ <label for="scale_select" style="text-align: right;" class="col-xs-3 control-label">Map Scale</label>
+ <div style="margin-left:20px;" class="col-xs-2 controls">
+ <select id="scale_reaper" class="form-control" style="width: 80px;">
+ {% for item in scales_in_geno[dataset.group.name + ".geno"] %}
+ <option value="{{ item[0] }}">{{ item[1] }}</option>
+ {% endfor %}
+ </select>
+ </div>
+ </div>
{% endif %}
<div class="mapping_method_fields form-group">
<label style="text-align: right;" for="mapping_permutations" class="col-xs-3 control-label">Permutations</label>