From 93dcba89f7e424a759e3177a74b1ce322cdd7c57 Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 25 Mar 2015 16:11:56 +0000 Subject: Pair scan image now loads properly --- wqflask/base/webqtlConfig.py | 2 +- .../wqflask/marker_regression/marker_regression.py | 6 +-- wqflask/wqflask/templates/pair_scan_results.html | 55 ++++------------------ wqflask/wqflask/templates/show_image.html | 5 ++ wqflask/wqflask/views.py | 23 ++++++++- 5 files changed, 38 insertions(+), 53 deletions(-) create mode 100644 wqflask/wqflask/templates/show_image.html (limited to 'wqflask') diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py index e74b9ce5..49a596aa 100755 --- a/wqflask/base/webqtlConfig.py +++ b/wqflask/base/webqtlConfig.py @@ -58,7 +58,7 @@ SNP_PATH = '/home/zas1024/snps/' IMGDIR = GNROOT + '/wqflask/wqflask/images/' IMAGESPATH = HTMLPATH + 'images/' UPLOADPATH = IMAGESPATH + 'upload/' -TMPDIR = '/tmp/' +TMPDIR = '/home/zas1024/tmp/' # Will remove this and dependent items later GENODIR = HTMLPATH + 'genotypes/' NEWGENODIR = HTMLPATH + 'new_genotypes/' GENO_ARCHIVE_DIR = GENODIR + 'archive/' diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py index af441489..3fb9915b 100755 --- a/wqflask/wqflask/marker_regression/marker_regression.py +++ b/wqflask/wqflask/marker_regression/marker_regression.py @@ -321,9 +321,9 @@ class MarkerRegression(object): print("No covariates"); result_data_frame = scantwo(cross_object, pheno = "the_pheno", model=self.model, method=self.method, n_cluster = 16) print("Pair scan results:", result_data_frame) - - self.pair_scan_filename = webqtlUtil.genRandStr("scantwo_") - png(file=webqtlConfig.IMGDIR+self.pair_scan_filename+".png") + + self.pair_scan_filename = webqtlUtil.genRandStr("scantwo_") + ".png" + png(file=webqtlConfig.TMPDIR+self.pair_scan_filename) plot(result_data_frame) dev_off() diff --git a/wqflask/wqflask/templates/pair_scan_results.html b/wqflask/wqflask/templates/pair_scan_results.html index a0041e11..869dabed 100644 --- a/wqflask/wqflask/templates/pair_scan_results.html +++ b/wqflask/wqflask/templates/pair_scan_results.html @@ -1,13 +1,13 @@ {% extends "base.html" %} -{% block title %}Interval Mapping{% endblock %} +{% block title %}Pair Scan{% endblock %} {% block css %} - {% endblock %} + {% block content %} {{ header("Mapping", @@ -21,7 +21,12 @@