From 317eb5cfb23b3cb5979eb1eb516cacf086b09a44 Mon Sep 17 00:00:00 2001 From: DannyArends Date: Wed, 8 Feb 2017 09:31:38 +0100 Subject: Adding stub display templates for all 3 analysis tools --- wqflask/wqflask/auwerx/ephewas.py | 40 ++++++++++++++++++++++ wqflask/wqflask/auwerx/mediation.py | 40 ++++++++++++++++++++++ wqflask/wqflask/auwerx/phewas.py | 40 ++++++++++++++++++++++ wqflask/wqflask/phewas/phewas.py | 40 ---------------------- wqflask/wqflask/templates/ephewas_analysis.html | 9 +++++ wqflask/wqflask/templates/mediation_analysis.html | 9 +++++ wqflask/wqflask/templates/phewas_analysis.html | 3 +- .../wqflask/templates/show_trait_PheWAS_tools.html | 8 ++--- 8 files changed, 144 insertions(+), 45 deletions(-) create mode 100644 wqflask/wqflask/auwerx/ephewas.py create mode 100644 wqflask/wqflask/auwerx/mediation.py create mode 100644 wqflask/wqflask/auwerx/phewas.py delete mode 100644 wqflask/wqflask/phewas/phewas.py create mode 100644 wqflask/wqflask/templates/ephewas_analysis.html create mode 100644 wqflask/wqflask/templates/mediation_analysis.html diff --git a/wqflask/wqflask/auwerx/ephewas.py b/wqflask/wqflask/auwerx/ephewas.py new file mode 100644 index 00000000..edfb2801 --- /dev/null +++ b/wqflask/wqflask/auwerx/ephewas.py @@ -0,0 +1,40 @@ +# PheWAS analysis for GN2 +# Author / Maintainer: Li Hao & Danny Arends +import sys +from numpy import * +import scipy as sp # SciPy +import rpy2.robjects as ro # R Objects +import rpy2.rinterface as ri + +from base.webqtlConfig import GENERATED_IMAGE_DIR +from utility import webqtlUtil # Random number for the image +from utility import genofile_parser # genofile_parser + +import base64 +import array +import csv +import itertools + +from base import data_set +from base import trait as TRAIT + +from utility import helper_functions +from utility.tools import locate + +from rpy2.robjects.packages import importr +utils = importr("utils") + +class EPheWAS(object): + def __init__(self): + print("Initialization of ePheWAS") + print("Initialization of ePheWAS done !") + + def run_analysis(self, requestform): + print("Starting ePheWAS analysis on dataset") + print("Initialization of ePheWAS done !") + + def process_results(self, results): + print("Processing ePheWAS output") + template_vars = {} + return(dict(template_vars)) + diff --git a/wqflask/wqflask/auwerx/mediation.py b/wqflask/wqflask/auwerx/mediation.py new file mode 100644 index 00000000..48d02dc2 --- /dev/null +++ b/wqflask/wqflask/auwerx/mediation.py @@ -0,0 +1,40 @@ +# PheWAS analysis for GN2 +# Author / Maintainer: Li Hao & Danny Arends +import sys +from numpy import * +import scipy as sp # SciPy +import rpy2.robjects as ro # R Objects +import rpy2.rinterface as ri + +from base.webqtlConfig import GENERATED_IMAGE_DIR +from utility import webqtlUtil # Random number for the image +from utility import genofile_parser # genofile_parser + +import base64 +import array +import csv +import itertools + +from base import data_set +from base import trait as TRAIT + +from utility import helper_functions +from utility.tools import locate + +from rpy2.robjects.packages import importr +utils = importr("utils") + +class Mediation(object): + def __init__(self): + print("Initialization of Mediation") + print("Initialization of Mediation done !") + + def run_analysis(self, requestform): + print("Starting Mediation analysis on dataset") + print("Initialization of Mediation done !") + + def process_results(self, results): + print("Processing Mediation output") + template_vars = {} + return(dict(template_vars)) + diff --git a/wqflask/wqflask/auwerx/phewas.py b/wqflask/wqflask/auwerx/phewas.py new file mode 100644 index 00000000..399e056c --- /dev/null +++ b/wqflask/wqflask/auwerx/phewas.py @@ -0,0 +1,40 @@ +# PheWAS analysis for GN2 +# Author / Maintainer: Li Hao & Danny Arends +import sys +from numpy import * +import scipy as sp # SciPy +import rpy2.robjects as ro # R Objects +import rpy2.rinterface as ri + +from base.webqtlConfig import GENERATED_IMAGE_DIR +from utility import webqtlUtil # Random number for the image +from utility import genofile_parser # genofile_parser + +import base64 +import array +import csv +import itertools + +from base import data_set +from base import trait as TRAIT + +from utility import helper_functions +from utility.tools import locate + +from rpy2.robjects.packages import importr +utils = importr("utils") + +class PheWAS(object): + def __init__(self): + print("Initialization of PheWAS") + print("Initialization of PheWAS done !") + + def run_analysis(self, requestform): + print("Starting PheWAS analysis on dataset") + print("Initialization of PheWAS done !") + + def process_results(self, results): + print("Processing PheWAS output") + template_vars = {} + return(dict(template_vars)) + diff --git a/wqflask/wqflask/phewas/phewas.py b/wqflask/wqflask/phewas/phewas.py deleted file mode 100644 index 399e056c..00000000 --- a/wqflask/wqflask/phewas/phewas.py +++ /dev/null @@ -1,40 +0,0 @@ -# PheWAS analysis for GN2 -# Author / Maintainer: Li Hao & Danny Arends -import sys -from numpy import * -import scipy as sp # SciPy -import rpy2.robjects as ro # R Objects -import rpy2.rinterface as ri - -from base.webqtlConfig import GENERATED_IMAGE_DIR -from utility import webqtlUtil # Random number for the image -from utility import genofile_parser # genofile_parser - -import base64 -import array -import csv -import itertools - -from base import data_set -from base import trait as TRAIT - -from utility import helper_functions -from utility.tools import locate - -from rpy2.robjects.packages import importr -utils = importr("utils") - -class PheWAS(object): - def __init__(self): - print("Initialization of PheWAS") - print("Initialization of PheWAS done !") - - def run_analysis(self, requestform): - print("Starting PheWAS analysis on dataset") - print("Initialization of PheWAS done !") - - def process_results(self, results): - print("Processing PheWAS output") - template_vars = {} - return(dict(template_vars)) - diff --git a/wqflask/wqflask/templates/ephewas_analysis.html b/wqflask/wqflask/templates/ephewas_analysis.html new file mode 100644 index 00000000..d5e71fa7 --- /dev/null +++ b/wqflask/wqflask/templates/ephewas_analysis.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} +{% block title %}ePheWAS analysis{% endblock %} + +{% block content %} +
+

ePheWAS analysis results

+ YAY ! We have our own route +
+{% endblock %} diff --git a/wqflask/wqflask/templates/mediation_analysis.html b/wqflask/wqflask/templates/mediation_analysis.html new file mode 100644 index 00000000..ee5a5016 --- /dev/null +++ b/wqflask/wqflask/templates/mediation_analysis.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} +{% block title %}Mediation analysis{% endblock %} + +{% block content %} +
+

Mediation analysis results

+ YAY ! We have our own route +
+{% endblock %} diff --git a/wqflask/wqflask/templates/phewas_analysis.html b/wqflask/wqflask/templates/phewas_analysis.html index ac163b43..2b04d85b 100644 --- a/wqflask/wqflask/templates/phewas_analysis.html +++ b/wqflask/wqflask/templates/phewas_analysis.html @@ -1,8 +1,9 @@ {% extends "base.html" %} -{% block title %}CTL analysis{% endblock %} +{% block title %}PheWAS analysis{% endblock %} {% block content %}
+

PheWAS analysis results

YAY ! We have our own route
{% endblock %} diff --git a/wqflask/wqflask/templates/show_trait_PheWAS_tools.html b/wqflask/wqflask/templates/show_trait_PheWAS_tools.html index ee4c5f5a..d8193652 100644 --- a/wqflask/wqflask/templates/show_trait_PheWAS_tools.html +++ b/wqflask/wqflask/templates/show_trait_PheWAS_tools.html @@ -40,7 +40,7 @@
-
@@ -59,7 +59,7 @@
-
@@ -78,13 +78,13 @@
-
- + -- cgit v1.2.3