aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorPjotr Prins2016-02-25 12:43:49 +0000
committerPjotr Prins2016-04-20 09:45:40 +0000
commitec6c3158a48a7d81596c848cb8b7f3a487bcc28a (patch)
tree193c1592aba64acb51621771244c58bd503e57c3 /wqflask
parent2e039da988b585fde5a09e94d7fd7b56262752f2 (diff)
downloadgenenetwork2-ec6c3158a48a7d81596c848cb8b7f3a487bcc28a.tar.gz
[PATCH 047/100] This commit moves the image generation dir *outside* the git repository.
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/marker_regression/marker_regression_gn1.py12
-rw-r--r--wqflask/wqflask/templates/marker_regression_gn1.html2
-rw-r--r--wqflask/wqflask/views.py7
3 files changed, 7 insertions, 14 deletions
diff --git a/wqflask/wqflask/marker_regression/marker_regression_gn1.py b/wqflask/wqflask/marker_regression/marker_regression_gn1.py
index 8a593ec4..245e3f04 100644
--- a/wqflask/wqflask/marker_regression/marker_regression_gn1.py
+++ b/wqflask/wqflask/marker_regression/marker_regression_gn1.py
@@ -28,8 +28,6 @@ import time
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
@@ -40,21 +38,11 @@ from htmlgen import HTMLgen2 as HT
from base import webqtlConfig
from base.GeneralObject import GeneralObject
-#from base.webqtlTrait import webqtlTrait
-#from base.templatePage import templatePage
from utility import webqtlUtil
from utility import helper_functions
from utility import Plot
-#from utility.THCell import THCell
-#from utility.TDCell import TDCell
from wqflask.interval_analyst import GeneUtil
-#from dbFunction import webqtlDatabaseFunction
-
-#import logging
-#logging.basicConfig(filename="/tmp/gn_leiyan.log", level=logging.INFO)
-#_log = logging.getLogger("gn\web\webqtl\intervalMapping\IntervalMappingPage.py")
-
#########################################
# Inteval Mapping Plot Page
#########################################
diff --git a/wqflask/wqflask/templates/marker_regression_gn1.html b/wqflask/wqflask/templates/marker_regression_gn1.html
index f3f33fad..311429f8 100644
--- a/wqflask/wqflask/templates/marker_regression_gn1.html
+++ b/wqflask/wqflask/templates/marker_regression_gn1.html
@@ -143,7 +143,7 @@
<div class="tab-pane active" id="gn1_map">
<div class="qtlcharts">
{{ gifmap|safe }}
- <img src="/static/output/{{ filename }}.jpeg" usemap="#WebQTLImageMap">
+ <img src="/generated/{{ filename }}.jpeg" usemap="#WebQTLImageMap">
{% if additiveChecked|upper == "ON" %}
<br>
<span style="white-space: nowrap;">A positive additive coefficient (green line) indicates that {{ dataset.group.parlist[1] }} alleles increase trait values. In contrast, a negative additive coefficient (orange line) indicates that {{ dataset.group.parlist[0] }} alleles increase trait values.</span>
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 929da649..b35bbbf9 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -30,7 +30,7 @@ import sqlalchemy
from wqflask import app
from flask import (render_template, request, make_response, Response,
- Flask, g, config, jsonify, redirect, url_for)
+ Flask, g, config, jsonify, redirect, url_for, send_from_directory)
from wqflask import search_results
from wqflask import gsearch
@@ -53,6 +53,7 @@ from utility import temp_data
from utility.tools import TEMPDIR
from base import webqtlFormData
+from base.webqtlConfig import GENERATED_IMAGE_DIR
from utility.benchmark import Bench
from pprint import pformat as pf
@@ -173,6 +174,10 @@ def docedit():
doc = docs.Docs(request.args['entry'])
return render_template("docedit.html", **doc.__dict__)
+@app.route('/generated/<filename>')
+def generated_file(filename):
+ return send_from_directory(GENERATED_IMAGE_DIR,filename)
+
@app.route("/help")
def help():
doc = docs.Docs("help")