From c0df4a63724dd7f862ccd14244e7f3bbe3b3adf7 Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Wed, 7 May 2025 19:47:21 +0800 Subject: The variable new_dir_name is unnecessary, so remove it --- Code/download_and_map.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Code/download_and_map.py') 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.') -- cgit v1.2.1