From 0b25ab1565faf3824d591c545dfe71dbd28c38ee Mon Sep 17 00:00:00 2001 From: Lei Yan Date: Tue, 4 Apr 2017 18:23:57 +0000 Subject: Change scatterplot title font size --- wqflask/wqflask/static/new/javascript/scatterplot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wqflask/wqflask/static/new/javascript/scatterplot.js b/wqflask/wqflask/static/new/javascript/scatterplot.js index de7b7906..d7f2a4a5 100644 --- a/wqflask/wqflask/static/new/javascript/scatterplot.js +++ b/wqflask/wqflask/static/new/javascript/scatterplot.js @@ -166,7 +166,7 @@ scatterplot = function() { maxx = xlim[1]; yticks = yticks != null ? yticks : ys.ticks(nyticks); xticks = xticks != null ? xticks : xs.ticks(nxticks); - titlegrp = g.append("g").attr("class", "title").append("text").attr("x", margin.left + width / 2).attr("y", margin.top - titlepos).style("fill", "black").style("font-size", "28px").text(title); + titlegrp = g.append("g").attr("class", "title").append("text").attr("x", margin.left + width / 2).attr("y", margin.top - titlepos).style("fill", "black").style("font-size", "24px").text(title); xaxis = g.append("g").attr("class", "x axis"); xaxis.selectAll("empty").data(xticks).enter().append("line").attr("x1", function(d) { return xscale(d); -- cgit v1.2.3 From ee12e6b6fd1365c3d8dc1dc8f65a494ca6c6312a Mon Sep 17 00:00:00 2001 From: Lei Yan Date: Thu, 4 May 2017 15:57:42 +0000 Subject: renamed: gn2_lei.conf -> gn2-lei.conf --- wqflask/other_config/nginx_conf/gn2-lei.conf | 41 ++++++++++++++++++++++++++++ wqflask/other_config/nginx_conf/gn2_lei.conf | 41 ---------------------------- 2 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 wqflask/other_config/nginx_conf/gn2-lei.conf delete mode 100644 wqflask/other_config/nginx_conf/gn2_lei.conf diff --git a/wqflask/other_config/nginx_conf/gn2-lei.conf b/wqflask/other_config/nginx_conf/gn2-lei.conf new file mode 100644 index 00000000..893ad435 --- /dev/null +++ b/wqflask/other_config/nginx_conf/gn2-lei.conf @@ -0,0 +1,41 @@ +server { + # Modeled after http://flask.pocoo.org/docs/deploying/wsgi-standalone/ + listen 80; + + server_name gn2-lei.genenetwork.org; + + access_log /var/log/nginx/lei_access.log; + error_log /var/log/nginx/lei_error.log; + + location ^~ /css/ { + root /gene/wqflask/wqflask/static/; + } + + location ^~ /javascript/ { + root /gene/wqflask/wqflask/static/; + } + +# location ^~ /image/ { +# root /gene/wqflask/wqflask/static/; +# } + + location ^~ /images/ { + root /gene/wqflask/wqflask/static/; + } + + ### New - added by Sam + #location ^~ /static/ { + # root /gene/wqflask/wqflask/static/; + #} + + location / { + proxy_pass http://127.0.0.1:5001/; + proxy_redirect off; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + proxy_read_timeout 40m; + } +} diff --git a/wqflask/other_config/nginx_conf/gn2_lei.conf b/wqflask/other_config/nginx_conf/gn2_lei.conf deleted file mode 100644 index 6589d298..00000000 --- a/wqflask/other_config/nginx_conf/gn2_lei.conf +++ /dev/null @@ -1,41 +0,0 @@ -server { - # Modeled after http://flask.pocoo.org/docs/deploying/wsgi-standalone/ - listen 80; - - server_name gn2_lei.genenetwork.org; - - access_log /var/log/nginx/lei_access.log; - error_log /var/log/nginx/lei_error.log; - - location ^~ /css/ { - root /gene/wqflask/wqflask/static/; - } - - location ^~ /javascript/ { - root /gene/wqflask/wqflask/static/; - } - -# location ^~ /image/ { -# root /gene/wqflask/wqflask/static/; -# } - - location ^~ /images/ { - root /gene/wqflask/wqflask/static/; - } - - ### New - added by Sam - #location ^~ /static/ { - # root /gene/wqflask/wqflask/static/; - #} - - location / { - proxy_pass http://127.0.0.1:5001/; - proxy_redirect off; - - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - proxy_read_timeout 40m; - } -} -- cgit v1.2.3 From 6b64fd15c96da58a5a8119ac6d0d50efb6fc1ef7 Mon Sep 17 00:00:00 2001 From: Lei Yan Date: Mon, 8 May 2017 04:08:56 +0000 Subject: corr_scatter_plot update (use nvd3) --- wqflask/wqflask/correlation/corr_scatter_plot.py | 1 + .../wqflask/static/new/css/corr_scatter_plot2.css | 19 ++++++ .../new/javascript/draw_corr_scatterplot-2.js | 74 ++++++++++++++++++++++ wqflask/wqflask/templates/corr_scatterplot.html | 57 ++++++++++++++--- 4 files changed, 143 insertions(+), 8 deletions(-) create mode 100644 wqflask/wqflask/static/new/css/corr_scatter_plot2.css create mode 100644 wqflask/wqflask/static/new/javascript/draw_corr_scatterplot-2.js diff --git a/wqflask/wqflask/correlation/corr_scatter_plot.py b/wqflask/wqflask/correlation/corr_scatter_plot.py index 96afef1e..6a92c501 100644 --- a/wqflask/wqflask/correlation/corr_scatter_plot.py +++ b/wqflask/wqflask/correlation/corr_scatter_plot.py @@ -89,3 +89,4 @@ class CorrScatterPlot(object): line_color = line_color, line_width = line_width ) + self.jsdata = self.js_data diff --git a/wqflask/wqflask/static/new/css/corr_scatter_plot2.css b/wqflask/wqflask/static/new/css/corr_scatter_plot2.css new file mode 100644 index 00000000..92e777c2 --- /dev/null +++ b/wqflask/wqflask/static/new/css/corr_scatter_plot2.css @@ -0,0 +1,19 @@ +.nvd3 .nv-axis.nv-x text { + font-size: 16px; + font-weight: normal; + fill: black; +} + +.nvd3 .nv-axis.nv-y text { + font-size: 16px; + font-weight: normal; + fill: black; +} + +.nv-y .tick.zero line { + stroke: black; +} + +.nv-y .nv-axis g path.domain { + stroke: black; +} diff --git a/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot-2.js b/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot-2.js new file mode 100644 index 00000000..7a5a86bd --- /dev/null +++ b/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot-2.js @@ -0,0 +1,74 @@ +var chart; + +nv.addGraph(function() { + // + chart = nv.models.scatterChart(); + // + chart.showLegend(false); + chart.duration(300); + chart.color(d3.scale.category10().range()); + chart.pointRange([200,0]); + // + // chart.showDistX(true); + // chart.showDistY(true); + chart.xAxis.tickFormat(d3.format('.02f')); + chart.yAxis.tickFormat(d3.format('.02f')); + // chart.showXAxis(false); + // chart.showYAxis(false); + chart.xAxis.axisLabel(js_data.trait_1); + chart.yAxis.axisLabel(js_data.trait_2); + // + xmin = d3.min(js_data.data[0]); + xmax = d3.max(js_data.data[0]); + xrange = xmax - xmin; + ymin = d3.min(js_data.data[1]); + ymax = d3.max(js_data.data[1]); + yrange = ymax - ymin; + chart.xDomain([xmin - xrange/10, xmax + xrange/10]); + chart.yDomain([ymin - yrange/10, ymax + yrange/10]); + // + d3.select('#scatterplot2 svg').datum(nv.log(getdata())).call(chart); + nv.utils.windowResize(chart.update); + return chart; +}); + +function getdata () { + var data = []; + data.push({ + values: [], + slope: js_data.slope, + intercept: js_data.intercept + }); + for (j = 0; j < js_data.data[0].length; j++) { + data[0].values.push({ + x: js_data.data[0][j], + y: js_data.data[1][j], + size: 10, + shape: 'circle' + }); + } + return data; +} + +function randomData(groups, points) { + var data = [], + shapes = ['circle'], + random = d3.random.normal(); + for (i = 0; i < groups; i++) { + data.push({ + key: 'Group ' + i, + values: [], + slope: Math.random() - .01, + intercept: Math.random() - .5 + }); + for (j = 0; j < points; j++) { + data[i].values.push({ + x: random(), + y: random(), + size: Math.random(), + shape: shapes[j % shapes.length] + }); + } + } + return data; +} diff --git a/wqflask/wqflask/templates/corr_scatterplot.html b/wqflask/wqflask/templates/corr_scatterplot.html index 810f4ca3..4464025e 100644 --- a/wqflask/wqflask/templates/corr_scatterplot.html +++ b/wqflask/wqflask/templates/corr_scatterplot.html @@ -7,6 +7,8 @@ + + {% endblock %} {% block content %} @@ -47,10 +49,48 @@ --> -
-
+
-
+

Correlation Scatterplot

+ + + + + + + + + +
num overlap {{jsdata.num_overlap}}
slope {{jsdata.slope}}
intercept {{jsdata.intercept}}
r value {{jsdata.r_value}}
p value {{jsdata.p_value}}
+ + + +
+ +
+ +
+ +
{% if trait_1.dataset.type == "ProbeSet" %}
@@ -103,17 +143,18 @@ {% endif %}
+ {% endblock %} {% block js %} - + + - - -{% endblock %} \ No newline at end of file + +{% endblock %} -- cgit v1.2.3 From e6afa39ac0bf769bed181ad9e16fc4fc8e16bb22 Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 22 May 2017 15:48:25 +0000 Subject: Added print lines showing url to views.py and updated dataset menu json file --- .../new/javascript/dataset_menu_structure.json | 284 +++++++++++++++++---- wqflask/wqflask/views.py | 34 ++- 2 files changed, 264 insertions(+), 54 deletions(-) diff --git a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json index 861af3d6..f3712b5d 100644 --- a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json +++ b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json @@ -1339,15 +1339,15 @@ "HLC_0311", "GSE9588 Human Liver Normal (Mar11) Both Sexes" ], - [ - "384", - "HLCF_0311", - "GSE9588 Human Liver Normal (Mar11) Females" - ], [ "383", "HLCM_0311", "GSE9588 Human Liver Normal (Mar11) Males" + ], + [ + "384", + "HLCF_0311", + "GSE9588 Human Liver Normal (Mar11) Females" ] ], "Phenotypes": [ @@ -1493,6 +1493,15 @@ ] ] }, + "Islets-Gerling": { + "Phenotypes": [ + [ + "None", + "Islets-GerlingPublish", + "Islets-Gerling Published Phenotypes" + ] + ] + }, "TIGEM-Retina-RNA-Seq": { "Phenotypes": [ [ @@ -1560,6 +1569,11 @@ ] ], "Heart mRNA": [ + [ + "820", + "UCLA_AXB_BXA_Aor_Jan16", + "UCLA AXB/BXA Aorta Affy M430 2.0 (Jan16) RMA" + ], [ "421", "IRCM_AXBXA_HRI0213", @@ -1567,6 +1581,11 @@ ] ], "Liver mRNA": [ + [ + "822", + "UCLA_AXB_BXA_Liv_Jan16", + "UCLA AXB/BXA Liver Affy M430 2.0 (Jan16) RMA" + ], [ "352", "GSE16780AB_UCLA_ML0911", @@ -1726,11 +1745,6 @@ ] ], "Striatum mRNA": [ - [ - "85", - "SA_M2_0905_P", - "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) PDNN" - ], [ "84", "SA_M2_0905_R", @@ -1740,21 +1754,26 @@ "83", "SA_M2_0905_M", "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) MAS5" + ], + [ + "85", + "SA_M2_0905_P", + "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) PDNN" ] ] }, "BHF2": { "Adipose mRNA": [ - [ - "197", - "UCLA_BHF2_ADIPOSE_FEMALE", - "UCLA BHF2 Adipose Female mlratio" - ], [ "196", "UCLA_BHF2_ADIPOSE_MALE", "UCLA BHF2 Adipose Male mlratio" ], + [ + "197", + "UCLA_BHF2_ADIPOSE_FEMALE", + "UCLA BHF2 Adipose Female mlratio" + ], [ "165", "UCLA_BHF2_ADIPOSE_0605", @@ -1762,16 +1781,16 @@ ] ], "Brain mRNA": [ - [ - "199", - "UCLA_BHF2_BRAIN_FEMALE", - "UCLA BHF2 Brain Female mlratio" - ], [ "198", "UCLA_BHF2_BRAIN_MALE", "UCLA BHF2 Brain Male mlratio" ], + [ + "199", + "UCLA_BHF2_BRAIN_FEMALE", + "UCLA BHF2 Brain Female mlratio" + ], [ "166", "UCLA_BHF2_BRAIN_0605", @@ -1786,16 +1805,16 @@ ] ], "Liver mRNA": [ - [ - "201", - "UCLA_BHF2_LIVER_FEMALE", - "UCLA BHF2 Liver Female mlratio" - ], [ "200", "UCLA_BHF2_LIVER_MALE", "UCLA BHF2 Liver Male mlratio" ], + [ + "201", + "UCLA_BHF2_LIVER_FEMALE", + "UCLA BHF2 Liver Female mlratio" + ], [ "167", "UCLA_BHF2_LIVER_0605", @@ -1999,11 +2018,6 @@ "BR_U_1105_P", "UTHSC Brain mRNA U74Av2 (Nov05) PDNN" ], - [ - "81", - "BR_U_0805_P", - "UTHSC Brain mRNA U74Av2 (Aug05) PDNN" - ], [ "80", "BR_U_0805_M", @@ -2014,6 +2028,11 @@ "BR_U_0805_R", "UTHSC Brain mRNA U74Av2 (Aug05) RMA" ], + [ + "81", + "BR_U_0805_P", + "UTHSC Brain mRNA U74Av2 (Aug05) PDNN" + ], [ "42", "CB_M_0204_P", @@ -2142,6 +2161,13 @@ "BXD Genotypes" ] ], + "Heart mRNA": [ + [ + "819", + "UCLA_BXD_Aor_Jan16", + "UCLA BXD Aorta Affy M430 2.0 (Jan16) RMA" + ] + ], "Hematopoietic Cells mRNA": [ [ "149", @@ -2217,6 +2243,26 @@ "UMUTAffyExon_0209_RMA", "UMUTAffy Hippocampus Exon (Feb09) RMA" ], + [ + "814", + "UTHSC_ILM_BXD_hipp_NOSb_0217", + "UTHSC BXD Hippocampus ILM v6.1 NOS Balanced (Feb17) RankInv" + ], + [ + "815", + "UTHSC_ILM_BXD_hipp_NOEb_0217", + "UTHSC BXD Hippocampus ILM v6.1 NOE Balanced (Feb17) RankInv" + ], + [ + "816", + "UTHSC_ILM_BXD_hipp_RSSb_0217", + "UTHSC BXD Hippocampus ILM v6.1 RSS Balanced (Feb17) RankInv" + ], + [ + "817", + "UTHSC_ILM_BXD_hipp_RSEb_0217", + "UTHSC BXD Hippocampus ILM v6.1 RSE Balanced (Feb17) RankInv" + ], [ "780", "UTHSC_ILM_BXD_hipp_NOEb_0216", @@ -2390,15 +2436,25 @@ ] ], "Liver Proteome": [ + [ + "540", + "EPFLETHZBXDprotCD0514", + "EPFL/ETHZ BXD Liver, Chow Diet (Jun16) Top100 SWATH" + ], + [ + "541", + "EPFLETHZBXDprotHFD0514", + "EPFL/ETHZ BXD Liver, High Fat Diet (Jun16) Top100 SWATH" + ], [ "704", "EPFLETHZBXDprotCD_LS1114", - "EPFL/ETHZ BXD Liver, Chow Diet (Oct14) Light SWATH" + "EPFL/ETHZ BXD Liver, Chow Diet (Oct14) Top10 SWATH" ], [ "705", "EPFLETHZBXDprotHF_LS1114", - "EPFL/ETHZ BXD Liver, High Fat Diet (Oct14) Light SWATH" + "EPFL/ETHZ BXD Liver, High Fat Diet Diet (Oct14) Top10 SWATH" ], [ "703", @@ -2414,19 +2470,14 @@ "489", "EPFLBXDprotHFDRPN0214", "EPFL/LISP BXD Liver, Soluble Proteins HFD (Feb14) SRM" - ], - [ - "540", - "EPFLETHZBXDprotCD0514", - "EPFL/ETHZ BXD Liver, Soluble Proteins CD (Jun14) SWATH" - ], - [ - "541", - "EPFLETHZBXDprotHFD0514", - "EPFL/ETHZ BXD Liver, Soluble Proteins HFD (Jun14) SWATH" ] ], "Liver mRNA": [ + [ + "818", + "UCLA_BXD_Liv_Jan16", + "UCLA BXD Liver Affy M430 2.0 (Jan16) RMA" + ], [ "430", "EPFLMouseLiverRMA0413", @@ -2442,6 +2493,11 @@ "EPFLMouseLiverCDRMA0413", "EPFL/LISP BXD CD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA" ], + [ + "433", + "EPFLMouseLiverBothExRMA0413", + "EPFL/LISP BXD CD+HFD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA Exon Level" + ], [ "700", "UTHSC-VGX_MmBXDHepatocytesRMA1014", @@ -2466,6 +2522,51 @@ "702", "SUH_Liv_RMAEx_0611", "SUH BXD Liver CCl4-treated Affy Mouse Gene 1.0 ST Exon Level (Jun11) RMA" + ], + [ + "256", + "GenEx_BXD_liverEt_M5_0912", + "GenEx BXD EtOH Liver Affy M430 2.0 (Sep12) MAS5 Both Sexes" + ], + [ + "257", + "GenEx_BXD_liverEt_M5M_0912", + "GenEx BXD EtOH Liver Affy M430 2.0 (Sep12) MAS5 Males" + ], + [ + "258", + "GenEx_BXD_liverEt_M5F_0912", + "GenEx BXD EtOH Liver Affy M430 2.0 (Sep12) MAS5 Females" + ], + [ + "307", + "GenEx_BXD_liverEt_RMA_0211", + "GenEx BXD EtOH Liver Affy M430 2.0 (Feb11) RMA Both Sexes" + ], + [ + "308", + "GenEx_BXD_liverEt_RMA_M_0211", + "GenEx BXD EtOH Liver Affy M430 2.0 (Feb11) RMA Males" + ], + [ + "309", + "GenEx_BXD_liverEt_RMA_F_0211", + "GenEx BXD EtOH Liver Affy M430 2.0 (Feb11) RMA Females" + ], + [ + "310", + "GenEx_BXD_liverSal_RMA_0211", + "GenEx BXD Sal Liver Affy M430 2.0 (Feb11) RMA Both Sexes" + ], + [ + "311", + "GenEx_BXD_liverSal_RMA_M_0211", + "GenEx BXD Sal Liver Affy M430 2.0 (Feb11) RMA Males" + ], + [ + "312", + "GenEx_BXD_liverSal_RMA_F_0211", + "GenEx BXD Sal Liver Affy M430 2.0 (Feb11) RMA Females" ] ], "Lung mRNA": [ @@ -2545,15 +2646,15 @@ "HQFNeoc_0208_RankInv", "HQF BXD Neocortex ILM6v1.1 (Feb08) RankInv" ], - [ - "275", - "DevNeocortex_ILM6.2P14RInv_1110", - "BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov10) RankInv" - ], [ "274", "DevNeocortex_ILM6.2P3RInv_1110", "BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov10) RankInv" + ], + [ + "275", + "DevNeocortex_ILM6.2P14RInv_1110", + "BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov10) RankInv" ] ], "Nucleus Accumbens mRNA": [ @@ -2760,11 +2861,6 @@ ] ], "Ventral Tegmental Area mRNA": [ - [ - "230", - "VCUEtvsSal_0609_R", - "VCU BXD VTA Et vs Sal M430 2.0 (Jun09) RMA" - ], [ "229", "VCUEtOH_0609_R", @@ -2774,6 +2870,11 @@ "228", "VCUSal_0609_R", "VCU BXD VTA Sal M430 2.0 (Jun09) RMA" + ], + [ + "230", + "VCUEtvsSal_0609_R", + "VCU BXD VTA Et vs Sal M430 2.0 (Jun09) RMA" ] ] }, @@ -2920,6 +3021,27 @@ ] ] }, + "CIE-RMA": { + "Midbrain mRNA": [ + [ + "830", + "INIA_UTHSC_Mid_AffyMTA1_Apr17", + "INIA-UTHSC Midbrain CIE Affy MTA 1.0 GeneLevel (Apr17) RMA" + ], + [ + "834", + "INIA_UTHSC_Mid_AffyMTA1_Ex_May17", + "INIA-UTHSC Midbrain CIE Affy MTA 1.0 Exon Level (Apr17) RMA" + ] + ], + "Phenotypes": [ + [ + "None", + "CIE-RMAPublish", + "CIE-RMA Published Phenotypes" + ] + ] + }, "CMS": { "Phenotypes": [ [ @@ -3021,6 +3143,13 @@ "CXB Genotypes" ] ], + "Heart mRNA": [ + [ + "821", + "UCLA_CXB_Aor_Jan16", + "UCLA CXB Aorta Affy M430 2.0 (Jan16) RMA" + ] + ], "Hippocampus mRNA": [ [ "100", @@ -3033,6 +3162,13 @@ "Hippocampus Consortium M430v2 CXB (Dec05) PDNN" ] ], + "Liver mRNA": [ + [ + "823", + "UCLA_CXB_Liv_Jan16", + "UCLA CXB Liver Affy M430 2.0 (Jan16) RMA" + ] + ], "Phenotypes": [ [ "628", @@ -3048,6 +3184,7 @@ ] ] }, + "EMSR": {}, "HS": { "Hippocampus mRNA": [ [ @@ -3544,6 +3681,10 @@ "HSB", "Brain, Development: Normal Gene Expression (Yale/Sestan)" ], + [ + "Islets-Gerling", + "Pancreatic: Islets (UTHSC/Gerling)" + ], [ "TIGEM-Retina-RNA-Seq", "Retina: Normal Adult Gene Expression, RNA-Seq (TIGEM)" @@ -3616,7 +3757,11 @@ ], [ "CIE-INIA", - "Chronic Intermittent Ethanol" + "Chronic Intermittent Ethanol Phase 1" + ], + [ + "CIE-RMA", + "Chronic Intermittent Ethanol Phase 2" ], [ "CMS", @@ -3630,6 +3775,10 @@ "CXB", "CXB" ], + [ + "EMSR", + "Ethanol-Medicated Stress Reduction" + ], [ "HS", "Heterogeneous Stock" @@ -4414,6 +4563,12 @@ "Ventrolateral Prefrontal Cortex mRNA" ] ], + "Islets-Gerling": [ + [ + "Phenotypes", + "Phenotypes" + ] + ], "TIGEM-Retina-RNA-Seq": [ [ "Phenotypes", @@ -4629,6 +4784,10 @@ "Gastrointestinal mRNA", "Gastrointestinal mRNA" ], + [ + "Heart mRNA", + "Heart mRNA" + ], [ "Hematopoietic Cells mRNA", "Hematopoietic Cells mRNA" @@ -4780,6 +4939,16 @@ "LCM Brain Regions mRNA" ] ], + "CIE-RMA": [ + [ + "Phenotypes", + "Phenotypes" + ], + [ + "Midbrain mRNA", + "Midbrain mRNA" + ] + ], "CMS": [ [ "Phenotypes", @@ -4821,15 +4990,24 @@ "Genotypes", "Genotypes" ], + [ + "Heart mRNA", + "Heart mRNA" + ], [ "Hippocampus mRNA", "Hippocampus mRNA" ], + [ + "Liver mRNA", + "Liver mRNA" + ], [ "Spleen mRNA", "Spleen mRNA" ] ], + "EMSR": [], "HS": [ [ "Phenotypes", diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 39f4a686..24a7cbca 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -71,6 +71,8 @@ import werkzeug import utility.logger logger = utility.logger.getLogger(__name__ ) + + @app.before_request def connect_db(): db = getattr(g, '_database', None) @@ -120,6 +122,7 @@ def handle_bad_request(e): @app.route("/") def index_page(): logger.info("Sending index_page") + logger.error(request.url) params = request.args if 'import_collections' in params: import_collections = params['import_collections'] @@ -137,6 +140,7 @@ def index_page(): def tmp_page(img_path): logger.info("In tmp_page") logger.info("img_path:", img_path) + logger.error(request.url) initial_start_vars = request.form logger.info("initial_start_vars:", initial_start_vars) imgfile = open(GENERATED_IMAGE_DIR + img_path, 'rb') @@ -170,6 +174,7 @@ def bd_files(filename): @app.route("/search", methods=('GET',)) def search_page(): logger.info("in search_page") + logger.error(request.url) if 'info_database' in request.args: logger.info("Going to sharing_info_page") template_vars = sharing_info_page() @@ -208,6 +213,7 @@ def search_page(): @app.route("/gsearch", methods=('GET',)) def gsearchact(): + logger.error(request.url) result = gsearch.GSearch(request.args).__dict__ type = request.args['type'] if type == "gene": @@ -218,6 +224,7 @@ def gsearchact(): @app.route("/gsearch_updating", methods=('POST',)) def gsearch_updating(): logger.info("REQUEST ARGS:", request.values) + logger.error(request.url) result = update_search_results.GSearch(request.args).__dict__ return result['results'] # type = request.args['type'] @@ -228,26 +235,31 @@ def gsearch_updating(): @app.route("/docedit") def docedit(): + logger.error(request.url) doc = docs.Docs(request.args['entry']) return render_template("docedit.html", **doc.__dict__) @app.route('/generated/') def generated_file(filename): + logger.error(request.url) return send_from_directory(GENERATED_IMAGE_DIR,filename) @app.route("/help") def help(): + logger.error(request.url) doc = docs.Docs("help") return render_template("docs.html", **doc.__dict__) @app.route("/wgcna_setup", methods=('POST',)) def wcgna_setup(): logger.info("In wgcna, request.form is:", request.form) # We are going to get additional user input for the analysis + logger.error(request.url) return render_template("wgcna_setup.html", **request.form) # Display them using the template @app.route("/wgcna_results", methods=('POST',)) def wcgna_results(): logger.info("In wgcna, request.form is:", request.form) + logger.error(request.url) wgcna = wgcna_analysis.WGCNA() # Start R, load the package and pointers and create the analysis wgcnaA = wgcna.run_analysis(request.form) # Start the analysis, a wgcnaA object should be a separate long running thread result = wgcna.process_results(wgcnaA) # After the analysis is finished store the result @@ -256,11 +268,13 @@ def wcgna_results(): @app.route("/ctl_setup", methods=('POST',)) def ctl_setup(): logger.info("In ctl, request.form is:", request.form) # We are going to get additional user input for the analysis + logger.error(request.url) return render_template("ctl_setup.html", **request.form) # Display them using the template @app.route("/ctl_results", methods=('POST',)) def ctl_results(): logger.info("In ctl, request.form is:", request.form) + logger.error(request.url) ctl = ctl_analysis.CTL() # Start R, load the package and pointers and create the analysis ctlA = ctl.run_analysis(request.form) # Start the analysis, a ctlA object should be a separate long running thread result = ctl.process_results(ctlA) # After the analysis is finished store the result @@ -298,11 +312,13 @@ def environments(): @app.route("/submit_trait") def submit_trait_form(): + logger.error(request.url) species_and_groups = get_species_groups() return render_template("submit_trait.html", **{'species_and_groups' : species_and_groups, 'gn_server_url' : GN_SERVER_URL, 'version' : GN_VERSION}) @app.route("/create_temp_trait", methods=('POST',)) def create_temp_trait(): + logger.error(request.url) print("REQUEST.FORM:", request.form) #template_vars = submit_trait.SubmitTrait(request.form) @@ -315,6 +331,7 @@ def export_trait_excel(): """Excel file consisting of the sample data from the trait data and analysis page""" logger.info("In export_trait_excel") logger.info("request.form:", request.form) + logger.error(request.url) sample_data = export_trait_data.export_sample_table(request.form) logger.info("sample_data - type: %s -- size: %s" % (type(sample_data), len(sample_data))) @@ -340,6 +357,7 @@ def export_trait_csv(): """CSV file consisting of the sample data from the trait data and analysis page""" logger.info("In export_trait_csv") logger.info("request.form:", request.form) + logger.error(request.url) sample_data = export_trait_data.export_sample_table(request.form) logger.info("sample_data - type: %s -- size: %s" % (type(sample_data), len(sample_data))) @@ -360,6 +378,7 @@ def export_traits_csv(): """CSV file consisting of the traits from the search result page""" logger.info("In export_traits_csv") logger.info("request.form:", request.form) + logger.error(request.url) csv_data = export_traits.export_search_results_csv(request.form) return Response(csv_data, @@ -369,6 +388,7 @@ def export_traits_csv(): @app.route('/export_perm_data', methods=('POST',)) def export_perm_data(): """CSV file consisting of the permutation data for the mapping results""" + logger.error(request.url) num_perm = float(request.form['num_perm']) perm_data = json.loads(request.form['perm_results']) @@ -391,6 +411,7 @@ def export_perm_data(): @app.route("/show_temp_trait", methods=('POST',)) def show_temp_trait_page(): + logger.error(request.url) template_vars = show_trait.ShowTrait(request.form) #logger.info("js_data before dump:", template_vars.js_data) template_vars.js_data = json.dumps(template_vars.js_data, @@ -405,6 +426,7 @@ def show_temp_trait_page(): @app.route("/show_trait") def show_trait_page(): + logger.error(request.url) template_vars = show_trait.ShowTrait(request.args) #logger.info("js_data before dump:", template_vars.js_data) template_vars.js_data = json.dumps(template_vars.js_data, @@ -420,6 +442,7 @@ def show_trait_page(): @app.route("/heatmap", methods=('POST',)) def heatmap_page(): logger.info("In heatmap, request.form is:", pf(request.form)) + logger.error(request.url) start_vars = request.form temp_uuid = uuid.uuid4() @@ -469,6 +492,7 @@ def mapping_results_container_page(): @app.route("/loading", methods=('POST',)) def loading_page(): + logger.error(request.url) initial_start_vars = request.form logger.debug("Marker regression called with initial_start_vars:", initial_start_vars.items()) #temp_uuid = initial_start_vars['temp_uuid'] @@ -525,6 +549,7 @@ def loading_page(): def marker_regression_page(): initial_start_vars = request.form logger.debug("Marker regression called with initial_start_vars:", initial_start_vars.items()) + logger.error(request.url) temp_uuid = initial_start_vars['temp_uuid'] wanted = ( 'trait_id', @@ -646,6 +671,7 @@ def marker_regression_page(): @app.route("/export", methods = ('POST',)) def export(): logger.info("request.form:", request.form) + logger.error(request.url) svg_xml = request.form.get("data", "Invalid data") filename = request.form.get("filename", "manhattan_plot_snp") response = Response(svg_xml, mimetype="image/svg+xml") @@ -656,6 +682,7 @@ def export(): def export_pdf(): import cairosvg logger.info("request.form:", request.form) + logger.error(request.url) svg_xml = request.form.get("data", "Invalid data") logger.info("svg_xml:", svg_xml) filename = request.form.get("filename", "interval_map_pdf") @@ -668,7 +695,7 @@ def export_pdf(): @app.route("/network_graph", methods=('POST',)) def network_graph_page(): logger.info("In network_graph, request.form is:", pf(request.form)) - + logger.error(request.url) start_vars = request.form traits = [trait.strip() for trait in start_vars['trait_list'].split(',')] if traits[0] != "": @@ -684,6 +711,7 @@ def network_graph_page(): @app.route("/corr_compute", methods=('POST',)) def corr_compute_page(): logger.info("In corr_compute, request.form is:", pf(request.form)) + logger.error(request.url) #fd = webqtlFormData.webqtlFormData(request.form) template_vars = show_corr_results.CorrelationResults(request.form) return render_template("correlation_page.html", **template_vars.__dict__) @@ -691,6 +719,7 @@ def corr_compute_page(): @app.route("/corr_matrix", methods=('POST',)) def corr_matrix_page(): logger.info("In corr_matrix, request.form is:", pf(request.form)) + logger.error(request.url) start_vars = request.form traits = [trait.strip() for trait in start_vars['trait_list'].split(',')] @@ -706,6 +735,7 @@ def corr_matrix_page(): @app.route("/corr_scatter_plot") def corr_scatter_plot_page(): + logger.error(request.url) template_vars = corr_scatter_plot.CorrScatterPlot(request.args) template_vars.js_data = json.dumps(template_vars.js_data, default=json_default_handler, @@ -717,6 +747,7 @@ def corr_scatter_plot_page(): def sharing_info_page(): """Info page displayed when the user clicks the "Info" button next to the dataset selection""" logger.info("In sharing_info_page") + logger.error(request.url) fd = webqtlFormData.webqtlFormData(request.args) template_vars = SharingInfoPage.SharingInfoPage(fd) return template_vars @@ -724,6 +755,7 @@ def sharing_info_page(): # Take this out or secure it before putting into production @app.route("/get_temp_data") def get_temp_data(): + logger.error(request.url) temp_uuid = request.args['key'] return flask.jsonify(temp_data.TempData(temp_uuid).get_all()) -- cgit v1.2.3