aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpjotrp2016-02-29 10:53:02 +0000
committerPjotr Prins2016-04-20 09:58:45 +0000
commitd00ed869d6df48180c56bbf9bc9f39afa7f5d3fa (patch)
treeeabd0698c4efc354b7075cbb678d5f50b84ccc2a
parent33bc6a57394f9fd3242a33e7cb29f01baa0692b1 (diff)
downloadgenenetwork2-d00ed869d6df48180c56bbf9bc9f39afa7f5d3fa.tar.gz
r-wgcna: Fix paths
-rw-r--r--wqflask/wqflask/views.py2
-rw-r--r--wqflask/wqflask/wgcna/wgcna_analysis.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 4979d45d..7f331492 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -98,7 +98,7 @@ def tmp_page(img_path):
print("img_path:", img_path)
initial_start_vars = request.form
print("initial_start_vars:", initial_start_vars)
- imgfile = open(webqtlConfig.TMPDIR + img_path, 'rb')
+ imgfile = open(GENERATED_IMAGE_DIR + img_path, 'rb')
imgdata = imgfile.read()
imgB64 = imgdata.encode("base64")
bytesarray = array.array('B', imgB64)
diff --git a/wqflask/wqflask/wgcna/wgcna_analysis.py b/wqflask/wqflask/wgcna/wgcna_analysis.py
index 9e9f41bc..6901712b 100644
--- a/wqflask/wqflask/wgcna/wgcna_analysis.py
+++ b/wqflask/wqflask/wgcna/wgcna_analysis.py
@@ -6,7 +6,7 @@ import scipy as sp # SciPy
import rpy2.robjects as ro # R Objects
import rpy2.rinterface as ri
-from base import webqtlConfig # For paths and stuff
+from base.webqtlConfig import GENERATED_IMAGE_DIR
from utility import webqtlUtil # Random number for the image
import base64
@@ -127,7 +127,7 @@ class WGCNA(object):
# The iconic WCGNA plot of the modules in the hanging tree
self.results['imgurl'] = webqtlUtil.genRandStr("WGCNAoutput_") + ".png"
- self.results['imgloc'] = webqtlConfig.TMPDIR + self.results['imgurl']
+ self.results['imgloc'] = GENERATED_IMAGE_DIR + self.results['imgurl']
r_png(self.results['imgloc'], width=1000, height=600)
mergedColors = self.r_labels2colors(network[1])
self.r_plotDendroAndColors(network[5][0], mergedColors, "Module colors", dendroLabels = False, hang = 0.03, addGuide = True, guideHang = 0.05)