diff options
-rw-r--r-- | wqflask/wqflask/marker_regression/marker_regression_gn1.py | 12 | ||||
-rw-r--r-- | wqflask/wqflask/templates/marker_regression_gn1.html | 2 | ||||
-rw-r--r-- | wqflask/wqflask/views.py | 7 |
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") |