From 3be9e4a0950b1ea2d560463032c6f4104baf738e Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Wed, 20 Apr 2016 08:49:59 +0000 Subject: [PATCH 026/100] Introducing cached values PYLMM_COMMAND, GEMMA_COMMAND, PLINK_COMMAND and TEMPDIR --- wqflask/utility/tools.py | 8 +++++++- wqflask/wqflask/marker_regression/marker_regression.py | 11 +---------- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'wqflask') diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py index dc7bc33c..5d69e699 100644 --- a/wqflask/utility/tools.py +++ b/wqflask/utility/tools.py @@ -81,4 +81,10 @@ def flat_files(subdir=None): def tempdir(): return valid_path(get_setting("TEMPDIR","/tmp")) -TEMPDIR = tempdir() +# Cached values + +PYLMM_COMMAND = pylmm_command() +GEMMA_COMMAND = pylmm_command() +PLINK_COMMAND = pylmm_command() +FLAT_FILES = flat_files() +TEMPDIR = tempdir() diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py index b0f5ed69..a76a5967 100644 --- a/wqflask/wqflask/marker_regression/marker_regression.py +++ b/wqflask/wqflask/marker_regression/marker_regression.py @@ -36,21 +36,12 @@ from utility import helper_functions from utility import Plot, Bunch from utility import temp_data from utility.benchmark import Bench -from utility.tools import pylmm_command, plink_command, gemma_command from wqflask.marker_regression import gemma_mapping #from wqflask.marker_regression import qtl_reaper_mapping #from wqflask.marker_regression import plink_mapping #from wqflask.marker_regression import rqtl_mapping -# Check for valid binary paths of pylmm, plink, rqtl etc. This code -# runs at startup, so a missing binary will balk before running the -# service - -GEMMA_RUN = gemma_command() -PYLMM_RUN = pylmm_command() -PLINK_RUN = plink_command() -# RQTL_PATH,RQTL_COMMAND = rqtl_command() - +from utility.tools import PYLMM_COMMAND, GEMMA_COMMAND, PLINK_COMMAND class MarkerRegression(object): -- cgit v1.2.3