aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/base/trait.py22
-rw-r--r--wqflask/wqflask/correlation/corr_scatter_plot.py2
-rw-r--r--wqflask/wqflask/correlation/show_corr_results.py13
-rw-r--r--wqflask/wqflask/correlation_matrix/show_corr_matrix.py43
-rw-r--r--wqflask/wqflask/marker_regression/qtlreaper_mapping.py4
-rw-r--r--wqflask/wqflask/marker_regression/run_mapping.py8
-rw-r--r--wqflask/wqflask/search_results.py18
-rw-r--r--wqflask/wqflask/static/new/css/colorbox.css238
-rw-r--r--wqflask/wqflask/static/new/css/marker_regression.css4
-rw-r--r--wqflask/wqflask/static/new/css/show_trait.css4
-rw-r--r--wqflask/wqflask/static/new/javascript/auto_hide_column.js21
-rw-r--r--wqflask/wqflask/static/new/javascript/show_trait.js36
-rw-r--r--wqflask/wqflask/templates/admin/create_group.html4
-rw-r--r--wqflask/wqflask/templates/admin/group_manager.html2
-rw-r--r--wqflask/wqflask/templates/admin/ind_user_manager.html2
-rw-r--r--wqflask/wqflask/templates/admin/manage_user.html2
-rw-r--r--wqflask/wqflask/templates/admin/search_for_groups.html2
-rw-r--r--wqflask/wqflask/templates/admin/set_group_privileges.html2
-rw-r--r--wqflask/wqflask/templates/admin/view_group.html2
-rw-r--r--wqflask/wqflask/templates/base.html13
-rw-r--r--wqflask/wqflask/templates/collections/list.html4
-rw-r--r--wqflask/wqflask/templates/collections/not_logged_in.html4
-rw-r--r--wqflask/wqflask/templates/collections/view.html38
-rw-r--r--wqflask/wqflask/templates/comparison_bar_chart.html6
-rw-r--r--wqflask/wqflask/templates/corr_scatterplot.html12
-rw-r--r--wqflask/wqflask/templates/correlation_matrix.html22
-rw-r--r--wqflask/wqflask/templates/correlation_page.html96
-rw-r--r--wqflask/wqflask/templates/ctl_results.html10
-rw-r--r--wqflask/wqflask/templates/docedit.html2
-rw-r--r--wqflask/wqflask/templates/gsearch_gene.html2
-rw-r--r--wqflask/wqflask/templates/gsearch_pheno.html2
-rw-r--r--wqflask/wqflask/templates/heatmap.html4
-rwxr-xr-xwqflask/wqflask/templates/index_page_orig.html2
-rw-r--r--wqflask/wqflask/templates/loading.html4
-rw-r--r--wqflask/wqflask/templates/mapping_results.html11
-rw-r--r--wqflask/wqflask/templates/network_graph.html11
-rw-r--r--wqflask/wqflask/templates/new_security/forgot_password_step2.html2
-rw-r--r--wqflask/wqflask/templates/new_security/password_reset.html2
-rw-r--r--wqflask/wqflask/templates/new_security/register_user.html2
-rw-r--r--wqflask/wqflask/templates/new_security/registered.html2
-rw-r--r--wqflask/wqflask/templates/new_security/thank_you.html2
-rw-r--r--wqflask/wqflask/templates/new_security/verification_still_needed.html2
-rw-r--r--wqflask/wqflask/templates/pair_scan_results.html6
-rw-r--r--wqflask/wqflask/templates/search_result_page.html57
-rw-r--r--wqflask/wqflask/templates/set_group_privileges.html2
-rw-r--r--wqflask/wqflask/templates/show_trait.html45
-rw-r--r--wqflask/wqflask/templates/show_trait_calculate_correlations.html2
-rw-r--r--wqflask/wqflask/templates/show_trait_edit_data.html30
-rw-r--r--wqflask/wqflask/templates/show_trait_transform_and_filter.html2
-rw-r--r--wqflask/wqflask/templates/snp_browser.html2
-rw-r--r--wqflask/wqflask/templates/tool_buttons.html35
-rw-r--r--wqflask/wqflask/views.py11
52 files changed, 619 insertions, 257 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index ec8c40a0..50bd8874 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -25,19 +25,19 @@ def create_trait(**kw):
assert bool(kw.get('dataset')) != bool(
kw.get('dataset_name')), "Needs dataset ob. or name"
- if kw.get('name'):
- if kw.get('dataset_name'):
- if kw.get('dataset_name') != "Temp":
- dataset = create_dataset(kw.get('dataset_name'))
- else:
- dataset = kw.get('dataset')
+ assert bool(kw.get('name')), "Needs trait name"
+ if kw.get('dataset_name'):
if kw.get('dataset_name') != "Temp":
- if dataset.type == 'Publish':
- permissions = check_resource_availability(
- dataset, kw.get('name'))
- else:
- permissions = check_resource_availability(dataset)
+ dataset = create_dataset(kw.get('dataset_name'))
+ else:
+ dataset = kw.get('dataset')
+
+ if dataset.type == 'Publish':
+ permissions = check_resource_availability(
+ dataset, kw.get('name'))
+ else:
+ permissions = check_resource_availability(dataset)
if "view" in permissions['data']:
the_trait = GeneralTrait(**kw)
diff --git a/wqflask/wqflask/correlation/corr_scatter_plot.py b/wqflask/wqflask/correlation/corr_scatter_plot.py
index 6ab8c3d8..c87776bb 100644
--- a/wqflask/wqflask/correlation/corr_scatter_plot.py
+++ b/wqflask/wqflask/correlation/corr_scatter_plot.py
@@ -29,6 +29,8 @@ class CorrScatterPlot(object):
self.trait_2 = create_trait(name=params['trait_2'], dataset=self.dataset_2)
#self.trait_3 = create_trait(name=params['trait_3'], dataset=self.dataset_3)
+ self.method = params['method']
+
primary_samples = self.dataset_1.group.samplelist
if self.dataset_1.group.parlist != None:
primary_samples += self.dataset_1.group.parlist
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py
index 0c1cea0e..7d3b9b9f 100644
--- a/wqflask/wqflask/correlation/show_corr_results.py
+++ b/wqflask/wqflask/correlation/show_corr_results.py
@@ -493,14 +493,15 @@ def generate_corr_json(corr_results, this_trait, dataset, target_dataset, for_ap
results_dict['description'] = "N/A"
results_dict['location'] = trait.location_repr
results_dict['mean'] = "N/A"
- results_dict['lrs_score'] = "N/A"
results_dict['additive'] = "N/A"
if bool(trait.description_display):
results_dict['description'] = trait.description_display
if bool(trait.mean):
results_dict['mean'] = f"{float(trait.mean):.3f}"
- if trait.LRS_score_repr != "N/A":
- results_dict['lrs_score'] = f"{float(trait.LRS_score_repr):.1f}"
+ try:
+ results_dict['lod_score'] = f"{float(trait.LRS_score_repr) / 4.61:.1f}"
+ except:
+ results_dict['lod_score'] = "N/A"
results_dict['lrs_location'] = trait.LRS_location_repr
if bool(trait.additive):
results_dict['additive'] = f"{float(trait.additive):.3f}"
@@ -544,8 +545,10 @@ def generate_corr_json(corr_results, this_trait, dataset, target_dataset, for_ap
else:
results_dict['pubmed_link'] = trait.pubmed_link
results_dict['pubmed_text'] = trait.pubmed_text
-
- results_dict['lrs_score'] = trait.LRS_score_repr
+ try:
+ results_dict['lod_score'] = f"{float(trait.LRS_score_repr) / 4.61:.1f}"
+ except:
+ results_dict['lod_score'] = "N/A"
results_dict['lrs_location'] = trait.LRS_location_repr
if bool(trait.additive):
results_dict['additive'] = f"{float(trait.additive):.3f}"
diff --git a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
index 0269ce68..a77877d2 100644
--- a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
+++ b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
@@ -20,24 +20,23 @@
import datetime
import math
+import random
+import string
+
import numpy as np
import scipy
import rpy2.robjects as robjects
-import utility.webqtlUtil # this is for parallel computing only.
-import utility.logger
+from rpy2.robjects.packages import importr
from base import data_set
+from base.webqtlConfig import GENERATED_TEXT_DIR
from functools import reduce
from functools import cmp_to_key
-from rpy2.robjects.packages import importr
-
from utility import webqtlUtil
from utility import helper_functions
from utility import corr_result_helpers
from utility.redis_tools import get_redis_conn
-logger = utility.logger.getLogger(__name__)
-
Redis = get_redis_conn()
THIRTY_DAYS = 60 * 60 * 24 * 30
@@ -135,6 +134,8 @@ class CorrelationMatrix(object):
self.corr_results.append(corr_result_row)
self.pca_corr_results.append(pca_corr_result_row)
+ self.export_filename, self.export_filepath = export_corr_matrix(self.corr_results)
+
self.trait_data_array = []
for trait_db in self.trait_list:
this_trait = trait_db[0]
@@ -232,6 +233,36 @@ class CorrelationMatrix(object):
loadings_array.append(loadings_row)
return loadings_array
+def export_corr_matrix(corr_results):
+ corr_matrix_filename = "corr_matrix_" + ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(6))
+ matrix_export_path = "{}{}.csv".format(GENERATED_TEXT_DIR, corr_matrix_filename)
+ with open(matrix_export_path, "w+") as output_file:
+ output_file.write("Time/Date: " + datetime.datetime.now().strftime("%x / %X") + "\n")
+ output_file.write("\n")
+ output_file.write("Correlation ")
+ for i, item in enumerate(corr_results[0]):
+ output_file.write("Trait" + str(i + 1) + ": " + str(item[0].dataset.name) + "::" + str(item[0].name) + "\t")
+ output_file.write("\n")
+ for i, row in enumerate(corr_results):
+ output_file.write("Trait" + str(i + 1) + ": " + str(row[0][0].dataset.name) + "::" + str(row[0][0].name) + "\t")
+ for item in row:
+ output_file.write(str(item[1]) + "\t")
+ output_file.write("\n")
+
+ output_file.write("\n")
+ output_file.write("\n")
+ output_file.write("N ")
+ for i, item in enumerate(corr_results[0]):
+ output_file.write("Trait" + str(i) + ": " + str(item[0].dataset.name) + "::" + str(item[0].name) + "\t")
+ output_file.write("\n")
+ for i, row in enumerate(corr_results):
+ output_file.write("Trait" + str(i) + ": " + str(row[0][0].dataset.name) + "::" + str(row[0][0].name) + "\t")
+ for item in row:
+ output_file.write(str(item[2]) + "\t")
+ output_file.write("\n")
+
+ return corr_matrix_filename, matrix_export_path
+
def zScore(trait_data_array):
NN = len(trait_data_array[0])
if NN < 10:
diff --git a/wqflask/wqflask/marker_regression/qtlreaper_mapping.py b/wqflask/wqflask/marker_regression/qtlreaper_mapping.py
index 505ae295..8341ee55 100644
--- a/wqflask/wqflask/marker_regression/qtlreaper_mapping.py
+++ b/wqflask/wqflask/marker_regression/qtlreaper_mapping.py
@@ -33,8 +33,8 @@ def run_reaper(this_trait, this_dataset, samples, vals, json_data, num_perm, boo
)
opt_list.append("-b")
- opt_list.append(f"--n_bootstrap{str(num_bootstrap)}")
- opt_list.append(f"--bootstrap_output{webqtlConfig.GENERATED_IMAGE_DIR}{bootstrap_filename}.txt")
+ opt_list.append(f"--n_bootstrap {str(num_bootstrap)}")
+ opt_list.append(f"--bootstrap_output {webqtlConfig.GENERATED_IMAGE_DIR}{bootstrap_filename}.txt")
if num_perm > 0:
permu_filename =("{this_dataset.group.name}_PERM_" +
''.join(random.choice(string.ascii_uppercase +
diff --git a/wqflask/wqflask/marker_regression/run_mapping.py b/wqflask/wqflask/marker_regression/run_mapping.py
index c474e0e0..891fcc66 100644
--- a/wqflask/wqflask/marker_regression/run_mapping.py
+++ b/wqflask/wqflask/marker_regression/run_mapping.py
@@ -426,6 +426,8 @@ class RunMapping(object):
marker['display_pos'] = "N/A"
self.qtl_results.append(marker)
+ total_markers = len(self.qtl_results)
+
with Bench("Exporting Results"):
export_mapping_results(self.dataset, self.this_trait, self.qtl_results, self.mapping_results_path, self.mapping_scale, self.score_type)
@@ -489,13 +491,15 @@ class RunMapping(object):
perm_results = self.perm_output,
significant = significant_for_browser,
browser_files = browser_files,
- selected_chr = this_chr
+ selected_chr = this_chr,
+ total_markers = total_markers
)
else:
self.js_data = dict(
chr_lengths = chr_lengths,
browser_files = browser_files,
- selected_chr = this_chr
+ selected_chr = this_chr,
+ total_markers = total_markers
)
def run_rqtl_plink(self):
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py
index ce836ce2..0d0894a4 100644
--- a/wqflask/wqflask/search_results.py
+++ b/wqflask/wqflask/search_results.py
@@ -126,11 +126,14 @@ views.py).
trait_dict['mean'] = "N/A"
trait_dict['additive'] = "N/A"
if this_trait.mean != "" and this_trait.mean != None:
- trait_dict['mean'] = '%.3f' % this_trait.mean
- trait_dict['lrs_score'] = this_trait.LRS_score_repr
+ trait_dict['mean'] = f"{this_trait.mean:.3f}"
+ try:
+ trait_dict['lod_score'] = f"{float(this_trait.LRS_score_repr) / 4.61:.1f}"
+ except:
+ trait_dict['lod_score'] = "N/A"
trait_dict['lrs_location'] = this_trait.LRS_location_repr
if this_trait.additive != "":
- trait_dict['additive'] = '%.3f' % this_trait.additive
+ trait_dict['additive'] = f"{this_trait.additive:.3f}"
elif this_trait.dataset.type == "Geno":
trait_dict['location'] = this_trait.location_repr
elif this_trait.dataset.type == "Publish":
@@ -143,12 +146,15 @@ views.py).
trait_dict['pubmed_text'] = this_trait.pubmed_text
trait_dict['mean'] = "N/A"
if this_trait.mean != "" and this_trait.mean != None:
- trait_dict['mean'] = '%.3f' % this_trait.mean
- trait_dict['lrs_score'] = this_trait.LRS_score_repr
+ trait_dict['mean'] = f"{this_trait.mean:.3f}"
+ try:
+ trait_dict['lod_score'] = f"{float(this_trait.LRS_score_repr) / 4.61:.1f}"
+ except:
+ trait_dict['lod_score'] = "N/A"
trait_dict['lrs_location'] = this_trait.LRS_location_repr
trait_dict['additive'] = "N/A"
if this_trait.additive != "":
- trait_dict['additive'] = '%.3f' % this_trait.additive
+ trait_dict['additive'] = f"{this_trait.additive:.3f}"
# Convert any bytes in dict to a normal utf-8 string
for key in trait_dict.keys():
if isinstance(trait_dict[key], bytes):
diff --git a/wqflask/wqflask/static/new/css/colorbox.css b/wqflask/wqflask/static/new/css/colorbox.css
new file mode 100644
index 00000000..8b9fb388
--- /dev/null
+++ b/wqflask/wqflask/static/new/css/colorbox.css
@@ -0,0 +1,238 @@
+/*
+ Colorbox Core Style:
+ The following CSS is consistent between example themes and should not be altered.
+*/
+#colorbox,
+#cboxOverlay,
+#cboxWrapper {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 9999;
+ overflow: hidden;
+}
+
+#cboxOverlay {
+ position: fixed;
+ width: 100%;
+ height: 100%;
+}
+
+#cboxMiddleLeft,
+#cboxBottomLeft {
+ clear: left;
+}
+
+#cboxContent {
+ position: relative;
+}
+
+#cboxLoadedContent {
+ overflow: auto;
+ -webkit-overflow-scrolling: touch;
+}
+
+#cboxTitle {
+ margin: 0;
+}
+
+#cboxLoadingOverlay,
+#cboxLoadingGraphic {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+
+#cboxPrevious,
+#cboxNext,
+#cboxClose,
+#cboxSlideshow {
+ cursor: pointer;
+}
+
+.cboxPhoto {
+ float: left;
+ margin: auto;
+ border: 0;
+ display: block;
+ max-width: none;
+ -ms-interpolation-mode: bicubic;
+}
+
+.cboxIframe {
+ width: 100%;
+ height: 100%;
+ display: block;
+ border: 0;
+}
+
+#colorbox,
+#cboxContent,
+#cboxLoadedContent {
+ box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ -webkit-box-sizing: content-box;
+}
+
+/*
+ User Style:
+ Change the following styles to modify the appearance of Colorbox. They are
+ ordered & tabbed in a way that represents the nesting of the generated HTML.
+*/
+#cboxOverlay {
+ background: #fff;
+}
+
+#colorbox {
+ outline: 0;
+}
+
+#cboxTopLeft {
+ width: 25px;
+ height: 25px;
+ background: url(images/border1.png) no-repeat 0 0;
+}
+
+#cboxTopCenter {
+ height: 25px;
+ background: url(images/border1.png) repeat-x 0 -50px;
+}
+
+#cboxTopRight {
+ width: 25px;
+ height: 25px;
+ background: url(images/border1.png) no-repeat -25px 0;
+}
+
+#cboxBottomLeft {
+ width: 25px;
+ height: 25px;
+ background: url(images/border1.png) no-repeat 0 -25px;
+}
+
+#cboxBottomCenter {
+ height: 25px;
+ background: url(images/border1.png) repeat-x 0 -75px;
+}
+
+#cboxBottomRight {
+ width: 25px;
+ height: 25px;
+ background: url(images/border1.png) no-repeat -25px -25px;
+}
+
+#cboxMiddleLeft {
+ width: 25px;
+ background: url(images/border2.png) repeat-y 0 0;
+}
+
+#cboxMiddleRight {
+ width: 25px;
+ background: url(images/border2.png) repeat-y -25px 0;
+}
+
+#cboxContent {
+ background: #fff;
+ overflow: hidden;
+}
+
+.cboxIframe {
+ background: #fff;
+}
+
+#cboxError {
+ padding: 50px;
+ border: 1px solid #ccc;
+}
+
+#cboxLoadedContent {
+ margin-bottom: 20px;
+}
+
+#cboxTitle {
+ position: absolute;
+ bottom: 0px;
+ left: 0;
+ text-align: center;
+ width: 100%;
+ color: #999;
+}
+
+#cboxCurrent {
+ position: absolute;
+ bottom: 0px;
+ left: 100px;
+ color: #999;
+}
+
+#cboxLoadingOverlay {
+ background: #fff url(images/loading.gif) no-repeat 5px 5px;
+}
+
+/* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
+#cboxPrevious,
+#cboxNext,
+#cboxSlideshow,
+#cboxClose {
+ border: 0;
+ padding: 0;
+ margin: 0;
+ overflow: visible;
+ width: auto;
+ background: none;
+}
+
+/* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
+#cboxPrevious:active,
+#cboxNext:active,
+#cboxSlideshow:active,
+#cboxClose:active {
+ outline: 0;
+}
+
+#cboxSlideshow {
+ position: absolute;
+ bottom: 0px;
+ right: 42px;
+ color: #444;
+}
+
+#cboxPrevious {
+ position: absolute;
+ bottom: 0px;
+ left: 0;
+ color: #444;
+}
+
+#cboxNext {
+ position: absolute;
+ bottom: 0px;
+ left: 63px;
+ color: #444;
+}
+
+#cboxClose {
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ display: block;
+ color: #444;
+}
+
+/*
+ The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill
+ when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to or needed in IE9.
+ See: http://jacklmoore.com/notes/ie-transparency-problems/
+*/
+.cboxIE #cboxTopLeft,
+.cboxIE #cboxTopCenter,
+.cboxIE #cboxTopRight,
+.cboxIE #cboxBottomLeft,
+.cboxIE #cboxBottomCenter,
+.cboxIE #cboxBottomRight,
+.cboxIE #cboxMiddleLeft,
+.cboxIE #cboxMiddleRight {
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF, endColorstr=#00FFFFFF);
+} \ No newline at end of file
diff --git a/wqflask/wqflask/static/new/css/marker_regression.css b/wqflask/wqflask/static/new/css/marker_regression.css
index e0a5ceea..9f56b63d 100644
--- a/wqflask/wqflask/static/new/css/marker_regression.css
+++ b/wqflask/wqflask/static/new/css/marker_regression.css
@@ -48,10 +48,10 @@ table.dataTable thead th{
}
table.dataTable thead .sorting_asc {
- background-image: url("../packages/DataTables/images/sort_asc_disabled.png");
+ background-image: url("/js/DataTables/images/sort_asc_disabled.png");
}
table.dataTable thead .sorting_desc {
- background-image: url("../packages/DataTables/images/sort_desc_disabled.png");
+ background-image: url("/js/DataTables/images/sort_desc_disabled.png");
}
table.dataTable thead th {
diff --git a/wqflask/wqflask/static/new/css/show_trait.css b/wqflask/wqflask/static/new/css/show_trait.css
index 39c6ba53..27404801 100644
--- a/wqflask/wqflask/static/new/css/show_trait.css
+++ b/wqflask/wqflask/static/new/css/show_trait.css
@@ -25,10 +25,10 @@ table.dataTable thead th, table.dataTable tfoot th{
}
table.dataTable thead .sorting_asc {
- background-image: url("../packages/DataTables/images/sort_asc_disabled.png");
+ background-image: url("/js/DataTables/images/sort_asc_disabled.png");
}
table.dataTable thead .sorting_desc {
- background-image: url("../packages/DataTables/images/sort_desc_disabled.png");
+ background-image: url("/js/DataTables/images/sort_desc_disabled.png");
}
table.dataTable thead th, table.dataTable tfoot {
diff --git a/wqflask/wqflask/static/new/javascript/auto_hide_column.js b/wqflask/wqflask/static/new/javascript/auto_hide_column.js
new file mode 100644
index 00000000..1a4dc039
--- /dev/null
+++ b/wqflask/wqflask/static/new/javascript/auto_hide_column.js
@@ -0,0 +1,21 @@
+ function filterDatatable(datatable){
+ let invalidColumns=[]
+ let columnCount=datatable.columns().header().length;
+ let numberOfRows=datatable.rows().count();
+ for (let col=0; col<columnCount; col++){
+ colObj = datatable.column(col).nodes().to$();
+ allNAs = true;
+ for (let i=0;i<numberOfRows;i++){
+ cellContent = colObj[i].childNodes[0].data
+ if (cellContent != "N/A" && cellContent != ""){
+ allNAs = false;
+ break;
+ }
+ }
+ if (allNAs){
+ invalidColumns.push(col)
+ }
+ }
+ return datatable.columns(invalidColumns).visible(false);
+
+ } \ No newline at end of file
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js
index 87c35984..5dc9e456 100644
--- a/wqflask/wqflask/static/new/javascript/show_trait.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait.js
@@ -731,14 +731,36 @@ filter_by_value = function() {
}
};
+hide_no_value_filter = function( settings, data, dataIndex ) {
+ this_value = table_api.column(3).nodes().to$()[dataIndex].childNodes[0].value;
+ if (this_value == "x"){
+ return false
+ } else {
+ return true
+ }
+}
+
hide_no_value = function() {
- return $('.value_se').each((function(_this) {
- return function(_index, element) {
- if ($(element).find('.trait-value-input').val() === 'x') {
- return $(element).hide();
+ tables = ['samples_primary', 'samples_other'];
+ filter_active = $(this).data("active");
+ for (_i = 0, _len = tables.length; _i < _len; _i++) {
+ table = tables[_i];
+ if ($('#' + table).length) {
+ table_api = $('#' + table).DataTable();
+ if (filter_active == "true"){
+ $(this).val("Hide No Value")
+ table_api.draw();
+ $(this).data("active", "false");
+ } else {
+ $(this).val("Show No Value")
+ $.fn.dataTable.ext.search.push(hide_no_value_filter);
+ table_api.search();
+ table_api.draw();
+ $.fn.dataTable.ext.search.splice($.fn.dataTable.ext.search.indexOf(hide_no_value_filter, 1));
+ $(this).data("active", "true");
}
- };
- })(this));
+ }
+ }
};
$('#hide_no_value').click(hide_no_value);
@@ -754,6 +776,7 @@ $('#block_outliers').click(block_outliers);
reset_samples_table = function() {
$('input[name="transform"]').val("");
$('span[name="transform_text"]').text("")
+ $('#hide_no_value').val("Hide No Value")
tables = ['samples_primary', 'samples_other'];
for (_i = 0, _len = tables.length; _i < _len; _i++) {
table = tables[_i];
@@ -771,6 +794,7 @@ reset_samples_table = function() {
this_node.value = this_node.attributes["data-value"].value;
}
}
+ table_api.draw();
}
}
};
diff --git a/wqflask/wqflask/templates/admin/create_group.html b/wqflask/wqflask/templates/admin/create_group.html
index 5a6929fb..21ef5653 100644
--- a/wqflask/wqflask/templates/admin/create_group.html
+++ b/wqflask/wqflask/templates/admin/create_group.html
@@ -80,9 +80,9 @@
{% endblock %}
{% block js %}
- <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.js') }}"></script>
<script language="javascript" type="text/javascript" src="/static/new/javascript/group_manager.js"></script>
- <script language="javascript" type="text/javascript" src="/static/packages/underscore/underscore-min.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/underscore.min.js') }}"></script>
<script type="text/javascript" charset="utf-8">
</script>
diff --git a/wqflask/wqflask/templates/admin/group_manager.html b/wqflask/wqflask/templates/admin/group_manager.html
index c8ed6851..c0b99e75 100644
--- a/wqflask/wqflask/templates/admin/group_manager.html
+++ b/wqflask/wqflask/templates/admin/group_manager.html
@@ -2,7 +2,7 @@
{% block title %}Group Manager{% endblock %}
{% block css %}
<link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTables/css/jquery.dataTables.css') }}" />
- <link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/extensions/buttons.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTablesExtensions/buttonStyles/css/buttons.dataTables.min.css') }}" />
<link rel="stylesheet" type="text/css" href="/static/new/css/show_trait.css" />
{% endblock %}
{% block content %}
diff --git a/wqflask/wqflask/templates/admin/ind_user_manager.html b/wqflask/wqflask/templates/admin/ind_user_manager.html
index e859b442..b821e5d5 100644
--- a/wqflask/wqflask/templates/admin/ind_user_manager.html
+++ b/wqflask/wqflask/templates/admin/ind_user_manager.html
@@ -103,7 +103,7 @@
{% block js %}
- <script type="text/javascript" src="/static/packages/smart-time-ago/lib/timeago.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/timeago.min.js') }}"></script>
<script>
$('body').timeago();
</script>
diff --git a/wqflask/wqflask/templates/admin/manage_user.html b/wqflask/wqflask/templates/admin/manage_user.html
index 7afe075f..3ef90b90 100644
--- a/wqflask/wqflask/templates/admin/manage_user.html
+++ b/wqflask/wqflask/templates/admin/manage_user.html
@@ -2,7 +2,7 @@
{% block title %}View and Edit Group{% endblock %}
{% block css %}
<link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTables/css/jquery.dataTables.css') }}" />
- <link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/extensions/buttons.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTablesExtensions/buttonStyles/css/buttons.dataTables.min.css') }}" />
<link rel="stylesheet" type="text/css" href="/static/new/css/show_trait.css" />
{% endblock %}
{% block content %}
diff --git a/wqflask/wqflask/templates/admin/search_for_groups.html b/wqflask/wqflask/templates/admin/search_for_groups.html
index f304a172..0e1ec720 100644
--- a/wqflask/wqflask/templates/admin/search_for_groups.html
+++ b/wqflask/wqflask/templates/admin/search_for_groups.html
@@ -63,7 +63,7 @@
{% endblock %}
{% block js %}
- <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.js') }}"></script>
<script language="javascript" type="text/javascript" src="/static/new/javascript/group_manager.js"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.min.js') }}"></script>
diff --git a/wqflask/wqflask/templates/admin/set_group_privileges.html b/wqflask/wqflask/templates/admin/set_group_privileges.html
index bc52788f..04842453 100644
--- a/wqflask/wqflask/templates/admin/set_group_privileges.html
+++ b/wqflask/wqflask/templates/admin/set_group_privileges.html
@@ -2,7 +2,7 @@
{% block title %}Set Group Privileges{% endblock %}
{% block css %}
<link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTables/css/jquery.dataTables.css') }}" />
- <link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/extensions/buttons.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTablesExtensions/buttonStyles/css/buttons.dataTables.min.css') }}" />
<link rel="stylesheet" type="text/css" href="/static/new/css/show_trait.css" />
{% endblock %}
{% block content %}
diff --git a/wqflask/wqflask/templates/admin/view_group.html b/wqflask/wqflask/templates/admin/view_group.html
index 9e3cce7b..26692fe8 100644
--- a/wqflask/wqflask/templates/admin/view_group.html
+++ b/wqflask/wqflask/templates/admin/view_group.html
@@ -2,7 +2,7 @@
{% block title %}View and Edit Group{% endblock %}
{% block css %}
<link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTables/css/jquery.dataTables.css') }}" />
- <link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/extensions/buttons.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTablesExtensions/buttonStyles/css/buttons.dataTables.min.css') }}" />
<link rel="stylesheet" type="text/css" href="/static/new/css/show_trait.css" />
{% endblock %}
{% block content %}
diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html
index bfa95805..a86b9ea9 100644
--- a/wqflask/wqflask/templates/base.html
+++ b/wqflask/wqflask/templates/base.html
@@ -239,8 +239,8 @@
<!--</div>-->
</div>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
- <script src="{{ url_for('js', filename='bootstrap/js/bootstrap.min.js') }}" type="text/javascript"></script>
+ <script src="{{ url_for('js', filename='jquery/jquery.min.js') }}" type="text/javascript"></script>
+ <script src="{{ url_for('js', filename='bootstrap/js/bootstrap.min.js') }}" type="text/javascript"></script>
<script>
//http://stackoverflow.com/questions/11521763/bootstrap-scrollspy-not-working
var $window = $(window)
@@ -251,14 +251,15 @@
}
})
</script>
- <script src="/static/new/js_external/jquery.cookie.js"></script>
+ <script src="{{ url_for('js', filename='jquery-cookie/jquery.cookie.js') }}" type="text/javascript"></script>
<script type="text/javascript" src="/static/new/js_external/json2.js"></script>
- <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js" type="text/javascript"></script>
+ <script src="{{ url_for('js', filename='jquery-ui/jquery-ui.min.js') }}" type="text/javascript"></script>
- <script language="javascript" type="text/javascript" src="/static/packages/colorbox/jquery.colorbox.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='colorbox/jquery.colorbox-min.js') }}"></script>
<!--<script type="text/javascript" src="/static/new/javascript/login.js"></script>-->
- <script type="text/javascript" src="/static/new/js_external/parsley.min.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/parsley.min.js') }}"></script>
+
{% block js %}
{% endblock %}
diff --git a/wqflask/wqflask/templates/collections/list.html b/wqflask/wqflask/templates/collections/list.html
index 9e0c0f07..2ff7b2fd 100644
--- a/wqflask/wqflask/templates/collections/list.html
+++ b/wqflask/wqflask/templates/collections/list.html
@@ -66,10 +66,10 @@
{% endblock %}
{% block js %}
- <script type="text/javascript" src="/static/packages/smart-time-ago/lib/timeago.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/timeago.min.js') }}"></script>
<script type="text/javascript" src="/static/new/javascript/search_results.js"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.min.js') }}"></script>
- <script language="javascript" type="text/javascript" src="/static/new/js_external/jszip.min.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='jszip/jszip.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/plugins/sorting/natural.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/buttons/js/dataTables.buttons.min.js') }}"></script>
<script>
diff --git a/wqflask/wqflask/templates/collections/not_logged_in.html b/wqflask/wqflask/templates/collections/not_logged_in.html
index a4c8747e..49b0e07d 100644
--- a/wqflask/wqflask/templates/collections/not_logged_in.html
+++ b/wqflask/wqflask/templates/collections/not_logged_in.html
@@ -5,7 +5,7 @@
{{ header("Not logged in") }}
- <div id "collections_holder" class="container">
+ <div id="collections_holder" class="container">
<div class="page-header">
<h1>Please log in in order to use this feature.</h1>
</div>
@@ -16,7 +16,7 @@
{% endblock %}
{% block js %}
- <script type="text/javascript" src="/static/packages/smart-time-ago/lib/timeago.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/timeago.min.js') }}"></script>
<script>
$('body').timeago();
</script>
diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html
index ccec495b..66945ed7 100644
--- a/wqflask/wqflask/templates/collections/view.html
+++ b/wqflask/wqflask/templates/collections/view.html
@@ -28,41 +28,7 @@
{{ this_trait.name }}:{{ this_trait.dataset.name }}:{{ data_hmac('{}:{}'.format(this_trait.name, this_trait.dataset.name)) }},
{% endfor %}" >
- <button id="corr_matrix" class="btn btn-primary submit_special" data-url="/corr_matrix" title="Correlation Matrix" >
- Correlations
- </button>
-
- <button id="network_graph" class="btn btn-primary submit_special" data-url="/network_graph" title="Network Graph" >
- Networks
- </button>
-
- <button id="send_to_webgestalt" class="btn btn-primary submit_special" data-url="/webgestalt_page" title="WebGestalt" >
- WebGestalt
- </button>
-
- <button id="send_to_geneweaver" class="btn btn-primary submit_special" data-url="/geneweaver_page" title="GeneWeaver" >
- GeneWeaver
- </button>
-
- <button id="send_to_bnw" class="btn btn-primary submit_special" data-url="/bnw_page" title="Bayesian Network" >
- BNW
- </button>
-
- <button id="wgcna_setup" class="btn btn-primary submit_special" data-url="/wgcna_setup" title="WGCNA Analysis" >
- WGCNA
- </button>
-
- <button id="ctl_setup" class="btn btn-primary submit_special" data-url="/ctl_setup" title="CTL Analysis" >
- CTL Maps
- </button>
-
- <button id="heatmap" class="btn btn-primary submit_special" data-url="/heatmap" title="Heatmap" >
- MultiMap
- </button>
-
- <button id="comp_bar_chart" class="btn btn-primary submit_special" data-url="/comparison_bar_chart" title="Comparison Bar Chart" >
- Comparison Bar Chart
- </button>
+ {% include 'tool_buttons.html' %}
</form>
</div>
@@ -162,7 +128,7 @@
{% endblock %}
{% block js %}
- <script language="javascript" type="text/javascript" src="/static/new/js_external/jszip.min.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='jszip/jszip.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/md5.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/plugins/sorting/natural.js') }}"></script>
diff --git a/wqflask/wqflask/templates/comparison_bar_chart.html b/wqflask/wqflask/templates/comparison_bar_chart.html
index f791457f..d77e0515 100644
--- a/wqflask/wqflask/templates/comparison_bar_chart.html
+++ b/wqflask/wqflask/templates/comparison_bar_chart.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block title %}Comparison Bar Chart{% endblock %}
{% block css %}
- <link rel="stylesheet" type="text/css" href="/static/new/css/d3-tip.min.css" />
+ <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='d3-tip/d3-tip.css') }}" />
<link rel="stylesheet" type="text/css" href="/static/new/css/panelutil.css" />
{% endblock %}
{% block content %} <!-- Start of body -->
@@ -31,8 +31,8 @@
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='d3js/d3.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='d3-tip/d3-tip.js') }}"></script>
<script language="javascript" type="text/javascript" src="/static/new/javascript/panelutil.js"></script>
- <script language="javascript" type="text/javascript" src="/static/packages/underscore/underscore-min.js"></script>
- <script type="text/javascript" src="/static/new/js_external/plotly-latest.min.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/underscore.min.js') }}"></script>
+ <script type="text/javascript" src="{{ url_for('js', filename='plotly/plotly.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="/static/new/javascript/comparison_bar_chart.js"></script>
{% endblock %} \ No newline at end of file
diff --git a/wqflask/wqflask/templates/corr_scatterplot.html b/wqflask/wqflask/templates/corr_scatterplot.html
index 1133fcd2..f44350ab 100644
--- a/wqflask/wqflask/templates/corr_scatterplot.html
+++ b/wqflask/wqflask/templates/corr_scatterplot.html
@@ -118,17 +118,17 @@
{% endif %}
<ul class="nav nav-tabs">
- <li class="active">
+ <li {% if method == 'pearson' %}class="active"{% endif %}>
<a href="#tp1" data-toggle="tab">Pearson</a>
</li>
- <li>
+ <li {% if method == 'spearman' %}class="active"{% endif %}>
<a href="#tp2" data-toggle="tab">Spearman Rank</a>
</li>
</ul>
<div class="tab-content" style="min-width: 800px;">
- <div class="tab-pane active" id="tp1">
+ <div class="tab-pane {% if method == 'pearson' %}active{% endif %}" id="tp1">
<br>
<div id="scatterplot2"></div>
<br>
@@ -243,7 +243,7 @@
</div>
</div>
- <div class="tab-pane" id="tp2">
+ <div class="tab-pane {% if method == 'spearman' %}active{% endif %}" id="tp2">
<br>
<div id="srscatterplot2"></div>
<br>
@@ -349,11 +349,11 @@
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='d3js/d3.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/underscore.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='d3-tip/d3-tip.js') }}"></script>
- <script language="javascript" type="text/javascript" src="/static/new/js_external/jscolor.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='jscolor/jscolor.js') }}"></script>
<script language="javascript" type="text/javascript" src="/static/new/javascript/panelutil.js"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/plugins/sorting/natural.js') }}"></script>
<!--<script language="javascript" type="text/javascript" src="/static/new/javascript/get_traits_from_collection.js"></script>-->
- <script type="text/javascript" src="/static/new/js_external/plotly-latest.min.js"></script>
+ <script type="text/javascript" src="{{ url_for('js', filename='plotly/plotly.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="/static/new/javascript/draw_corr_scatterplot.js"></script>
{% endblock %}
diff --git a/wqflask/wqflask/templates/correlation_matrix.html b/wqflask/wqflask/templates/correlation_matrix.html
index 4e150618..8275f1dd 100644
--- a/wqflask/wqflask/templates/correlation_matrix.html
+++ b/wqflask/wqflask/templates/correlation_matrix.html
@@ -1,10 +1,11 @@
{% extends "base.html" %}
+{% block title %}Correlation Matrix{% endblock %}
{% block css %}
<link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTables/css/jquery.dataTables.css') }}" />
<link rel="stylesheet" type="text/css" href="/static/new/css/corr_matrix.css" />
<link rel="stylesheet" type="text/css" href="/static/new/css/show_trait.css" />
<link rel="stylesheet" type="text/css" href="/static/new/css/panelutil.css" />
- <link rel="stylesheet" type="text/css" href="/static/new/css/d3-tip.min.css" />
+ <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='d3-tip/d3-tip.css') }}" />
{% endblock %}
{% block content %}
@@ -32,6 +33,7 @@
{% endfor %}
</tr>
{% for trait in traits %}
+ {% set outer_loop = loop.index %}
<tr>
<td align="center"><input type="checkbox" class="checkbox" style="margin-left: 3px; margin-right: 1px;"></td>
<td align="right" style="padding-right: 4px;" >
@@ -54,7 +56,7 @@
{% if result[1] == 0 %}
<td nowrap="ON" align="middle" bgcolor="#eeeeee" style="padding: 3px; line-height: 1.1;">N/A</td>
{% else %}
- <td nowrap="ON" align="middle" class="corr_cell" style="padding: 3px; line-height: 1.1;"><a href="/corr_scatter_plot?dataset_1={% if trait.dataset.name == 'Temp' %}Temp_{{ trait.dataset.group.name }}{% else %}{{ trait.dataset.name }}{% endif %}&dataset_2={% if result[0].dataset.name == 'Temp' %}Temp_{{ result[0].dataset.group.name }}{% else %}{{ result[0].dataset.name }}{% endif %}&trait_1={{ trait.name }}&trait_2={{ result[0].name }}"><font style="font-size: 12px; color: #3071a9; font-weight: bold;" ><span class="corr_value">{{ '%0.2f' % result[1] }}</span><br>{{ result[2] }}</font></a></td>
+ <td nowrap="ON" align="middle" class="corr_cell" style="padding: 3px; line-height: 1.1;"><a href="/corr_scatter_plot?method={% if loop.index > outer_loop %}spearman{% else %}pearson{% endif %}&dataset_1={% if trait.dataset.name == 'Temp' %}Temp_{{ trait.dataset.group.name }}{% else %}{{ trait.dataset.name }}{% endif %}&dataset_2={% if result[0].dataset.name == 'Temp' %}Temp_{{ result[0].dataset.group.name }}{% else %}{{ result[0].dataset.name }}{% endif %}&trait_1={{ trait.name }}&trait_2={{ result[0].name }}"><font style="font-size: 12px; color: #3071a9; font-weight: bold;" ><span class="corr_value">{{ '%0.2f' % result[1] }}</span><br>{{ result[2] }}</font></a></td>
{% endif %}
{% endif %}
{% endfor %}
@@ -63,6 +65,12 @@
</tbody>
</table>
<br>
+<form method="post" target="_blank" action="/export_corr_matrix" id="matrix_export_form">
+ <input type="hidden" name="export_filepath" value="{{ export_filepath }}">
+ <input type="hidden" name="export_filename" value="{{ export_filename }}">
+ <button class="btn btn-default" id="export">Download <span class="glyphicon glyphicon-download"></span></button>
+</form>
+<br>
{% if pca_works == "True" %}
<h2>PCA Traits</h2>
<div style="margin-bottom: 20px; overflow:hidden;">
@@ -133,7 +141,7 @@
<script type="text/javascript" src="{{ url_for('js', filename='d3js/d3.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('js', filename='d3-tip/d3-tip.js') }}"></script>
- <script language="javascript" type="text/javascript" src="/static/packages/underscore/underscore-min.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/underscore.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/md5.min.js') }}"></script>
<script type="text/javascript" src="/static/new/javascript/panelutil.js"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='chroma/chroma.min.js') }}"></script>
@@ -172,6 +180,14 @@
"paging": false,
"orderClasses": true
} );
+
+ export_corr_matrix = function() {
+ $('#matrix_export_form').attr('action', '/export_corr_matrix');
+ return $('#matrix_export_form').submit();
+ }
+
+ $('#export').click(export_corr_matrix);
+
</script>
{% endblock %}
diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html
index 06ee9056..8e2a23fd 100644
--- a/wqflask/wqflask/templates/correlation_page.html
+++ b/wqflask/wqflask/templates/correlation_page.html
@@ -32,43 +32,7 @@
{% for this_trait in trait_list %}
{{ this_trait.name }}:{{ this_trait.dataset }},
{% endfor %}" >
-
- <button id="corr_matrix" class="btn btn-primary submit_special" data-url="/corr_matrix" title="Correlation Matrix" >
- Correlations
- </button>
-
- <button id="network_graph" class="btn btn-primary submit_special" data-url="/network_graph" title="Network Graph" >
- Networks
- </button>
-
- <button id="send_to_webgestalt" class="btn btn-primary submit_special" data-url="/webgestalt_page" title="WebGestalt" >
- WebGestalt
- </button>
-
- <button id="send_to_geneweaver" class="btn btn-primary submit_special" data-url="/geneweaver_page" title="GeneWeaver" >
- GeneWeaver
- </button>
-
- <button id="send_to_bnw" class="btn btn-primary submit_special" data-url="/bnw_page" title="Bayesian Network" >
- BNW
- </button>
-
- <button id="wgcna_setup" class="btn btn-primary submit_special" data-url="/wgcna_setup" title="WGCNA Analysis" >
- WGCNA
- </button>
-
- <button id="ctl_setup" class="btn btn-primary submit_special" data-url="/ctl_setup" title="CTL Analysis" >
- CTL Maps
- </button>
-
- <button id="heatmap" class="btn btn-primary submit_special" data-url="/heatmap" title="Heatmap" >
- MultiMap
- </button>
-
- <button id="comp_bar_chart" class="btn btn-primary submit_special" data-url="/comparison_bar_chart" title="Comparison Bar Chart" >
- Comparison Bar Chart
- </button>
-
+ {% include 'tool_buttons.html' %}
</form>
</div>
<br />
@@ -120,14 +84,12 @@
<div class="show-hide-container" style="float: left; clear: left;">
<b>Show/Hide Columns:</b>
<br>
- <button class="toggle-vis" data-column="1">Index</button>
- <button class="toggle-vis" data-column="2">Record</button>
{% if target_dataset.type == 'ProbeSet' %}
<button class="toggle-vis" data-column="3">Symbol</button>
<button class="toggle-vis" data-column="4">Description</button>
<button class="toggle-vis" data-column="5">Location</button>
<button class="toggle-vis" data-column="6">Mean</button>
- <button class="toggle-vis" data-column="7">High P</button>
+ <button class="toggle-vis" data-column="7">Peak LOD</button>
<button class="toggle-vis" data-column="8">Peak Location</button>
<button class="toggle-vis" data-column="9">Effect Size</button>
{% elif target_dataset.type == 'Publish' %}
@@ -138,7 +100,7 @@
<button class="toggle-vis" data-column="7">Sample {% if corr_method == 'pearson' %}r{% else %}rho{% endif %}</button>
<button class="toggle-vis" data-column="8">N</button>
<button class="toggle-vis" data-column="9">Sample p({% if corr_method == 'pearson' %}r{% else %}rho{% endif %})</button>
- <button class="toggle-vis" data-column="10">High P</button>
+ <button class="toggle-vis" data-column="10">Peak LOD</button>
<button class="toggle-vis" data-column="11">Peak Location</button>
<button class="toggle-vis" data-column="12">Effect Size</button>
{% else %}
@@ -172,8 +134,9 @@
<script type="text/javascript" src="/static/new/javascript/search_results.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/js_external/jszip.min.js"></script>
- <script language="javascript" type="text/javascript" src="/static/packages/underscore/underscore-min.js"></script>
-
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/underscore.min.js') }}"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='jszip/jszip.min.js') }}"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/underscore.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/buttons/js/dataTables.buttons.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/buttons/js/buttons.html5.min.js') }}"></script>
@@ -345,8 +308,15 @@
'title': "Sample {% if corr_method == 'pearson' %}r{% else %}rho{% endif %}",
'type': "natural-minus-na",
'width': "40px",
- 'data': "sample_r",
- 'orderSequence': [ "desc", "asc"]
+ 'data': null,
+ 'orderSequence': [ "desc", "asc"],
+ 'render': function(data, type, row, meta) {
+ if (data.sample_r != "N/A") {
+ return "<a target\"_blank\" href=\"corr_scatter_plot?method={% if corr_method == 'spearman' %}spearman{% else %}pearson{% endif %}&dataset_1={% if dataset.name == 'Temp' %}Temp_{{ dataset.group.name }}{% else %}{{ dataset.name }}{% endif %}&dataset_2=" + data.dataset + "&trait_1={{ this_trait.name }}&trait_2=" + data.trait_id + "\">" + data.sample_r + "</a>"
+ } else {
+ return data.sample_r
+ }
+ }
},
{
'title': "N",
@@ -357,7 +327,7 @@
},
{
'title': "Sample p({% if corr_method == 'pearson' %}r{% else %}rho{% endif %})",
- 'type': "natural-minus-na",
+ 'type': "scientific",
'width': "65px",
'data': "sample_p",
'orderSequence': [ "desc", "asc"]
@@ -384,9 +354,9 @@
'orderSequence': [ "desc", "asc"]
},
{
- 'title': "High P<a href=\"http://gn1.genenetwork.org/glossary.html#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>",
+ 'title': "Peak <a href=\"{{ url_for('glossary_blueprint.glossary') }}#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>LOD",
'type': "natural-minus-na",
- 'data': "lrs_score",
+ 'data': "lod_score",
'width': "60px",
'orderSequence': [ "desc", "asc"]
},
@@ -459,8 +429,15 @@
'title': "Sample {% if corr_method == 'pearson' %}r{% else %}rho{% endif %}",
'type': "natural-minus-na",
'width': "40px",
- 'data': "sample_r",
- 'orderSequence': [ "desc", "asc"]
+ 'data': null,
+ 'orderSequence': [ "desc", "asc"],
+ 'render': function(data, type, row, meta) {
+ if (data.sample_r != "N/A") {
+ return "<a target\"_blank\" href=\"corr_scatter_plot?method={% if corr_method == 'spearman' %}spearman{% else %}pearson{% endif %}&dataset_1={% if dataset.name == 'Temp' %}Temp_{{ dataset.group.name }}{% else %}{{ dataset.name }}{% endif %}&dataset_2=" + data.dataset + "&trait_1={{ this_trait.name }}&trait_2=" + data.trait_id + "\">" + data.sample_r + "</a>"
+ } else {
+ return data.sample_r
+ }
+ }
},
{
'title': "N",
@@ -471,15 +448,15 @@
},
{
'title': "Sample p({% if corr_method == 'pearson' %}r{% else %}rho{% endif %})",
- 'type': "natural-minus-na",
+ 'type': "scientific",
'width': "65px",
'data': "sample_p",
'orderSequence': [ "desc", "asc"]
},
{
- 'title': "High P<a href=\"http://gn1.genenetwork.org/glossary.html#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>",
+ 'title': "Peak <a href=\"{{ url_for('glossary_blueprint.glossary') }}#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>LOD",
'type': "natural-minus-na",
- 'data': "lrs_score",
+ 'data': "lod_score",
'width': "60px",
'orderSequence': [ "desc", "asc"]
},
@@ -506,8 +483,15 @@
'title': "Sample {% if corr_method == 'pearson' %}r{% else %}rho{% endif %}",
'type': "natural-minus-na",
'width': "40px",
- 'data': "sample_r",
- 'orderSequence': [ "desc", "asc"]
+ 'data': null,
+ 'orderSequence': [ "desc", "asc"],
+ 'render': function(data, type, row, meta) {
+ if (data.sample_r != "N/A") {
+ return "<a target\"_blank\" href=\"corr_scatter_plot?method={% if corr_method == 'spearman' %}spearman{% else %}pearson{% endif %}&dataset_1={% if dataset.name == 'Temp' %}Temp_{{ dataset.group.name }}{% else %}{{ dataset.name }}{% endif %}&dataset_2=" + data.dataset + "&trait_1={{ this_trait.name }}&trait_2=" + data.trait_id + "\">" + data.sample_r + "</a>"
+ } else {
+ return data.sample_r
+ }
+ }
},
{
'title': "N",
@@ -518,7 +502,7 @@
},
{
'title': "Sample p({% if corr_method == 'pearson' %}r{% else %}rho{% endif %})",
- 'type': "natural-minus-na",
+ 'type': "scientific",
'width': "65px",
'data': "sample_p",
'orderSequence': [ "desc", "asc"]
diff --git a/wqflask/wqflask/templates/ctl_results.html b/wqflask/wqflask/templates/ctl_results.html
index e374eb4e..6f009183 100644
--- a/wqflask/wqflask/templates/ctl_results.html
+++ b/wqflask/wqflask/templates/ctl_results.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block css %}
<link rel="stylesheet" type="text/css" href="/static/new/css/network_graph.css" />
- <link rel="stylesheet" type="text/css" href="/js/cytoscape-panzoom/cytoscape.js-panzoom.css" />
+ <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='cytoscape-panzoom/cytoscape.js-panzoom.css') }}">
<link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='qtip2/jquery.qtip.min.css') }}">
<style>
/* The Cytoscape Web container must have its dimensions set. */
@@ -64,13 +64,13 @@
gn2_url = "{{ gn2_url | safe }}"
</script>
- <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='qtip2/jquery.qtip.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/underscore.min.js') }}"></script>
- <script language="javascript" type="text/javascript" src="/js/cytoscape/cytoscape.min.js"></script>
- <script language="javascript" type="text/javascript" src="/js/cytoscape-panzoom/cytoscape-panzoom.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='cytoscape/cytoscape.min.js') }}"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='cytoscape-panzoom/cytoscape-panzoom.js') }}"></script>
<!-- should be using cytoscape-popper for tips, see docs -->
- <script language="javascript" type="text/javascript" src="/js/cytoscape-qtip/cytoscape-qtip.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='cytoscape-qtip/cytoscape-qtip.js') }}"></script>
<!--
Loads flash - who wants that?
diff --git a/wqflask/wqflask/templates/docedit.html b/wqflask/wqflask/templates/docedit.html
index b87c5b41..50bb96c0 100644
--- a/wqflask/wqflask/templates/docedit.html
+++ b/wqflask/wqflask/templates/docedit.html
@@ -16,7 +16,7 @@
{{content|safe}}
</textarea>
<button class="submit_changes" style="margin-top: 20px;">Submit Changes</button>
- <script src="/static/packages/ckeditor/ckeditor.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='ckeditor/ckeditor.js') }}"></script>
<script type="text/javascript">
CKEDITOR.replace('ckcontent', {
height: '650px',
diff --git a/wqflask/wqflask/templates/gsearch_gene.html b/wqflask/wqflask/templates/gsearch_gene.html
index d5bc4141..6fd0abe8 100644
--- a/wqflask/wqflask/templates/gsearch_gene.html
+++ b/wqflask/wqflask/templates/gsearch_gene.html
@@ -48,7 +48,7 @@
{% block js %}
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/md5.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.min.js') }}"></script>
- <script language="javascript" type="text/javascript" src="/static/new/js_external/jszip.min.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='jszip/jszip.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/plugins/sorting/natural.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/colReorder/js/dataTables.colReorder.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/colResize/dataTables.colResize.js') }}"></script>
diff --git a/wqflask/wqflask/templates/gsearch_pheno.html b/wqflask/wqflask/templates/gsearch_pheno.html
index ccd4a9d9..0dc6fe5f 100644
--- a/wqflask/wqflask/templates/gsearch_pheno.html
+++ b/wqflask/wqflask/templates/gsearch_pheno.html
@@ -48,7 +48,7 @@
{% block js %}
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/md5.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.min.js') }}"></script>
- <script language="javascript" type="text/javascript" src="/static/new/js_external/jszip.min.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='jszip/jszip.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/plugins/sorting/natural.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/colReorder/js/dataTables.colReorder.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/colResize/dataTables.colResize.js') }}"></script>
diff --git a/wqflask/wqflask/templates/heatmap.html b/wqflask/wqflask/templates/heatmap.html
index 497838dd..92754266 100644
--- a/wqflask/wqflask/templates/heatmap.html
+++ b/wqflask/wqflask/templates/heatmap.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block title %}Heatmap{% endblock %}
{% block css %}
- <link rel="stylesheet" type="text/css" href="/static/new/css/d3-tip.min.css" />
+ <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='d3-tip/d3-tip.css') }}" />
<link rel="stylesheet" type="text/css" href="/static/new/css/panelutil.css" />
{% endblock %}
{% block content %} <!-- Start of body -->
@@ -39,6 +39,6 @@
<script language="javascript" type="text/javascript" src="/static/new/javascript/lod_chart.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/javascript/curvechart.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/javascript/iplotMScanone_noeff.js"></script>
- <script language="javascript" type="text/javascript" src="/static/packages/underscore/underscore-min.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/underscore.min.js') }}"></script>
{% endblock %} \ No newline at end of file
diff --git a/wqflask/wqflask/templates/index_page_orig.html b/wqflask/wqflask/templates/index_page_orig.html
index 13ca52df..7efbdccf 100755
--- a/wqflask/wqflask/templates/index_page_orig.html
+++ b/wqflask/wqflask/templates/index_page_orig.html
@@ -326,7 +326,7 @@
}
</script>
- <script type="text/javascript" src="/twitter/js/twitterFetcher_min.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='javascript-twitter-post-fetcher/js/twitterFetcher_min.js') }}"></script>
<script type="text/javascript">
var configProfile = {
diff --git a/wqflask/wqflask/templates/loading.html b/wqflask/wqflask/templates/loading.html
index 1716b095..926f258d 100644
--- a/wqflask/wqflask/templates/loading.html
+++ b/wqflask/wqflask/templates/loading.html
@@ -39,8 +39,8 @@
</div>
</div>
</form>
-<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
- <script src="{{ url_for('js', filename='bootstrap/js/bootstrap.min.js') }}" type="text/javascript"></script>
+<script src="{{ url_for('js', filename='jquery/jquery.min.js') }}" type="text/javascript"></script>
+<script src="{{ url_for('js', filename='bootstrap/js/bootstrap.min.js') }}" type="text/javascript"></script>
<script type="text/javascript">
$("#loading_form").attr("action", "{{ start_vars.form_url }}");
diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html
index 5533ecf3..1a601bef 100644
--- a/wqflask/wqflask/templates/mapping_results.html
+++ b/wqflask/wqflask/templates/mapping_results.html
@@ -4,7 +4,7 @@
<link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTables/css/jquery.dataTables.css') }}" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
- <link rel="stylesheet" type="text/css" href="/static/packages/purescript_genome_browser/css/purescript-genetics-browser.css" />
+ <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='purescript-genome-browser/css/purescript-genetics-browser.css') }}" />
<link rel="stylesheet" type="text/css" href="/static/new/css/marker_regression.css" />
@@ -350,7 +350,7 @@
<script type="text/javascript" src="{{ url_for('js', filename='js_alt/underscore.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('js', filename='underscore-string/underscore.string.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('js', filename='d3-tip/d3-tip.js') }}"></script>
- <script type="text/javascript" src="/static/new/js_external/plotly-latest.min.js"></script>
+ <script type="text/javascript" src="{{ url_for('js', filename='plotly/plotly.min.js') }}"></script>
{% if manhattan_plot == True and selectedChr == -1 %}
<script type="text/javascript" src="/static/new/js_external/jscolor.js"></script>
{% endif %}
@@ -359,7 +359,7 @@
<script language="javascript" type="text/javascript" src="https://cdn.datatables.net/buttons/1.0.0/js/dataTables.buttons.min.js"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/plugins/sorting/scientific.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/plugins/sorting/natural.js') }}"></script>
- <script language="javascript" type="text/javascript" src="/static/packages/purescript_genome_browser/js/purescript-genetics-browser.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='purescript-genome-browser/js/purescript-genetics-browser.js') }}"></script>
<script>
js_data = {{ js_data | safe }}
@@ -388,8 +388,11 @@
"targets": 0,
"orderable": false
} ],
+ "language": {
+ "info": "Showing1 from _START_ to _END_ of " + js_data.total_markers + " records",
+ },
"order": [[1, "asc" ]],
- "sDom": "RZtir",
+ "sDom": "iRZtir",
"iDisplayLength": -1,
"autoWidth": false,
"deferRender": true,
diff --git a/wqflask/wqflask/templates/network_graph.html b/wqflask/wqflask/templates/network_graph.html
index be3d0402..2941cb80 100644
--- a/wqflask/wqflask/templates/network_graph.html
+++ b/wqflask/wqflask/templates/network_graph.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block css %}
<link rel="stylesheet" type="text/css" href="/static/new/css/network_graph.css" />
- <link rel="stylesheet" type="text/css" href="/js/cytoscape-panzoom/cytoscape.js-panzoom.css" />
+ <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='cytoscape-panzoom/cytoscape.js-panzoom.css') }}">
<link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='qtip2/jquery.qtip.min.css') }}">
<style>
/* The Cytoscape Web container must have its dimensions set. */
@@ -139,15 +139,14 @@
elements_list = {{ elements | safe }}
gn2_url = "{{ gn2_url | safe }}"
</script>
-
- <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='qtip2/jquery.qtip.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/underscore.min.js') }}"></script>
- <script language="javascript" type="text/javascript" src="/js/cytoscape/cytoscape.min.js"></script>
- <script language="javascript" type="text/javascript" src="/js/cytoscape-panzoom/cytoscape-panzoom.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='cytoscape/cytoscape.min.js') }}"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='cytoscape-panzoom/cytoscape-panzoom.js') }}"></script>
<!-- should be using cytoscape-popper for tips, see docs -->
- <script language="javascript" type="text/javascript" src="/js/cytoscape-qtip/cytoscape-qtip.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='cytoscape-qtip/cytoscape-qtip.js') }}"></script>
<!--
Loads flash - who wants that?
diff --git a/wqflask/wqflask/templates/new_security/forgot_password_step2.html b/wqflask/wqflask/templates/new_security/forgot_password_step2.html
index 473fa377..5dc424e5 100644
--- a/wqflask/wqflask/templates/new_security/forgot_password_step2.html
+++ b/wqflask/wqflask/templates/new_security/forgot_password_step2.html
@@ -21,6 +21,6 @@
{% block js %}
{% include "new_security/_scripts.html" %}
- <script type="text/javascript" src="/static/new/js_external/zxcvbn/zxcvbn-async.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='zxcvbn-async/zxcvbn-async.min.js') }}"></script>
<script type="text/javascript" src="/static/new/javascript/password_strength.js"></script>
{% endblock %}
diff --git a/wqflask/wqflask/templates/new_security/password_reset.html b/wqflask/wqflask/templates/new_security/password_reset.html
index 7110dc79..4e3ea59f 100644
--- a/wqflask/wqflask/templates/new_security/password_reset.html
+++ b/wqflask/wqflask/templates/new_security/password_reset.html
@@ -74,6 +74,6 @@
{% block js %}
{% include "new_security/_scripts.html" %}
- <script type="text/javascript" src="/static/new/js_external/zxcvbn/zxcvbn-async.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='zxcvbn-async/zxcvbn-async.min.js') }}"></script>
<script type="text/javascript" src="/static/new/javascript/password_strength.js"></script>
{% endblock %}
diff --git a/wqflask/wqflask/templates/new_security/register_user.html b/wqflask/wqflask/templates/new_security/register_user.html
index 325d8aa5..2506f4ee 100644
--- a/wqflask/wqflask/templates/new_security/register_user.html
+++ b/wqflask/wqflask/templates/new_security/register_user.html
@@ -101,6 +101,6 @@
{% block js %}
{% include "new_security/_scripts.html" %}
- <script type="text/javascript" src="/static/new/js_external/zxcvbn/zxcvbn-async.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='zxcvbn-async/zxcvbn-async.min.js') }}"></script>
<script type="text/javascript" src="/static/new/javascript/password_strength.js"></script>
{% endblock %}
diff --git a/wqflask/wqflask/templates/new_security/registered.html b/wqflask/wqflask/templates/new_security/registered.html
index e71d5598..eaed3ed0 100644
--- a/wqflask/wqflask/templates/new_security/registered.html
+++ b/wqflask/wqflask/templates/new_security/registered.html
@@ -20,6 +20,6 @@
{% block js %}
{% include "new_security/_scripts.html" %}
- <script type="text/javascript" src="/static/new/js_external/zxcvbn/zxcvbn-async.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='zxcvbn-async/zxcvbn-async.min.js') }}"></script>
<script type="text/javascript" src="/static/new/javascript/password_strength.js"></script>
{% endblock %}
diff --git a/wqflask/wqflask/templates/new_security/thank_you.html b/wqflask/wqflask/templates/new_security/thank_you.html
index 459bd66a..f492fb51 100644
--- a/wqflask/wqflask/templates/new_security/thank_you.html
+++ b/wqflask/wqflask/templates/new_security/thank_you.html
@@ -19,6 +19,6 @@
{% block js %}
{% include "new_security/_scripts.html" %}
- <script type="text/javascript" src="/static/new/js_external/zxcvbn/zxcvbn-async.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='zxcvbn-async/zxcvbn-async.min.js') }}"></script>
<script type="text/javascript" src="/static/new/javascript/password_strength.js"></script>
{% endblock %}
diff --git a/wqflask/wqflask/templates/new_security/verification_still_needed.html b/wqflask/wqflask/templates/new_security/verification_still_needed.html
index 3aa24e37..91768eb9 100644
--- a/wqflask/wqflask/templates/new_security/verification_still_needed.html
+++ b/wqflask/wqflask/templates/new_security/verification_still_needed.html
@@ -22,6 +22,6 @@
{% block js %}
{% include "new_security/_scripts.html" %}
- <script type="text/javascript" src="/static/new/js_external/zxcvbn/zxcvbn-async.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='zxcvbn-async/zxcvbn-async.min.js') }}"></script>
<script type="text/javascript" src="/static/new/javascript/password_strength.js"></script>
{% endblock %}
diff --git a/wqflask/wqflask/templates/pair_scan_results.html b/wqflask/wqflask/templates/pair_scan_results.html
index acafe3a0..d6c7da4a 100644
--- a/wqflask/wqflask/templates/pair_scan_results.html
+++ b/wqflask/wqflask/templates/pair_scan_results.html
@@ -4,7 +4,7 @@
<link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTables/css/jquery.dataTables.css') }}" />
<link rel="stylesheet" type="text/css" href="/static/packages/TableTools/media/css/TableTools.css" />
- <link rel="stylesheet" type="text/css" href="/static/new/css/d3-tip.min.css" />
+ <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='d3-tip/d3-tip.css') }}" />
<link rel="stylesheet" type="text/css" href="/static/new/css/panelutil.css" />
{% endblock %}
@@ -64,11 +64,11 @@
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='d3js/d3.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='d3-tip/d3-tip.js') }}"></script>
- <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/plugins/sorting/scientific.js') }}"></script>
<script language="javascript" type="text/javascript" src="/static/packages/DT_bootstrap/DT_bootstrap.js"></script>
<script language="javascript" type="text/javascript" src="/static/packages/TableTools/media/js/TableTools.min.js"></script>
- <script language="javascript" type="text/javascript" src="/static/packages/underscore/underscore-min.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/underscore.min.js') }}"></script>
{% endblock %} \ No newline at end of file
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html
index 87c97c50..f2334512 100644
--- a/wqflask/wqflask/templates/search_result_page.html
+++ b/wqflask/wqflask/templates/search_result_page.html
@@ -75,42 +75,7 @@
{{ this_trait.name }}:{{ this_trait.dataset }},
{% endfor %}" >
-
- <button id="corr_matrix" class="btn btn-primary submit_special" data-url="/corr_matrix" title="Correlation Matrix" >
- Correlations
- </button>
-
- <button id="network_graph" class="btn btn-primary submit_special" data-url="/network_graph" title="Network Graph" >
- Networks
- </button>
-
- <button id="send_to_webgestalt" class="btn btn-primary submit_special" data-url="/webgestalt_page" title="WebGestalt" >
- WebGestalt
- </button>
-
- <button id="send_to_geneweaver" class="btn btn-primary submit_special" data-url="/geneweaver_page" title="GeneWeaver" >
- GeneWeaver
- </button>
-
- <button id="send_to_bnw" class="btn btn-primary submit_special" data-url="/bnw_page" title="Bayesian Network" >
- BNW
- </button>
-
- <button id="wgcna_setup" class="btn btn-primary submit_special" data-url="/wgcna_setup" title="WGCNA Analysis" >
- WGCNA
- </button>
-
- <button id="ctl_setup" class="btn btn-primary submit_special" data-url="/ctl_setup" title="CTL Analysis" >
- CTL Maps
- </button>
-
- <button id="heatmap" class="btn btn-primary submit_special" data-url="/heatmap" title="Heatmap" >
- MultiMap
- </button>
-
- <button id="comp_bar_chart" class="btn btn-primary submit_special" data-url="/comparison_bar_chart" title="Comparison Bar Chart" >
- Comparison Bar Chart
- </button>
+ {% include 'tool_buttons.html' %}
</form>
</div>
@@ -141,14 +106,12 @@
<div class="show-hide-container">
<b>Show/Hide Columns:</b>
<br>
- <button class="toggle-vis" data-column="1">Index</button>
- <button class="toggle-vis" data-column="2">Record</button>
{% if dataset.type == 'ProbeSet' %}
<button class="toggle-vis" data-column="3">Symbol</button>
<button class="toggle-vis" data-column="4">Description</button>
<button class="toggle-vis" data-column="5">Location</button>
<button class="toggle-vis" data-column="6">Mean</button>
- <button class="toggle-vis" data-column="7">High P</button>
+ <button class="toggle-vis" data-column="7">Peak LOD</button>
<button class="toggle-vis" data-column="8">Peak Location</button>
<button class="toggle-vis" data-column="9">Effect Size</button>
{% elif dataset.type == 'Publish' %}
@@ -156,7 +119,7 @@
<button class="toggle-vis" data-column="4">Mean</button>
<button class="toggle-vis" data-column="5">Authors</button>
<button class="toggle-vis" data-column="6">Year</button>
- <button class="toggle-vis" data-column="7">High P</button>
+ <button class="toggle-vis" data-column="7">Peak LOD</button>
<button class="toggle-vis" data-column="8">Peak Location</button>
<button class="toggle-vis" data-column="9">Effect Size</button>
{% endif %}
@@ -183,7 +146,7 @@
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/md5.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.min.js') }}"></script>
- <script language="javascript" type="text/javascript" src="/static/new/js_external/jszip.min.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='jszip/jszip.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/plugins/sorting/natural.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/buttons/js/dataTables.buttons.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/buttons/js/buttons.colVis.min.js') }}"></script>
@@ -314,10 +277,10 @@
'orderSequence': [ "desc", "asc"]
},
{
- 'title': "High P<a href=\"{{ url_for('glossary_blueprint.glossary') }}#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>",
+ 'title': "Peak <a href=\"{{ url_for('glossary_blueprint.glossary') }}#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>LOD",
'type': "natural-minus-na",
- 'data': "lrs_score",
- 'width': "65px",
+ 'data': "lod_score",
+ 'width': "60px",
'orderSequence': [ "desc", "asc"]
},
{
@@ -383,10 +346,10 @@
'orderSequence': [ "desc", "asc"]
},
{
- 'title': "High P<a href=\"{{ url_for('glossary_blueprint.glossary') }}#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>",
+ 'title': "Peak <a href=\"{{ url_for('glossary_blueprint.glossary') }}#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>LOD",
'type': "natural-minus-na",
- 'data': "lrs_score",
- 'width': "80px",
+ 'data': "lod_score",
+ 'width': "60px",
'orderSequence': [ "desc", "asc"]
},
{
diff --git a/wqflask/wqflask/templates/set_group_privileges.html b/wqflask/wqflask/templates/set_group_privileges.html
index 98b0cc12..a0a53292 100644
--- a/wqflask/wqflask/templates/set_group_privileges.html
+++ b/wqflask/wqflask/templates/set_group_privileges.html
@@ -2,7 +2,7 @@
{% block title %}Set Group Privileges{% endblock %}
{% block css %}
<link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTables/css/jquery.dataTables.css') }}" />
- <link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/extensions/buttons.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTablesExtensions/buttonStyles/css/buttons.dataTables.min.css') }}" />
<link rel="stylesheet" type="text/css" href="/static/new/css/show_trait.css" />
{% endblock %}
{% block content %}
diff --git a/wqflask/wqflask/templates/show_trait.html b/wqflask/wqflask/templates/show_trait.html
index 7b74a3f6..c881eb76 100644
--- a/wqflask/wqflask/templates/show_trait.html
+++ b/wqflask/wqflask/templates/show_trait.html
@@ -5,10 +5,9 @@
<link rel="stylesheet" type="text/css" href="/static/new/css/box_plot.css" />
<link rel="stylesheet" type="text/css" href="/static/new/css/prob_plot.css" />
<link rel="stylesheet" type="text/css" href="/static/new/css/scatter-matrix.css" />
- <link rel="stylesheet" type="text/css" href="/static/new/css/d3-tip.min.css" />
+ <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='d3-tip/d3-tip.css') }}" />
<link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTables/css/jquery.dataTables.css') }}" />
- <link rel="stylesheet" type="text/css" href="/static/new/packages/noUiSlider/nouislider.css" />
- <link rel="stylesheet" type="text/css" href="/static/new/packages/noUiSlider/nouislider.pips.css" />
+ <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='nouislider/nouislider.min.css') }}" />
<link rel="stylesheet" type="text/css" href="/static/new/css/show_trait.css" />
{% endblock %}
@@ -131,11 +130,11 @@
<script type="text/javascript" src="https://d3js.org/d3.v3.min.js"></script>
<script type="text/javascript" src="/static/new/js_external/underscore-min.js"></script>
- <script type="text/javascript" src="/static/new/js_external/underscore.string.min.js"></script>
+ <script type="text/javascript" src="{{ url_for('js', filename='underscore-string/underscore.string.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('js', filename='d3-tip/d3-tip.js') }}"></script>
- <script type="text/javascript" src="/static/new/js_external/jstat.min.js"></script>
- <script type="text/javascript" src="/static/new/js_external/shapiro-wilk.js"></script>
- <script type="text/javascript" src="/static/new/js_external/plotly-latest.min.js"></script>
+ <script type="text/javascript" src="{{ url_for('js', filename='js_alt/jstat.min.js') }}"></script>
+ <script type="text/javascript" src="{{ url_for('js', filename='shapiro-wilk/shapiro-wilk.js') }}"></script>
+ <script type="text/javascript" src="{{ url_for('js', filename='plotly/plotly.min.js') }}"></script>
<script type="text/javascript" src="/static/new/javascript/colorbrewer.js"></script>
<script type="text/javascript" src="/static/new/javascript/stats.js"></script>
@@ -147,9 +146,8 @@
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/plugins/sorting/scientific.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/plugins/sorting/natural.js') }}"></script>
- <script type="text/javascript" src="https://cdn.datatables.net/scroller/2.0.2/js/dataTables.scroller.min.js"></script>
- <script language="javascript" type="text/javascript" src="/static/new/packages/noUiSlider/nouislider.js"></script>
-
+ <script language="javascript" type="text/javascript" src="https://cdn.datatables.net/scroller/2.0.3/js/dataTables.scroller.min.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='nouislider/nouislider.js') }}"></script>
<script type="text/javascript" src="/static/new/javascript/initialize_show_trait_tables.js"></script>
<script type="text/javascript" src="/static/new/javascript/show_trait_mapping_tools.js"></script>
<script type="text/javascript" src="/static/new/javascript/show_trait.js"></script>
@@ -221,6 +219,33 @@
primary_table.search($(this).val()).draw();
} );
+ $('.toggle-vis').on('click', function (e) {
+ e.preventDefault();
+
+ function toggle_column(column) {
+ //ZS: Toggle column visibility
+ column.visible( ! column.visible() );
+ if (column.visible()){
+ $(this).removeClass("active");
+ } else {
+ $(this).addClass("active");
+ }
+ }
+
+ // Get the column API object
+ var target_cols = $(this).attr('data-column').split(",")
+ for (let i = 0; i < target_cols.length; i++){
+ console.log("THE COL:", target_cols[i])
+ var column = primary_table.column( target_cols[i] );
+ toggle_column(column);
+
+ {% if sample_groups|length != 1 %}
+ var column2 = other_table.column( target_cols[i] );
+ toggle_column(column2);
+ {% endif %}
+ }
+ } );
+
{% if sample_groups|length != 1 %}
$('#other_searchbox').on( 'keyup', function () {
other_table.search($(this).val()).draw();
diff --git a/wqflask/wqflask/templates/show_trait_calculate_correlations.html b/wqflask/wqflask/templates/show_trait_calculate_correlations.html
index 4f25e90a..ba72ff27 100644
--- a/wqflask/wqflask/templates/show_trait_calculate_correlations.html
+++ b/wqflask/wqflask/templates/show_trait_calculate_correlations.html
@@ -38,7 +38,7 @@
</div>
<div class="form-group">
- <label for="corr_return_results" class="col-xs-2 control-label">Return</label>
+ <label for="corr_return_results" class="col-xs-2 control-label">Limit to</label>
<div class="col-xs-4 controls">
<select name="corr_return_results" class="form-control">
{% for return_result in corr_tools.return_results_menu %}
diff --git a/wqflask/wqflask/templates/show_trait_edit_data.html b/wqflask/wqflask/templates/show_trait_edit_data.html
index 2e730248..4ad11a5e 100644
--- a/wqflask/wqflask/templates/show_trait_edit_data.html
+++ b/wqflask/wqflask/templates/show_trait_edit_data.html
@@ -1,6 +1,36 @@
<div>
{% for sample_type in sample_groups %}
<div class="sample-table-container">
+ {% if loop.index == 1 %}
+ <b>Show/Hide Columns:</b>
+ <br>
+ <button class="toggle-vis" data-column="1">ID</button>
+ <button class="toggle-vis" data-column="2">Sample</button>
+ <button class="toggle-vis" data-column="3">Value</button>
+ {% if sample_groups[0].se_exists %}
+ <button class="toggle-vis" data-column="4,5">SE</button>
+ {% if has_num_cases %}
+ <button class="toggle-vis" data-column="6">N</button>
+ {% set attr_start_pos = 7 %}
+ {% else %}
+ {% set attr_start_pos = 6 %}
+ {% endif %}
+ {% else %}
+ {% if has_num_cases %}
+ <button class="toggle-vis" data-column="4">N</button>
+ {% set attr_start_pos = 5 %}
+ {% else %}
+ {% set attr_start_pos = 4 %}
+ {% endif %}
+ {% endif %}
+ {% if sample_groups[0].attributes %}
+ {% for attribute in sample_groups[0].attributes %}
+ <button class="toggle-vis" data-column="{{ loop.index + attr_start_pos - 1 }}">{{ sample_groups[0].attributes[attribute].name }}</button>
+ {% endfor %}
+ {% endif %}
+ <br>
+ <br>
+ {% endif %}
<div class="sample-table-search-container">
<input type="text" id="{{ sample_type.sample_group_type }}_searchbox" class="form-control sample-table-search" placeholder="Search This Table For ...">
</div>
diff --git a/wqflask/wqflask/templates/show_trait_transform_and_filter.html b/wqflask/wqflask/templates/show_trait_transform_and_filter.html
index d7eac378..b70ca590 100644
--- a/wqflask/wqflask/templates/show_trait_transform_and_filter.html
+++ b/wqflask/wqflask/templates/show_trait_transform_and_filter.html
@@ -80,7 +80,7 @@
<input type="button" id="filter_by_value" class="btn btn-danger" value="Filter">
</div>
<div>
- <input type="button" id="hide_no_value" class="btn btn-default" value="Hide No Value">
+ <input data-active="false" type="button" id="hide_no_value" class="btn btn-default" value="Hide No Value">
<input type="button" id="block_outliers" class="btn btn-default" value="Block Outliers">
<input type="button" class="btn btn-success reset" value="Reset">
<span class="input-append">
diff --git a/wqflask/wqflask/templates/snp_browser.html b/wqflask/wqflask/templates/snp_browser.html
index fb564b28..a96b8e3b 100644
--- a/wqflask/wqflask/templates/snp_browser.html
+++ b/wqflask/wqflask/templates/snp_browser.html
@@ -217,7 +217,7 @@
{% block js %}
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/plugins/sorting/natural.js') }}"></script>
- <script language="javascript" type="text/javascript" src="/static/new/js_external/typeahead.bundle.js"></script>
+ <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='typeahead/typeahead.bundle.js') }}"></script>
<script language="javascript" type="text/javascript" src="/static/new/javascript/typeahead_rn6.json"></script>
diff --git a/wqflask/wqflask/templates/tool_buttons.html b/wqflask/wqflask/templates/tool_buttons.html
new file mode 100644
index 00000000..5b2dbf3d
--- /dev/null
+++ b/wqflask/wqflask/templates/tool_buttons.html
@@ -0,0 +1,35 @@
+<button id="corr_matrix" class="btn btn-primary submit_special" data-url="/corr_matrix" title="Correlation Matrix" >
+ Correlations
+</button>
+
+<button id="network_graph" class="btn btn-primary submit_special" data-url="/network_graph" title="Network Graph" >
+ Networks
+</button>
+
+<button id="send_to_webgestalt" class="btn btn-primary submit_special" data-url="/webgestalt_page" title="WebGestalt" >
+ WebGestalt
+</button>
+
+<button id="send_to_geneweaver" class="btn btn-primary submit_special" data-url="/geneweaver_page" title="GeneWeaver" >
+ GeneWeaver
+</button>
+
+<button id="send_to_bnw" class="btn btn-primary submit_special" data-url="/bnw_page" title="Bayesian network software for causal modeling and reasoning, with an intuitive interface to incorporate biological knowledge and a complete pipeline from data to model to prediction" >
+ BNW
+</button>
+
+<button id="wgcna_setup" class="btn btn-primary submit_special" data-url="/wgcna_setup" title="WGCNA Analysis" >
+ WGCNA
+</button>
+
+<button id="ctl_setup" class="btn btn-primary submit_special" data-url="/ctl_setup" title="CTL Analysis" >
+ CTL Maps
+</button>
+
+<button id="heatmap" class="btn btn-primary submit_special" data-url="/heatmap" title="Heatmap" >
+ MultiMap
+</button>
+
+<button id="comp_bar_chart" class="btn btn-primary submit_special" data-url="/comparison_bar_chart" title="Comparison Bar Chart" >
+ Comparison Bar Chart
+</button> \ No newline at end of file
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 3557a62a..25563e86 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -799,6 +799,17 @@ def export_mapping_results():
return response
+@app.route("/export_corr_matrix", methods = ('POST',))
+def export_corr_matrix():
+ file_path = request.form.get("export_filepath")
+ file_name = request.form.get("export_filename")
+ results_csv = open(file_path, "r").read()
+ response = Response(results_csv,
+ mimetype='text/csv',
+ headers={"Content-Disposition":"attachment;filename=" + file_name + ".csv"})
+
+ return response
+
@app.route("/export", methods = ('POST',))
def export():
logger.info("request.form:", request.form)