diff options
author | Pjotr Prins | 2015-04-19 12:28:58 +0200 |
---|---|---|
committer | Pjotr Prins | 2015-04-19 12:28:58 +0200 |
commit | 3c1e043dd63fe2d65a0bd44764867254b13aba32 (patch) | |
tree | bc4bc2d9c8b20c955a8c4b3e9a6a806135d1fe07 | |
parent | e3adbf898dd537688339c8af1b59ac440aef3848 (diff) | |
download | genenetwork2-3c1e043dd63fe2d65a0bd44764867254b13aba32.tar.gz |
pylmm: auto add to pythonpath
-rw-r--r-- | INSTALL.md | 4 | ||||
-rw-r--r-- | wqflask/wqflask/my_pylmm/pyLMM/lmm.py | 6 | ||||
-rw-r--r-- | wqflask/wqflask/my_pylmm/pyLMM/runlmm.py | 8 |
3 files changed, 16 insertions, 2 deletions
@@ -16,8 +16,8 @@ Clone the repository (currently ~800Mb) to local GN2 requires * python -* redis -* mysql +* redis-server +* mysql-server ## Required python modules diff --git a/wqflask/wqflask/my_pylmm/pyLMM/lmm.py b/wqflask/wqflask/my_pylmm/pyLMM/lmm.py index 2d9ca812..4e35a4ac 100644 --- a/wqflask/wqflask/my_pylmm/pyLMM/lmm.py +++ b/wqflask/wqflask/my_pylmm/pyLMM/lmm.py @@ -34,6 +34,12 @@ import datetime # import cPickle as pickle from pprint import pformat as pf +# Add local dir to PYTHONPATH +import os +cwd = os.path.dirname(__file__) +if sys.path[0] != cwd: + sys.path.insert(1,cwd) + # pylmm imports from kinship import kinship, kinship_full, kvakve import genotype diff --git a/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py b/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py index 52c3c80a..6b241cd6 100644 --- a/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py +++ b/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py @@ -21,6 +21,14 @@ from optparse import OptionParser import sys import tsvreader import numpy as np + +# Add local dir to PYTHONPATH +import os +cwd = os.path.dirname(__file__) +if sys.path[0] != cwd: + sys.path.insert(1,cwd) + +# pylmm modules from lmm import gn2_load_redis, gn2_load_redis_iter, calculate_kinship_new, run_gwas from kinship import kinship, kinship_full import genotype |