From 9956fcf4dde07131756ff4eb3269a1e94d805235 Mon Sep 17 00:00:00 2001 From: DannyArends Date: Tue, 7 Feb 2017 18:48:07 +0100 Subject: Inital python code to do PheWAS analysis from R --- wqflask/wqflask/phewas/phewas.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 wqflask/wqflask/phewas/phewas.py (limited to 'wqflask') diff --git a/wqflask/wqflask/phewas/phewas.py b/wqflask/wqflask/phewas/phewas.py new file mode 100644 index 00000000..399e056c --- /dev/null +++ b/wqflask/wqflask/phewas/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)) + -- cgit v1.2.3