aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorpjotrp2016-02-24 17:41:55 +0000
committerPjotr Prins2016-04-20 09:31:10 +0000
commite42b21c66b09128ac6a9c18ca018287516d8c309 (patch)
tree9a87298a13358be4bd0217eed86ac90e10fab67a /wqflask
parent9395e9f3cc2d06e069c5de797b2d6e8e59cfba7c (diff)
downloadgenenetwork2-e42b21c66b09128ac6a9c18ca018287516d8c309.tar.gz
Minor fixes
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/utility/external.py9
-rw-r--r--wqflask/wqflask/marker_regression/marker_regression_gn1.py5
2 files changed, 12 insertions, 2 deletions
diff --git a/wqflask/utility/external.py b/wqflask/utility/external.py
new file mode 100644
index 00000000..bd8cf584
--- /dev/null
+++ b/wqflask/utility/external.py
@@ -0,0 +1,9 @@
+# Call external program
+
+import os
+import sys
+import subprocess
+
+def shell(command):
+ if not subprocess.call(command, shell=True):
+ raise Exception("ERROR: failed on "+command)
diff --git a/wqflask/wqflask/marker_regression/marker_regression_gn1.py b/wqflask/wqflask/marker_regression/marker_regression_gn1.py
index 4edc1891..a68c9586 100644
--- a/wqflask/wqflask/marker_regression/marker_regression_gn1.py
+++ b/wqflask/wqflask/marker_regression/marker_regression_gn1.py
@@ -29,6 +29,7 @@ import string
from math import *
import piddle as pid
import piddlePIL as pil
+from piddle import Font
import sys,os
import cPickle
import httplib, urllib
@@ -941,7 +942,7 @@ class MarkerRegression(object):
bootScale = bootScale[:-1] + [highestPercent]
bootOffset = 50*fontZoom
- bootScaleFont=pid.Font(ttf="verdana",size=13*fontZoom,bold=0)
+ bootScaleFont=Font(ttf="verdana",size=13*fontZoom,bold=0)
canvas.drawRect(canvas.size[0]-bootOffset,yZero-bootHeightThresh,canvas.size[0]-bootOffset-15*zoom,yZero,fillColor = pid.yellow)
canvas.drawLine(canvas.size[0]-bootOffset+4, yZero, canvas.size[0]-bootOffset, yZero, color=pid.black)
canvas.drawString('0%' ,canvas.size[0]-bootOffset+10,yZero+5,font=bootScaleFont,color=pid.black)
@@ -2259,7 +2260,7 @@ class MarkerRegression(object):
chrFontZoom = 2
else:
chrFontZoom = 1
- chrLabelFont=pid.Font(ttf="verdana",size=24*chrFontZoom,bold=0)
+ chrLabelFont=Font(ttf="verdana",size=24*chrFontZoom,bold=0)
for i, _chr in enumerate(self.genotype):
if (i % 2 == 0):