summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Lan <lanhui@zjnu.edu.cn>2025-04-21 15:31:13 +0800
committerHui Lan <lanhui@zjnu.edu.cn>2025-04-21 15:31:13 +0800
commitbfccc673658440e09ecd770c76f97969422d5f7b (patch)
treeaf2a34dbc30689ad55e7ec904b09f03c98816d24
parente81676c04c6505a46070c9ab700f908b89565e18 (diff)
Fix error: name path is not defined
-rw-r--r--Code/download_and_map.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Code/download_and_map.py b/Code/download_and_map.py
index c21e114..178797b 100644
--- a/Code/download_and_map.py
+++ b/Code/download_and_map.py
@@ -295,7 +295,7 @@ def write_network_log_file(s, fname):
def age_of_file_in_hours(fname):
- timestamp = os.path.getmtime(path)
+ timestamp = os.path.getmtime(fname)
time_file = datetime.fromtimestamp(timestamp)
time_now = datetime.now()
age = time_now - time_file
@@ -402,7 +402,6 @@ else:
download_list = make_download_list(MAPPED_RDATA_DIR, rna_data_info_dict)
print('[download_and_map.py] There are %d run IDs from which you could select %d of them.' % (len(download_list), DAILY_MAP_NUMBER))
-
# Make a record in log.txt
curr_time = datetime.now().strftime('%Y-%m-%d_%H%M') # append date info to newly created directories
write_download_log_file(DOWNLOADED_SRA_ID_LOG_FILE, 'START at %s (remaining %d)\n' % (curr_time, len(download_list)))