aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2016-03-21 20:23:59 +0000
committerzsloan2016-03-21 20:23:59 +0000
commita65a5e0ff16e033dd8a67808711663851afd0169 (patch)
tree2a0263308d9e7e7f4844ef5b669bac8257bed963
parent857d6d36a7e97b398c007083b7c5c05a44430bcb (diff)
downloadgenenetwork2-a65a5e0ff16e033dd8a67808711663851afd0169.tar.gz
Manhattan plot option now works for GN1 map, and GEMMA is set to display as manhattan plot
-rwxr-xr-xwqflask/wqflask/marker_regression/marker_regression.py1
-rw-r--r--wqflask/wqflask/marker_regression/marker_regression_gn1.py12
2 files changed, 10 insertions, 3 deletions
diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py
index b75a30f6..c50b9d78 100755
--- a/wqflask/wqflask/marker_regression/marker_regression.py
+++ b/wqflask/wqflask/marker_regression/marker_regression.py
@@ -91,6 +91,7 @@ class MarkerRegression(object):
self.dataset.group.get_markers()
if self.mapping_method == "gemma":
self.score_type = "LOD"
+ self.manhattan_plot = True
with Bench("Running GEMMA"):
included_markers, p_values = gemma_mapping.run_gemma(self.dataset, self.samples, self.vals)
with Bench("Getting markers from csv"):
diff --git a/wqflask/wqflask/marker_regression/marker_regression_gn1.py b/wqflask/wqflask/marker_regression/marker_regression_gn1.py
index e9052290..01cee4f4 100644
--- a/wqflask/wqflask/marker_regression/marker_regression_gn1.py
+++ b/wqflask/wqflask/marker_regression/marker_regression_gn1.py
@@ -285,6 +285,7 @@ class MarkerRegression(object):
self.graphHeight = self.GRAPH_DEFAULT_HEIGHT
+ self.manhattan_plot = start_vars['manhattan_plot']
self.additiveChecked = False
self.dominanceChecked = False
self.LRS_LOD = start_vars['score_type']
@@ -1989,7 +1990,11 @@ class MarkerRegression(object):
#else:
# Yc = yZero - qtlresult['lrs_value']*LRSHeightThresh/LRSMax
- LRSCoordXY.append((Xc, Yc))
+ if self.manhattan_plot == True:
+ canvas.drawEllipse(Xc-1, Yc-1, Xc+1, Yc+1, fillColor=pid.black)
+ else:
+ LRSCoordXY.append((Xc, Yc))
+
#if not self.multipleInterval and self.additiveChecked:
# if additiveMax == 0.0:
# additiveMax = 0.000001
@@ -1999,7 +2004,8 @@ class MarkerRegression(object):
# Yc = yZero - qtlresult[m].dominance*DominanceHeightThresh/dominanceMax
# DominanceCoordXY.append((Xc, Yc))
m += 1
- #canvas.drawPolygon(LRSCoordXY,edgeColor=thisLRSColor,closed=0, edgeWidth=lrsEdgeWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ if self.manhattan_plot != True:
+ canvas.drawPolygon(LRSCoordXY,edgeColor=thisLRSColor,closed=0, edgeWidth=lrsEdgeWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
lineWidth = 1
if not self.multipleInterval and self.additiveChecked:
@@ -2062,7 +2068,7 @@ class MarkerRegression(object):
canvas.drawLine(Xc0, yZero - (Yc0-yZero), Xc, yZero - (Yc-yZero), color=minusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
- canvas.drawPolygon(LRSCoordXY,edgeColor=thisLRSColor,closed=0, edgeWidth=lrsEdgeWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ #canvas.drawPolygon(LRSCoordXY,edgeColor=thisLRSColor,closed=0, edgeWidth=lrsEdgeWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
###draw additive scale
if not self.multipleInterval and self.additiveChecked: