diff options
-rw-r--r-- | wqflask/wqflask/views.py | 2 | ||||
-rw-r--r-- | wqflask/wqflask/wgcna/wgcna_analysis.py | 4 |
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) |