aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/base/trait.py4
-rw-r--r--wqflask/wqflask/static/new/javascript/get_covariates_from_collection.js17
-rw-r--r--wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js2
-rw-r--r--wqflask/wqflask/templates/show_trait_transform_and_filter.html1
4 files changed, 19 insertions, 5 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 9f76306f..79aa196f 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -220,6 +220,7 @@ def jsonable(trait):
dataset=dataset.name,
dataset_name = dataset.shortname,
description=trait.description_display,
+ abbreviation=trait.abbreviation,
authors=trait.authors,
pubmed_text=trait.pubmed_text,
pubmed_link=trait.pubmed_link,
@@ -232,6 +233,7 @@ def jsonable(trait):
dataset=dataset.name,
dataset_name = dataset.shortname,
description=trait.description_display,
+ abbreviation=trait.abbreviation,
authors=trait.authors,
pubmed_text=trait.pubmed_text,
lrs_score=trait.LRS_score_repr,
@@ -397,6 +399,7 @@ def retrieve_trait_info(trait, dataset, get_qtl_info=False):
#phenotype traits, then display the pre-publication description instead
#of the post-publication description
if trait.confidential:
+ trait.abbreviation = trait.pre_publication_abbreviation
trait.description_display = trait.pre_publication_description
#if not webqtlUtil.hasAccessToConfidentialPhenotypeTrait(
@@ -406,6 +409,7 @@ def retrieve_trait_info(trait, dataset, get_qtl_info=False):
#
# description = self.pre_publication_description
else:
+ trait.abbreviation = trait.post_publication_abbreviation
if description:
trait.description_display = description.strip()
else:
diff --git a/wqflask/wqflask/static/new/javascript/get_covariates_from_collection.js b/wqflask/wqflask/static/new/javascript/get_covariates_from_collection.js
index fc6e5a78..8cd6dac3 100644
--- a/wqflask/wqflask/static/new/javascript/get_covariates_from_collection.js
+++ b/wqflask/wqflask/static/new/javascript/get_covariates_from_collection.js
@@ -81,17 +81,22 @@ submit_click = function() {
$('#collections_holder').find('input[type=checkbox]:checked').each(function() {
var this_dataset, this_trait;
this_trait = $(this).parents('tr').find('.trait').text();
+ this_trait_display = $(this).parents('tr').find('.trait').data("display_name");
this_description = $(this).parents('tr').find('.description').text();
- console.log("this_trait is:", this_trait);
+ console.log("this_trait is:", this_trait_display);
this_dataset = $(this).parents('tr').find('.dataset').data("dataset");
console.log("this_dataset is:", this_dataset);
covariates_string += this_trait + ":" + this_dataset + ","
- this_covariate_display_string = this_trait + ": " + this_description
+ //this_covariate_display_string = this_trait + ": " + this_description
+ this_covariate_display_string = this_trait_display
if (this_covariate_display_string.length > 50) {
this_covariate_display_string = this_covariate_display_string.substring(0, 45) + "..."
}
covariates_display_string += this_covariate_display_string + "\n"
});
+ // Trim the last newline from display_string
+ covariates_display_string = covariates_display_string.replace(/\n$/, "")
+
// Trim the last comma
covariates_string = covariates_string.substring(0, covariates_string.length - 1)
//covariates_display_string = covariates_display_string.substring(0, covariates_display_string.length - 2)
@@ -189,7 +194,13 @@ process_traits = function(trait_data, textStatus, jqXHR) {
trait = trait_data[_i];
the_html += "<tr class='trait_line'>";
the_html += "<td class='select_trait'><input type='checkbox' name='selectCheck' class='checkbox edit_sample_checkbox'></td>";
- the_html += "<td class='trait'>" + trait.name + "</td>";
+ if ("abbreviation" in trait) {
+ the_html += "<td class='trait' data-display_name='" + trait.name + " - " + trait.abbreviation + "'>" + trait.name + "</td>";
+ } else if ("symbol" in trait) {
+ the_html += "<td class='trait' data-display_name='" + trait.name + " - " + trait.symbol + "'>" + trait.name + "</td>";
+ } else {
+ the_html += "<td class='trait' data-display_name='" + trait.name + "'>" + trait.name + "</td>";
+ }
the_html += "<td class='dataset' data-dataset='" + trait.dataset + "'>" + trait.dataset_name + "</td>";
the_html += "<td class='description'>" + trait.description + "</td>";
}
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 2ab87d03..28af232d 100644
--- a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js
@@ -225,7 +225,7 @@
};
})(this));
- $("#interval_mapping_compute").on("mouseover", (function(_this) {
+ $("#interval_mapping_compute, #gemma_compute, rqtl_geno_compute").on("mouseover", (function(_this) {
return function() {
if ($(".outlier").length && $(".outlier-alert").length < 1) {
return showalert(outlier_text, "alert-success outlier-alert");
diff --git a/wqflask/wqflask/templates/show_trait_transform_and_filter.html b/wqflask/wqflask/templates/show_trait_transform_and_filter.html
index 6803da58..94b3fda3 100644
--- a/wqflask/wqflask/templates/show_trait_transform_and_filter.html
+++ b/wqflask/wqflask/templates/show_trait_transform_and_filter.html
@@ -1,6 +1,5 @@
<div>
<div class="form-horizontal">
- <legend>Block samples</legend>
<p>Edit or delete values in the Trait Data boxes, and use the
<strong>Reset</strong> option as
needed.