diff options
Diffstat (limited to 'Code/update_network.py')
-rwxr-xr-x | Code/update_network.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Code/update_network.py b/Code/update_network.py index 373703d..82c8cb9 100755 --- a/Code/update_network.py +++ b/Code/update_network.py @@ -44,12 +44,11 @@ import os, sys import numpy as np import glob import time -import subprocess from datetime import datetime from param4net import make_global_param_dict, get_key_value from log import write_log_file from utils import make_paths -from configure import HISTORY_DIR, HISTORY_DIR2, FILE_TIMESTAMP, SAMPLE_SIZE_FILE, TEMP_DIR, \ +from configure import HISTORY_DIR, HISTORY_DIR2, TIMESTAMP_FILE, SAMPLE_SIZE_FILE, TEMP_DIR, \ PARAMETER_FOR_BUILDCMATRIX, PARAMETER_FOR_BUILDRMATRIX, \ PARAMETER_FOR_NET, PARAMETER_FOR_NET_TRAVADB_STRESS, PARAMETER_FOR_NET_TRAVADB_MAP, PARAMETER_FOR_NET_MILD_DROUGHT, PARAMETER_FOR_NET_WIGGELAB_DIURNAL, \ BINDING_FILE, TPM_FILE, \ @@ -605,11 +604,11 @@ validate_parameter_for_net(PARAMETER_FOR_NET) # If the file timestamp does not exist, create one -if not os.path.exists(FILE_TIMESTAMP): - record_file_time(FILE_LIST_TO_CHECK, FILE_TIMESTAMP) +if not os.path.exists(TIMESTAMP_FILE): + record_file_time(FILE_LIST_TO_CHECK, TIMESTAMP_FILE) # Get update time of mandatory files -timestamp_dict = read_file_timestamp(FILE_TIMESTAMP) +timestamp_dict = read_file_timestamp(TIMESTAMP_FILE) @@ -714,8 +713,8 @@ if 'TPM.txt' in updated_file_list: # we could _touch_ TPM.txt to make it recent. cmd = 'python3 update_rnaseq_info_json.py' os.system(cmd) - # Compute edges. This could take a lot of time so update FILE_TIMESTAMP first. - record_file_time(FILE_LIST_TO_CHECK, FILE_TIMESTAMP) + # Compute edges. This could take a lot of time so update TIMESTAMP_FILE first. + record_file_time(FILE_LIST_TO_CHECK, TIMESTAMP_FILE) create_edges0() create_edges0B() wedge() @@ -745,6 +744,6 @@ cmd = 'find %s -mtime +2 -name \"*.R\" -delete' % (TEMP_DIR) os.system(cmd) # update time stamp file -record_file_time(FILE_LIST_TO_CHECK, FILE_TIMESTAMP) +record_file_time(FILE_LIST_TO_CHECK, TIMESTAMP_FILE) write_log_file('[update_network.py] Update done at %s.\n\n' % (datetime.now().strftime('%Y-%m-%d %H:%M:%S')), UPDATE_NETWORK_LOG_FILE) |