Commit 53c6ca05 by Riccardo Vicedomini

fixed error with existing directory

parent f38df41d
...@@ -29,10 +29,7 @@ def main(): ...@@ -29,10 +29,7 @@ def main():
temp_dir = f'{args.tempDir}' temp_dir = f'{args.tempDir}'
if not os.path.exists(temp_dir): if not os.path.exists(temp_dir):
try: os.makedirs(temp_dir,exist_ok=True)
os.makedirs(temp_dir)
except OSError as error:
pass
start_time = time.time() start_time = time.time()
......
...@@ -143,9 +143,9 @@ class CladeController: ...@@ -143,9 +143,9 @@ class CladeController:
def createSearchFiles(self): def createSearchFiles(self):
print(f"[{script_name}] creating search jobs") print(f"[{script_name}] creating search jobs")
if not os.path.exists(self.search_jobs_path): if not os.path.exists(self.search_jobs_path):
os.makedirs(self.search_jobs_path) os.makedirs(self.search_jobs_path,exist_ok=True)
if not os.path.exists(self.search_results_path): if not os.path.exists(self.search_results_path):
os.makedirs(self.search_results_path) os.makedirs(self.search_results_path,exist_ok=True)
#print(f"[{script_name}] loading CCMs dictionary") #print(f"[{script_name}] loading CCMs dictionary")
self.loadCCMsDict() self.loadCCMsDict()
self.createSearchJobs(self.search_jobs_path,self.name) self.createSearchJobs(self.search_jobs_path,self.name)
...@@ -154,18 +154,18 @@ class CladeController: ...@@ -154,18 +154,18 @@ class CladeController:
def createFilterFiles(self): def createFilterFiles(self):
print(f"[{script_name}] creating filter jobs") print(f"[{script_name}] creating filter jobs")
if not os.path.exists(self.filter_results_path): if not os.path.exists(self.filter_results_path):
os.makedirs(self.filter_results_path) os.makedirs(self.filter_results_path,exist_ok=True)
if not os.path.exists(self.filter_jobs_path): if not os.path.exists(self.filter_jobs_path):
os.makedirs(self.filter_jobs_path) os.makedirs(self.filter_jobs_path,exist_ok=True)
self.createFilterJobs(self.filter_jobs_path,self.name) self.createFilterJobs(self.filter_jobs_path,self.name)
#self.createQsubJob(self.filter_jobs_path,self.name) #self.createQsubJob(self.filter_jobs_path,self.name)
def createArchFiles(self,use_dama=False): def createArchFiles(self,use_dama=False):
print(f"[{script_name}] creating architecture jobs") print(f"[{script_name}] creating architecture jobs")
if not os.path.exists(self.arch_results_path): if not os.path.exists(self.arch_results_path):
os.makedirs(self.arch_results_path) os.makedirs(self.arch_results_path,exist_ok=True)
if not os.path.exists(self.arch_jobs_path): if not os.path.exists(self.arch_jobs_path):
os.makedirs(self.arch_jobs_path) os.makedirs(self.arch_jobs_path,exist_ok=True)
if use_dama: if use_dama:
self.createDamaArchJob(self.arch_jobs_path,self.name) self.createDamaArchJob(self.arch_jobs_path,self.name)
else: else:
......
...@@ -64,14 +64,11 @@ def main(): ...@@ -64,14 +64,11 @@ def main():
temp_dir = f'{args[TMP_DIR]}' temp_dir = f'{args[TMP_DIR]}'
if not os.path.exists(temp_dir): if not os.path.exists(temp_dir):
try: os.makedirs(temp_dir,exist_ok=True)
os.makedirs(temp_dir)
except OSError as error:
pass
results_dir = f'{args[RESULTS_DIR]}/{args[ACC_ID]}' results_dir = f'{args[RESULTS_DIR]}/{args[ACC_ID]}'
if not os.path.exists(results_dir): if not os.path.exists(results_dir):
os.makedirs(results_dir) os.makedirs(results_dir,exist_ok=True)
start_time = time.time() start_time = time.time()
hmmsearch_args = [ args[HMMSEARCH_CMD], hmmsearch_args = [ args[HMMSEARCH_CMD],
......
...@@ -64,14 +64,11 @@ def main(): ...@@ -64,14 +64,11 @@ def main():
temp_dir = f'{args[TMP_DIR]}' temp_dir = f'{args[TMP_DIR]}'
if not os.path.exists(temp_dir): if not os.path.exists(temp_dir):
try: os.makedirs(temp_dir,exist_ok=True)
os.makedirs(temp_dir)
except OSError as error:
pass
results_dir = f'{args[RESULTS_DIR]}/{args[ACC_ID]}' results_dir = f'{args[RESULTS_DIR]}/{args[ACC_ID]}'
if not os.path.exists(results_dir): if not os.path.exists(results_dir):
os.makedirs(results_dir) os.makedirs(results_dir,exist_ok=True)
start_time = time.time() start_time = time.time()
hmmsearch_args = [ args[HMMSEARCH_CMD], hmmsearch_args = [ args[HMMSEARCH_CMD],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment