aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorPjotr Prins2016-02-24 11:25:10 +0000
committerPjotr Prins2016-04-20 09:16:44 +0000
commit31a1c126185adb747028d035717ad72728a52b0e (patch)
tree05391053049ba4085b93865a9bfe65cb1b5fd3cd /wqflask
parent5fffa1aa4260af6663c1f9b4cf7494d3ebc6995d (diff)
downloadgenenetwork2-31a1c126185adb747028d035717ad72728a52b0e.tar.gz
-a
[PATCH 038/100] Fix compile errors
Diffstat (limited to 'wqflask')
-rwxr-xr-xwqflask/base/data_set.py6
-rw-r--r--wqflask/utility/tools.py6
2 files changed, 7 insertions, 5 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 6527657a..8b2a9f01 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -44,7 +44,7 @@ from dbFunction import webqtlDatabaseFunction
from utility import webqtlUtil
from utility.benchmark import Bench
from utility import chunks
-from utility.tools import locate, locate_without_error
+from utility.tools import locate, locate_ignore_error
from maintenance import get_group_samplelists
@@ -405,8 +405,8 @@ class DatasetGroup(object):
else:
print("Cache not hit")
- genotype_fn = locate_without_error(self.name+".geno",'genotype')
- mapping_fn = locate_without_error(self.name+".fam",'mapping')
+ genotype_fn = locate_ignore_error(self.name+".geno",'genotype')
+ mapping_fn = locate_ignore_error(self.name+".fam",'mapping')
if mapping_fn:
self.samplelist = get_group_samplelists.get_samplelist("plink", mapping_fn)
elif genotype_fn:
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index c0f6a49a..67c5128a 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -1,3 +1,4 @@
+
# Tools/paths finder resolves external paths from settings and/or environment
# variables
@@ -83,9 +84,10 @@ def assert_dir(dir):
if not valid_path(dir):
raise Exception("ERROR: can not find directory "+dir)
return dir
-
+
def mk_dir(dir):
- os.makedirs(dir)
+ if not valid_path(dir):
+ os.makedirs(dir)
return assert_dir(dir)
def locate(name, subdir=None):