From 85a384dc779a49f02ccee3088356e4873eacbd9a Mon Sep 17 00:00:00 2001
From: zsloan
Date: Thu, 6 Aug 2020 12:29:13 -0500
Subject: Made a change that should fix the issue with the Y axis ticks
extending too high in mapping results *
wqflask/wqflask/marker_regression/display_mapping_results.py - When in ful
genome view, I changed it to subject the yTopOffset when drawing the Y axis;
single chromosome view seems to work okay so it's conditional on that
---
.../wqflask/marker_regression/display_mapping_results.py | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py
index 9ac4946b..75c1a8cd 100644
--- a/wqflask/wqflask/marker_regression/display_mapping_results.py
+++ b/wqflask/wqflask/marker_regression/display_mapping_results.py
@@ -1737,9 +1737,17 @@ class DisplayMappingResults(object):
LRSLODFont=pid.Font(ttf="verdana", size=18*zoom*1.5, bold=0)
yZero = yTopOffset + plotHeight
- LRSHeightThresh = drawAreaHeight
- AdditiveHeightThresh = drawAreaHeight/2
- DominanceHeightThresh = drawAreaHeight/2
+ # LRSHeightThresh = drawAreaHeight
+ # AdditiveHeightThresh = drawAreaHeight/2
+ # DominanceHeightThresh = drawAreaHeight/2
+ if self.selectedChr == 1:
+ LRSHeightThresh = drawAreaHeight - yTopOffset + 30*(zoom - 1)
+ AdditiveHeightThresh = LRSHeightThresh/2
+ DominanceHeightThresh = LRSHeightThresh/2
+ else:
+ LRSHeightThresh = drawAreaHeight
+ AdditiveHeightThresh = drawAreaHeight/2
+ DominanceHeightThresh = drawAreaHeight/2
# LRSHeightThresh = (yZero - yTopOffset + 30*(zoom - 1))
# AdditiveHeightThresh = LRSHeightThresh/2
# DominanceHeightThresh = LRSHeightThresh/2
@@ -1900,7 +1908,7 @@ class DisplayMappingResults(object):
startPosX += newStartPosX
oldStartPosX = newStartPosX
- #ZS: This is beause the chromosome value stored in qtlresult['chr'] can be (for example) either X or 20 depending upon the mapping method/scale used
+ #ZS: This is because the chromosome value stored in qtlresult['chr'] can be (for example) either X or 20 depending upon the mapping method/scale used
this_chr = str(self.ChrList[self.selectedChr][0])
if self.plotScale != "physic":
this_chr = str(self.ChrList[self.selectedChr][1]+1)
--
cgit v1.2.3
From 39f2d8b8599a8daae2c55c3a2bf48366164c6ca2 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Thu, 6 Aug 2020 13:54:18 -0500
Subject: Added endpoint for changing some user details *
wqflask/wqflask/user_session.py - Added endpoint for /manage/user that lets
the user change their full_name or organization. Still need to add something
that lets them change their e-mail, since that will require a confirmation
---
wqflask/wqflask/user_session.py | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/wqflask/wqflask/user_session.py b/wqflask/wqflask/user_session.py
index ba659fe5..3aa2c151 100644
--- a/wqflask/wqflask/user_session.py
+++ b/wqflask/wqflask/user_session.py
@@ -13,7 +13,7 @@ from wqflask import app
from utility import hmac
#from utility.elasticsearch_tools import get_elasticsearch_connection
-from utility.redis_tools import get_redis_conn, get_user_id, get_user_collections, save_collections
+from utility.redis_tools import get_redis_conn, get_user_id, get_user_by_unique_column, set_user_attribute, get_user_collections, save_collections
Redis = get_redis_conn()
from utility.logger import getLogger
@@ -53,6 +53,18 @@ def create_signed_cookie():
logger.debug("uuid_signed:", uuid_signed)
return the_uuid, uuid_signed
+@app.route("/user/manage", methods=('GET','POST'))
+def manage_user():
+ params = request.form if request.form else request.args
+ if 'new_full_name' in params:
+ set_user_attribute(g.user_session.user_id, 'full_name', params['new_full_name'])
+ if 'new_organization' in params:
+ set_user_attribute(g.user_session.user_id, 'organization', params['new_organization'])
+
+ user_details = get_user_by_unique_column("user_id", g.user_session.user_id)
+
+ return render_template("admin/manage_user.html", user_details = user_details)
+
class UserSession(object):
"""Logged in user handling"""
--
cgit v1.2.3
From bdbb0fab5b30a9413491c0ad36585d6c5c671d22 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Mon, 17 Aug 2020 12:52:22 -0500
Subject: Placed X/Y trait info before the table on the correlation scatterplot
page * wqflask/wqflask/templates/corr_scatterplot.html - reordered table and
X/Y trait info divs
---
wqflask/wqflask/templates/corr_scatterplot.html | 108 ++++++++++++------------
1 file changed, 54 insertions(+), 54 deletions(-)
diff --git a/wqflask/wqflask/templates/corr_scatterplot.html b/wqflask/wqflask/templates/corr_scatterplot.html
index 5877e367..6f0511e1 100644
--- a/wqflask/wqflask/templates/corr_scatterplot.html
+++ b/wqflask/wqflask/templates/corr_scatterplot.html
@@ -132,44 +132,8 @@