diff options
-rw-r--r-- | Code/download_and_map.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Code/download_and_map.py b/Code/download_and_map.py index 3dfb68f..93e3400 100644 --- a/Code/download_and_map.py +++ b/Code/download_and_map.py @@ -428,15 +428,14 @@ downloaded_file_paths, map_list = download_and_map_data(download_list, DAILY_MAP # Move all files to MAPPED_RDATA_DIR curr_time = datetime.now().strftime('%Y-%m-%d_%H%M') # append date info to newly created directories -new_dir_name = MAPPED_RDATA_DIR -if not os.path.isdir(new_dir_name): - os.makedirs(new_dir_name) +if not os.path.isdir(MAPPED_RDATA_DIR): + os.makedirs(MAPPED_RDATA_DIR) -# after mapping is finished, move all resulting files to new_dir_name (MAPPED_RDATA_DIR) +# after mapping is finished, move all resulting files to MAPPED_RDATA_DIR if glob.glob('%s/*_quant.txt' % (SALMON_MAP_RESULT_DIR.rstrip('/'))) != []: - cmd = 'mv %s/*_quant.txt %s' % (SALMON_MAP_RESULT_DIR.rstrip('/'), new_dir_name) + cmd = 'mv %s/*_quant.txt %s' % (SALMON_MAP_RESULT_DIR.rstrip('/'), MAPPED_RDATA_DIR) os.system(cmd) - print('[download_and_map.py] Done. Check directory %s.' % (os.path.abspath(new_dir_name))) + print('[download_and_map.py] Done. Check directory %s.' % (os.path.abspath(MAPPED_RDATA_DIR))) else: print('[download_and_map.py] No quant files to move.') |