diff options
author | Pjotr Prins | 2016-06-16 17:16:46 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-06-16 17:16:46 +0000 |
commit | d90dc3748557d1d6fbaa59f71fe676b8a7c393ca (patch) | |
tree | 6548c2d088d5a80561e23df076456caaeda195c7 /wqflask/wqflask | |
parent | 75c7a0828625e3aaf6326e91fadf20df96207fc3 (diff) | |
parent | 2794c3653dbd72df9382a789795e3d2a454317ca (diff) | |
download | genenetwork2-d90dc3748557d1d6fbaa59f71fe676b8a7c393ca.tar.gz |
Merge branch 'master' of github.com:genenetwork/genenetwork2
Diffstat (limited to 'wqflask/wqflask')
-rw-r--r-- | wqflask/wqflask/collect.py | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | wqflask/wqflask/model.py | 0 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/draw_probability_plot.js | 7 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/show_trait.js | 5 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/packages/nvd3/nv.d3.css | 2 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/packages/nvd3/nv.d3.js | 5 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/show_trait.html | 2 | ||||
-rwxr-xr-x | wqflask/wqflask/user_manager.py | 4 |
8 files changed, 21 insertions, 6 deletions
diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py index cd4c6fdc..9227d641 100644 --- a/wqflask/wqflask/collect.py +++ b/wqflask/wqflask/collect.py @@ -15,7 +15,7 @@ import urlparse import simplejson as json -from sqlalchemy import orm +#from sqlalchemy import orm #from redis import StrictRedis import redis diff --git a/wqflask/wqflask/model.py b/wqflask/wqflask/model.py index 5ea32e1f..5ea32e1f 100755..100644 --- a/wqflask/wqflask/model.py +++ b/wqflask/wqflask/model.py diff --git a/wqflask/wqflask/static/new/javascript/draw_probability_plot.js b/wqflask/wqflask/static/new/javascript/draw_probability_plot.js index 3eb6295f..1eeb6e73 100644 --- a/wqflask/wqflask/static/new/javascript/draw_probability_plot.js +++ b/wqflask/wqflask/static/new/javascript/draw_probability_plot.js @@ -46,7 +46,7 @@ chart.pointRange([50, 50]); chart.legend.updateState(false); chart.xAxis.axisLabel("Theoretical quantiles").tickFormat(d3.format('.02f')); - chart.yAxis.axisLabel("Sample quantiles").tickFormat(d3.format('.02f')); + //chart.yAxis.axisLabel("Sample quantiles").tickFormat(d3.format('.02f')); chart.tooltipContent(function(obj) { return '<b style="font-size: 20px">' + obj.point.name + '</b>'; }); @@ -66,15 +66,20 @@ sorted_names = names.sort(function(x, y) { return all_samples[x].value - all_samples[y].value; }); + max_decimals = 0 sorted_values = (function() { var j, len, results; results = []; for (j = 0, len = sorted_names.length; j < len; j++) { x = sorted_names[j]; results.push(all_samples[x].value); + if (all_samples[x].value.countDecimals() > max_decimals) { + max_decimals = all_samples[x].value.countDecimals()-1 + } } return results; })(); + chart.yAxis.axisLabel("Sample quantiles").tickFormat(d3.format('.0'+max_decimals.toString()+'f')); sw_result = ShapiroWilkW(sorted_values); W = sw_result.w.toFixed(3); pvalue = sw_result.p.toFixed(3); diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js index 34d1a139..589b1074 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait.js +++ b/wqflask/wqflask/static/new/javascript/show_trait.js @@ -521,5 +521,10 @@ $('#reset').click(edit_data_change); return console.log("end"); }); + + Number.prototype.countDecimals = function () { + if(Math.floor(this.valueOf()) === this.valueOf()) return 0; + return this.toString().split(".")[1].length || 0; + } }).call(this); diff --git a/wqflask/wqflask/static/new/packages/nvd3/nv.d3.css b/wqflask/wqflask/static/new/packages/nvd3/nv.d3.css index 726f76c3..694b9218 100644 --- a/wqflask/wqflask/static/new/packages/nvd3/nv.d3.css +++ b/wqflask/wqflask/static/new/packages/nvd3/nv.d3.css @@ -16,7 +16,7 @@ }
.nvd3 .nv-axis.nv-x path.domain {
- stroke-opacity: 0;
+ stroke-opacity: 1;
}
.nvd3 .nv-axis line {
diff --git a/wqflask/wqflask/static/new/packages/nvd3/nv.d3.js b/wqflask/wqflask/static/new/packages/nvd3/nv.d3.js index b11ce58f..4d8b9d65 100644 --- a/wqflask/wqflask/static/new/packages/nvd3/nv.d3.js +++ b/wqflask/wqflask/static/new/packages/nvd3/nv.d3.js @@ -1556,7 +1556,7 @@ nv.models.axis = function() { , width = 75 //only used for tickLabel currently , height = 60 //only used for tickLabel currently , axisLabelText = null - , showMaxMin = true //TODO: showMaxMin should be disabled on all ordinal scaled axes + , showMaxMin = false //TODO: showMaxMin should be disabled on all ordinal scaled axes , rotateLabels = 0 , rotateYLabel = true , staggerLabels = false @@ -7894,7 +7894,8 @@ nv.models.multiBar = function() { bars.select('polyline') .attr('fill', 'none') - .attr('stroke', function(d, i, j) { return errorBarColor(d, j, i); }) + .attr('stroke', 'black') + //.attr('stroke', function(d, i, j) { return errorBarColor(d, j, i); }) .attr('points', function(d,i) { var yerr = getYerr(d,i) , mid = 0.8 * x.rangeBand() / ((stacked ? 1 : data.length) * 2); diff --git a/wqflask/wqflask/templates/show_trait.html b/wqflask/wqflask/templates/show_trait.html index 5e2dc6fa..1890cf3f 100755 --- a/wqflask/wqflask/templates/show_trait.html +++ b/wqflask/wqflask/templates/show_trait.html @@ -7,7 +7,7 @@ <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="/static/new/packages/nvd3/nv.d3.min.css" /> + <link rel="stylesheet" type="text/css" href="/static/new/packages/nvd3/nv.d3.css" /> <link rel="stylesheet" type="text/css" href="/static/new/packages/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" /> diff --git a/wqflask/wqflask/user_manager.py b/wqflask/wqflask/user_manager.py index e16a397d..e334a9aa 100755 --- a/wqflask/wqflask/user_manager.py +++ b/wqflask/wqflask/user_manager.py @@ -12,6 +12,7 @@ import os import hashlib import datetime import time +import logging import uuid import hashlib @@ -141,6 +142,9 @@ class UserSession(object): """Actual sqlalchemy record""" # Only look it up once if needed, then store it try: + logging.basicConfig() + logging.getLogger('sqlalchemy.pool').setLevel(logging.DEBUG) + # Already did this before return self.db_object except AttributeError: |