From ec6c3158a48a7d81596c848cb8b7f3a487bcc28a Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Thu, 25 Feb 2016 12:43:49 +0000 Subject: [PATCH 047/100] This commit moves the image generation dir *outside* the git repository. --- wqflask/wqflask/marker_regression/marker_regression_gn1.py | 12 ------------ wqflask/wqflask/templates/marker_regression_gn1.html | 2 +- wqflask/wqflask/views.py | 7 ++++++- 3 files changed, 7 insertions(+), 14 deletions(-) (limited to 'wqflask') 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 @@
{{ gifmap|safe }} - + {% if additiveChecked|upper == "ON" %}
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. 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/') +def generated_file(filename): + return send_from_directory(GENERATED_IMAGE_DIR,filename) + @app.route("/help") def help(): doc = docs.Docs("help") -- cgit v1.2.3