diff options
-rwxr-xr-x | wqflask/base/data_set.py | 6 | ||||
-rw-r--r-- | wqflask/utility/tools.py | 6 |
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): |