From 6fffa425a403796e56388699ed5e0f1a93a15875 Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 20 Aug 2019 16:54:23 -0500 Subject: Added horizontal scroll for mapping figure when window isn't wide enough Changed the way some mapping options are displayed on trait page Changed the header for the stats table and bar graph to increase the trait description --- .../static/new/javascript/init_genome_browser.js | 6 +++--- wqflask/wqflask/static/new/javascript/show_trait.js | 4 ++-- wqflask/wqflask/templates/mapping_results.html | 20 +++++++++++--------- .../wqflask/templates/show_trait_mapping_tools.html | 12 ++++++------ 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/wqflask/wqflask/static/new/javascript/init_genome_browser.js b/wqflask/wqflask/static/new/javascript/init_genome_browser.js index 6a19fe08..c4f91023 100644 --- a/wqflask/wqflask/static/new/javascript/init_genome_browser.js +++ b/wqflask/wqflask/static/new/javascript/init_genome_browser.js @@ -12,7 +12,7 @@ localUrls = var coordinateSystem = js_data.chr_lengths var vscaleWidth = 90.0; -var legendWidth = 140.0; +var legendWidth = 150.0; if ('significant' in js_data) { var significant_score = parseFloat(js_data.significant) @@ -24,7 +24,7 @@ var gwasPadding = { top: 35.0, bottom: 35.0, left: vscaleWidth, right: legendWidth }; -var gwasHeight = 320.0; +var gwasHeight = 500.0; var config = { score: score, urls: localUrls, @@ -51,7 +51,7 @@ var config = score: score, legend: { fontSize: 14, - hPad: 0.2, + hPad: 0.1, vPad: 0.2 }, vscale: { diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js index 53158885..830dbf7f 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait.js +++ b/wqflask/wqflask/static/new/javascript/show_trait.js @@ -336,7 +336,7 @@ make_table = function() { if (js_data.trait_symbol != null) { header = "Trait " + js_data.trait_id + " - " + js_data.trait_symbol + "Statistic"; } else { - header = "Trait " + js_data.trait_id + "Statistic"; + header = "Trait " + js_data.trait_id + ": " + js_data.short_description + "Statistic"; } _ref = js_data.sample_group_types; for (key in _ref) { @@ -938,7 +938,7 @@ if (js_data.num_values < 256) { bottom_margin = get_bar_bottom_margin(sample_lists[0]) root.bar_layout = { - title: js_data.trait_id, + title: "Trait " + js_data.trait_id + ": " + js_data.short_description + "", xaxis: { type: 'category', titlefont: { diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html index 7b99fd35..becb139a 100644 --- a/wqflask/wqflask/templates/mapping_results.html +++ b/wqflask/wqflask/templates/mapping_results.html @@ -160,7 +160,7 @@ Genome Browser -
+
{{ gifmap|safe }} @@ -169,17 +169,10 @@
A positive additive coefficient (green line) indicates that {{ dataset.group.parlist[1] }} alleles increase trait values. In contrast, a negative additive coefficient (orange line) indicates that {{ dataset.group.parlist[0] }} alleles increase trait values. {% endif %} - {% if nperm > 0 and permChecked == "ON" %} -

- -

- Total of {{ nperm }} permutations  Download Permutation Results -
- {% endif %}
-
+
+
+ {% if nperm > 0 and permChecked == "ON" %} +

+ +

+ Total of {{ nperm }} permutations  Download Permutation Results +
+ {% endif %} +
{% if selectedChr == -1 %} diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html index 04480e69..1a67dce8 100644 --- a/wqflask/wqflask/templates/show_trait_mapping_tools.html +++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html @@ -1,6 +1,6 @@
{% if dataset.group.mapping_names|length > 0 %} -
+
- +
{% if dataset.type == 'ProbeSet' and this_trait.locus_chr != "" %} {% else %} {% endif %} - Yes   No + Yes   No
- +
-- cgit v1.2.3