aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates
diff options
context:
space:
mode:
Diffstat (limited to 'gn2/wqflask/templates')
-rw-r--r--gn2/wqflask/templates/corr_scatterplot.html177
-rw-r--r--gn2/wqflask/templates/gn_editor.html7
-rw-r--r--gn2/wqflask/templates/gn_editor_commit.html8
-rw-r--r--gn2/wqflask/templates/gn_editor_results_page.html31
-rw-r--r--gn2/wqflask/templates/gsearch_gene.html40
-rw-r--r--gn2/wqflask/templates/mapping_results.html12
-rw-r--r--gn2/wqflask/templates/show_trait_calculate_correlations.html2
-rw-r--r--gn2/wqflask/templates/show_trait_statistics.html2
8 files changed, 158 insertions, 121 deletions
diff --git a/gn2/wqflask/templates/corr_scatterplot.html b/gn2/wqflask/templates/corr_scatterplot.html
index 554471be..9532726c 100644
--- a/gn2/wqflask/templates/corr_scatterplot.html
+++ b/gn2/wqflask/templates/corr_scatterplot.html
@@ -126,18 +126,20 @@
<li {% if method == 'pearson' %}class="active"{% endif %}>
<a href="#tp1" data-toggle="tab">Pearson</a>
</li>
+ {% if effect_plot == false %}
<li {% if method == 'spearman' %}class="active"{% endif %}>
<a href="#tp2" data-toggle="tab">Spearman Rank</a>
</li>
+ {% endif %}
</ul>
- <div class="tab-content" style="min-width: 800px;">
+ <div class="tab-content" style="width: {% if effect_plot %}500{% else %}800{% endif %}px;">
<div class="tab-pane {% if method == 'pearson' %}active{% endif %}" id="tp1">
<br>
<div id="scatterplot2"></div>
<br>
- <div style="min-width: 700px; overflow: hidden;">
+ <div style="width: {% if effect_plot %}500{% else %}800{% endif %}px; overflow: hidden;">
<div style="margin-left: 50px; min-width: 300px;">
{% if trait_1.dataset.type == "ProbeSet" %}
<div>
@@ -248,101 +250,102 @@
</div>
</div>
+ {% if effect_plot == false %}
<div class="tab-pane {% if method == 'spearman' %}active{% endif %}" id="tp2">
<br>
<div id="srscatterplot2"></div>
<br>
- <div class="row" style="min-width: 700px; overflow: hidden;">
- <div style="margin-left: 50px; min-width: 300px;">
- {% if trait_1.dataset.type == "ProbeSet" %}
- <div>
- X axis:
- <a href="{{url_for('show_trait_page', trait_id = trait_1.name, dataset = trait_1.dataset.name)}}">
- {{trait_1.dataset.group.species + " " + trait_1.dataset.group.name + " " + trait_1.dataset.tissue + " " + trait_1.dataset.name + ": " + trait_1.name|string}}
- </a>
- </div>
- <div>
- [{{trait_1.symbol}} on {{trait_1.location_repr}} Mb]
- {{trait_1.description_display}}
- </div>
- {% elif trait_1.dataset.type == "Publish" %}
- <div>
- X axis:
- <a href="{{url_for('show_trait_page', trait_id = trait_1.name, dataset = trait_1.dataset.name)}}">
- {{trait_1.dataset.group.species + " " + trait_1.dataset.group.name + " " + trait_1.dataset.name + ": " + trait_1.name|string}}
- </a>
- </div>
- <div>
- <a href="{{trait_1.pubmed_link}}">PubMed: {{trait_1.pubmed_text}}</a>
+ <div class="row" style="width: 800px; overflow: hidden;">
+ <div style="margin-left: 50px; min-width: 300px;">
+ {% if trait_1.dataset.type == "ProbeSet" %}
+ <div>
+ X axis:
+ <a href="{{url_for('show_trait_page', trait_id = trait_1.name, dataset = trait_1.dataset.name)}}">
+ {{trait_1.dataset.group.species + " " + trait_1.dataset.group.name + " " + trait_1.dataset.tissue + " " + trait_1.dataset.name + ": " + trait_1.name|string}}
+ </a>
+ </div>
+ <div>
+ [{{trait_1.symbol}} on {{trait_1.location_repr}} Mb]
{{trait_1.description_display}}
- </div>
- {% endif %}
+ </div>
+ {% elif trait_1.dataset.type == "Publish" %}
+ <div>
+ X axis:
+ <a href="{{url_for('show_trait_page', trait_id = trait_1.name, dataset = trait_1.dataset.name)}}">
+ {{trait_1.dataset.group.species + " " + trait_1.dataset.group.name + " " + trait_1.dataset.name + ": " + trait_1.name|string}}
+ </a>
+ </div>
+ <div>
+ <a href="{{trait_1.pubmed_link}}">PubMed: {{trait_1.pubmed_text}}</a>
+ {{trait_1.description_display}}
+ </div>
+ {% endif %}
- <br/>
+ <br/>
- {% if trait_2.dataset.type == "ProbeSet" %}
- <div>
- Y axis:
- <a href="{{url_for('show_trait_page', trait_id = trait_2.name, dataset = trait_2.dataset.name)}}">
- {{trait_2.dataset.group.species + " " + trait_2.dataset.group.name + " " + trait_2.dataset.tissue + " " + trait_2.dataset.name + ": " + trait_2.name|string}}
- </a>
- </div>
- <div>
- [{{trait_2.symbol}} on {{trait_2.location_repr}} Mb]
- {{trait_2.description_display}}
- </div>
- {% elif trait_2.dataset.type == "Publish" %}
- <div>
- Y axis:
- <a href="{{url_for('show_trait_page', trait_id = trait_2.name, dataset = trait_2.dataset.name)}}">
- {{trait_2.dataset.group.species + " " + trait_2.dataset.group.name + " " + trait_2.dataset.name + ": " + trait_2.name|string}}
- </a>
- </div>
- <div>
- <a href="{{trait_2.pubmed_link}}">PubMed: {{trait_2.pubmed_text}}</a>
+ {% if trait_2.dataset.type == "ProbeSet" %}
+ <div>
+ Y axis:
+ <a href="{{url_for('show_trait_page', trait_id = trait_2.name, dataset = trait_2.dataset.name)}}">
+ {{trait_2.dataset.group.species + " " + trait_2.dataset.group.name + " " + trait_2.dataset.tissue + " " + trait_2.dataset.name + ": " + trait_2.name|string}}
+ </a>
+ </div>
+ <div>
+ [{{trait_2.symbol}} on {{trait_2.location_repr}} Mb]
{{trait_2.description_display}}
+ </div>
+ {% elif trait_2.dataset.type == "Publish" %}
+ <div>
+ Y axis:
+ <a href="{{url_for('show_trait_page', trait_id = trait_2.name, dataset = trait_2.dataset.name)}}">
+ {{trait_2.dataset.group.species + " " + trait_2.dataset.group.name + " " + trait_2.dataset.name + ": " + trait_2.name|string}}
+ </a>
+ </div>
+ <div>
+ <a href="{{trait_2.pubmed_link}}">PubMed: {{trait_2.pubmed_text}}</a>
+ {{trait_2.description_display}}
+ </div>
+ {% endif %}
+ </div>
+ <div style="float: left; margin-top: 30px;">
+ <table class="table table-hover table-striped table-bordered" style="width: 80%; margin-left: 60px; text-align: right;">
+ <thead>
+ <tr><th style="text-align: right;">Statistic</th><th style="text-align: right;">Value</th></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>Number</td>
+ <td>{{jsdata.num_overlap}}</td>
+ </tr>
+ <tr>
+ <td>Slope</td>
+ <td>{{ jsdata.srslope_string }}</td>
+ </tr>
+ <tr>
+ <td>Intercept</td>
+ <td>{{'%0.3f' % jsdata.srintercept}}</td>
+ </tr>
+ <tr>
+ <td>r value</td>
+ <td>{{'%0.3f' % jsdata.srr_value}}</td>
+ </tr>
+ <tr>
+ <td>P value</td>
+ <td>{% if jsdata.srp_value < 0.001 %}{{'%0.3e' % jsdata.srp_value}}{% else %}{{'%0.3f' % jsdata.srp_value}}{% endif %}</td>
+ </tr>
+ <tr>
+ <td style="text-align: left;" colspan="2">
+ Regression Line
+ <br>
+ y = {{ jsdata.srslope_string }} * x {% if jsdata.srintercept < 0 %}- {{'%0.3f' % (jsdata.srintercept * -1)}}{% else %}+ {{'%0.3f' % jsdata.srintercept}}{% endif %}
+ </td>
+ </tr>
+ </tbody>
+ </table>
</div>
- {% endif %}
- </div>
- <div style="float: left; margin-top: 30px;">
- <table class="table table-hover table-striped table-bordered" style="width: 80%; margin-left: 60px; text-align: right;">
- <thead>
- <tr><th style="text-align: right;">Statistic</th><th style="text-align: right;">Value</th></tr>
- </thead>
- <tbody>
- <tr>
- <td>Number</td>
- <td>{{jsdata.num_overlap}}</td>
- </tr>
- <tr>
- <td>Slope</td>
- <td>{{ jsdata.srslope_string }}</td>
- </tr>
- <tr>
- <td>Intercept</td>
- <td>{{'%0.3f' % jsdata.srintercept}}</td>
- </tr>
- <tr>
- <td>r value</td>
- <td>{{'%0.3f' % jsdata.srr_value}}</td>
- </tr>
- <tr>
- <td>P value</td>
- <td>{% if jsdata.srp_value < 0.001 %}{{'%0.3e' % jsdata.srp_value}}{% else %}{{'%0.3f' % jsdata.srp_value}}{% endif %}</td>
- </tr>
- <tr>
- <td style="text-align: left;" colspan="2">
- Regression Line
- <br>
- y = {{ jsdata.srslope_string }} * x {% if jsdata.srintercept < 0 %}- {{'%0.3f' % (jsdata.srintercept * -1)}}{% else %}+ {{'%0.3f' % jsdata.srintercept}}{% endif %}
- </td>
- </tr>
- </tbody>
- </table>
- </div>
</div>
- </div>
-
+ </div>
+ {% endif %}
</div>
{% endblock %}
diff --git a/gn2/wqflask/templates/gn_editor.html b/gn2/wqflask/templates/gn_editor.html
index d89aaf0a..14a41caa 100644
--- a/gn2/wqflask/templates/gn_editor.html
+++ b/gn2/wqflask/templates/gn_editor.html
@@ -29,10 +29,10 @@
hx-get="/editor/commit"
hx-target="#output"
hx-trigger="click"
- hx-swap="innerHTML">Commit</a>
+ hx-swap="innerHTML">Save</a>
</li>
<li>
- <a hx-trigger="click" id="diffBtn" hx-swap="innerHTML">Diff</a>
+ <a hx-trigger="click" id="diffBtn" hx-swap="innerHTML">Show Diff</a>
</li>
<li>
<a href="#"
@@ -228,6 +228,9 @@
editor.container.style.resize = "horizontal";
editor.getSession().on("change", function(e){
updatePreview()
+ })
+ editor.on("click", function(e){
+ updatePreview()
})
editor.setValue(data, -1);
}
diff --git a/gn2/wqflask/templates/gn_editor_commit.html b/gn2/wqflask/templates/gn_editor_commit.html
index 2eb3e60c..6006f6d2 100644
--- a/gn2/wqflask/templates/gn_editor_commit.html
+++ b/gn2/wqflask/templates/gn_editor_commit.html
@@ -3,7 +3,7 @@
<div>
<div>
<h2>
- <i>Commit your Changes</i>
+ <i>Save your Changes</i>
</h2>
</div>
</div>
@@ -11,7 +11,7 @@
<div>
<div class="row">
<label class="col-sm-8" for="message">
- <i>*Commit Message*</i>
+ <i>*Describe edit*</i>
</label>
</div>
<br>
@@ -24,9 +24,9 @@
<br>
<div class="row">
<button id="btn-commit"
- class="btn btn-primary col-lg-3 col-lg-offset-1 col-sm-4 col-sm-offset-1">Commit</button>
+ class="btn btn-primary col-lg-3 col-lg-offset-1 col-sm-4 col-sm-offset-1">Save</button>
<button id="btn-diff"
- class="btn col-lg-3 col-lg-offset-1 col-sm-4 col-sm-offset-1">Show Diff</button>
+ class="btn col-lg-3 col-lg-offset-1 col-sm-4 col-sm-offset-1">Show Edit Diff</button>
</div>
<br>
<div id="diff_page"></div>
diff --git a/gn2/wqflask/templates/gn_editor_results_page.html b/gn2/wqflask/templates/gn_editor_results_page.html
index 6eaeb941..4f169a66 100644
--- a/gn2/wqflask/templates/gn_editor_results_page.html
+++ b/gn2/wqflask/templates/gn_editor_results_page.html
@@ -1,13 +1,5 @@
<section classs="row commit-content" style="padding-top:25px">
<div class="col-sm-10 col-sm-offset-1">
- <div>
- <div>
- <h2>
- <i>Results status - {{ status }}</i>
- </h2>
- </div>
- </div>
- <br>
{% if error %}
<h1>
Error-type: <mark style="font-family: 'Linux Libertine','Georgia','Times','Source Serif Pro',serif"><b><i>{{ error }}</i></b></mark>
@@ -18,18 +10,27 @@
</h3>
{% else %}
<div>
+ <div class="lead">
+ <h3>
+ Save results message:
+ <mark style="font-family: 'Linux Libertine','Georgia','Times','Source Serif Pro',serif"><b>
+ {% if status == '200' %}
+ <i>Everything is up to date; No changes to Save</i>
+ {% elif status == '201' %}
+ <i> Saved your changes Successfully </i>
+ {% else %}
+ {{ message }}
+ {% endif %}
+ </b></mark>
+ </h3>
+ </div>
+ <br />
<h3>
- New Commit Sha: <span class="lead">
+ New Edit Sha: <span class="lead">
<mark style="font-family: 'Linux Libertine','Georgia','Times','Source Serif Pro',serif"><b><i>{{ commit_sha }}</i></b></mark>
</span>
</h3>
<br />
- <div class="lead">
- <h3>
- Commit Message:
- <mark style="font-family: 'Linux Libertine','Georgia','Times','Source Serif Pro',serif"><b><i>{{ message }}</i></b></mark>
- </h3>
- </div>
</div>
{% endif %}
<br>
diff --git a/gn2/wqflask/templates/gsearch_gene.html b/gn2/wqflask/templates/gsearch_gene.html
index f1ca998b..13b56b42 100644
--- a/gn2/wqflask/templates/gsearch_gene.html
+++ b/gn2/wqflask/templates/gsearch_gene.html
@@ -10,7 +10,7 @@
<div class="container">
- <div class="row">
+ <div>
<h3>GN searched for the term(s) <b>"{{ terms }}"</b> in 754 datasets and 39,765,944 traits across 10 species<br/>
and found <b>{{ trait_count }}</b> results that match your query.<br/>
</h3>
@@ -18,7 +18,7 @@
{% if do_ai_search %}
- <div class="row" id="ai_result">
+ <div class="row" id="ai_result_info">
<div class="text-center" id="spinner">
<i class="fa fa-spinner fa-spin fa-3x"></i>
</div>
@@ -287,13 +287,29 @@
{% if do_ai_search %}
<script type='text/javascript'>
function ai_content_div(search_term, search_result, search_uri) {
+ let header_length = 40;
+ let max_header_length = 180;
+ while (header_length <= search_result.length) {
+ let next_dot = search_result.indexOf(".", header_length+1);
+
+ if (next_dot > max_header_length) {
+ let next_comma = search_result.indexOf(",", header_length+1);
+ if (next_comma > max_header_length) {
+ break;
+ }
+ header_length = next_comma;
+ } else {
+ header_length = next_dot;
+ }
+ }
+ let header = search_result.slice(0, header_length+1);
return `
<div class="col-sm-6">
<div class="panel panel-info">
<div class="panel-heading" role="tab" id="ai_heading">
<h4 class="panel-title">
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#ai_results" aria-expanded="false" aria-controls="ai_results">
- AI Search: ${search_term} (Click for more details)
+ <a id="panel-title-content" class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#ai_results" aria-expanded="false" aria-controls="ai_results">
+ ${header} ... (Click for more details)
</a>
</h4>
</div>
@@ -308,6 +324,20 @@
`
}
+ $('#ai_result_info').on('hidden.bs.collapse', function () {
+ let original_text = $("#panel-title-content").text();
+ let new_text = original_text.replace("(Click to fold)", "(Click for more details)");
+ $("#panel-title-content").text(new_text);
+ })
+
+ $('#ai_result_info').on('shown.bs.collapse', function () {
+ let original_text = $("#panel-title-content").text();
+ let new_text = original_text.replace("(Click for more details)", "(Click to fold)");
+ $("#panel-title-content").text(new_text);
+ })
+
+
+
$(document).ready( function () {
$.ajax({url: "gnqna",
contentType: "application/json",
@@ -317,7 +347,7 @@
},
success: function(result) {
let ai_div = ai_content_div(result.search_term, result.search_result, result.search_url)
- $("#ai_result").append(ai_div);
+ $("#ai_result_info").append(ai_div);
},
complete: function() {
$("#spinner").hide();
diff --git a/gn2/wqflask/templates/mapping_results.html b/gn2/wqflask/templates/mapping_results.html
index 2fed79c1..c27de85e 100644
--- a/gn2/wqflask/templates/mapping_results.html
+++ b/gn2/wqflask/templates/mapping_results.html
@@ -116,7 +116,7 @@
<label class="radio-inline">
<input type="radio" name="LRSCheck" value="{% if LRS_LOD == "-logP" %}-logP{% else %}LOD{% endif %}" {% if LRS_LOD == "LOD" or LRS_LOD == "-logP" %}checked{% endif %}>{% if LRS_LOD == "-logP" %}-logP{% else %}LOD{% endif %}
</label>
- <a href="https://genenetwork.org/glossary.html#LOD" target="_blank">
+ <a href="{{ url_for('gn_docs_blueprint.glossary') }}#LOD" target="_blank">
<sup style="color:#f00"> ?</sup>
</a>
</td>
@@ -158,27 +158,27 @@
<div class="col-xs-4" style="padding: 0px;">
{% if (mapping_method == "reaper" or mapping_method == "rqtl_geno") and nperm > 0 %}
<input type="checkbox" name="permCheck" class="checkbox" style="display: inline; margin-top: 0px;" {% if permChecked|upper == "ON" %}value="ON" checked{% endif %}> <span style="font-size: 12px;">Permutation Test
- <a href="http://genenetwork.org/glossary.html#Permutation" target="_blank">
+ <a href="{{ url_for('gn_docs_blueprint.glossary') }}#Permutation" target="_blank">
<sup style="color:#f00"> ?</sup>
</a>
<br>
{% endif %}
{% if mapping_method == "reaper" and nboot > 0 %}
<input type="checkbox" name="bootCheck" class="checkbox" style="display: inline; margin-top: 0px;" {% if bootChecked|upper == "ON" %}value="ON" checked{% endif %}> <span style="font-size: 12px;">Bootstrap Test
- <a href="http://genenetwork.org/glossary.html#bootstrap" target="_blank">
+ <a href="{{ url_for('gn_docs_blueprint.glossary') }}#bootstrap" target="_blank">
<sup style="color:#f00"> ?</sup>
</a>
<br>
{% endif %}
{% if mapping_method == "reaper" %}
<input type="checkbox" name="additiveCheck" class="checkbox" style="display: inline; margin-top: 0px;" {% if additiveChecked|upper == "ON" %}value="ON" checked{% endif %}> <span style="font-size: 12px;">Allele Effects
- <a href="http://genenetwork.org/glossary.html#additive" target="_blank">
+ <a href="{{ url_for('gn_docs_blueprint.glossary') }}#additive" target="_blank">
<sup style="color:#f00"> ?</sup>
</a>
<br>
{% endif %}
<input type="checkbox" name="showSNP" class="checkbox" style="display: inline; margin-top: 0px;" {% if SNPChecked|upper == "ON" %}value="ON" checked{% endif %}> <span style="font-size: 12px;">SNP Track </span>
- <a href="http://genenetwork.org/glossary.html#snpSeismograph" target="_blank">
+ <a href="{{ url_for('gn_docs_blueprint.glossary') }}#snpSeismograph" target="_blank">
<sup style="color:#f00"> ?</sup>
</a>
<span style="color:red;">*</span>
@@ -416,7 +416,7 @@
'data': null,
'render': function(data, type, row, meta) {
{% if geno_db_exists == "True" %}
- return '<a target"_blank" href="corr_scatter_plot?method=pearson&dataset_1={{ dataset.group.name }}Geno&dataset_2={{ dataset.name }}&trait_1=' + data.name + '&trait_2={{ this_trait.name }}&cached_trait=trait_2&dataid={{ dataid }}">' + String(parseFloat(data.additive).toFixed(3)) + '</a>'
+ return '<a target"_blank" href="corr_scatter_plot?method=pearson&dataset_1={{ dataset.group.name }}Geno&dataset_2={{ dataset.name }}&trait_1=' + data.name + '&trait_2={{ this_trait.name }}&cached_trait=trait_2&dataid={{ dataid }}&effect=True">' + String(parseFloat(data.additive).toFixed(3)) + '</a>'
{% else %}
return String(parseFloat(data.additive).toFixed(3))
{% endif %}
diff --git a/gn2/wqflask/templates/show_trait_calculate_correlations.html b/gn2/wqflask/templates/show_trait_calculate_correlations.html
index d2e6624e..2f78a095 100644
--- a/gn2/wqflask/templates/show_trait_calculate_correlations.html
+++ b/gn2/wqflask/templates/show_trait_calculate_correlations.html
@@ -148,7 +148,7 @@
Semantic Gene Organizer</span>
and human, rat, and mouse data from PubMed.
Values are ranked by Lit r, but Sample r and Tissue r are also displayed.<br>
- <a href="http://genenetwork.org/glossary.html#Literature">More on using Lit r</a></dd>
+ <a href="{{ url_for('gn_docs_blueprint.glossary') }}#Literature">More on using Lit r</a></dd>
<dt class="map-method-text">Tissue Correlation</dt>
<dd>The <a href="http://genenetwork.org/webqtl/main.py?FormID=tissueCorrelation">Tissue Correlation</a>
(Tissue r)
diff --git a/gn2/wqflask/templates/show_trait_statistics.html b/gn2/wqflask/templates/show_trait_statistics.html
index 9ee0de5c..d16835e7 100644
--- a/gn2/wqflask/templates/show_trait_statistics.html
+++ b/gn2/wqflask/templates/show_trait_statistics.html
@@ -87,7 +87,7 @@
<br>
<div>
More about <a href="http://en.wikipedia.org/wiki/Normal_probability_plot">Normal Probability Plots</a> and more
- about interpreting these plots from the <a href="http://genenetwork.org/glossary.html#normal_probability">glossary</a>
+ about interpreting these plots from the <a href="{{ url_for('gn_docs_blueprint.glossary') }}#normal_probability">glossary</a>
</div>
</div>
</div>