summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Lan <lanhui@zjnu.edu.cn>2025-05-07 19:47:21 +0800
committerHui Lan <lanhui@zjnu.edu.cn>2025-05-07 19:47:21 +0800
commitc0df4a63724dd7f862ccd14244e7f3bbe3b3adf7 (patch)
tree4dc0a8dd42235aef771c950d4634a01487b986cb
parent41e2651693d73eabb9d403ea01dad1e1ec999dfd (diff)
The variable new_dir_name is unnecessary, so remove it
-rw-r--r--Code/download_and_map.py11
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.')