summaryrefslogtreecommitdiff
path: root/Code/make_parameter_rnaseq.py
diff options
context:
space:
mode:
authorHui Lan <lanhui@zjnu.edu.cn>2024-08-05 14:44:44 +0800
committerHui Lan <lanhui@zjnu.edu.cn>2024-08-05 14:44:44 +0800
commitdf4af8751a5c1e1465159083100b82e58e7778f7 (patch)
tree4962f84f789520f3e3be54e94ff11f06d5e35e8f /Code/make_parameter_rnaseq.py
parent0d5e23b870ef9fa21cc90e31150dc1c27d56b3f8 (diff)
Update write_log_file() so that it put the most recent message on the top; remove duplicate write_log_file()
Diffstat (limited to 'Code/make_parameter_rnaseq.py')
-rw-r--r--Code/make_parameter_rnaseq.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/Code/make_parameter_rnaseq.py b/Code/make_parameter_rnaseq.py
index 18ef568..f9c7d26 100644
--- a/Code/make_parameter_rnaseq.py
+++ b/Code/make_parameter_rnaseq.py
@@ -9,6 +9,7 @@
import sys, os, glob, json
import fnmatch, re
from datetime import datetime
+from log import write_log_file
from configure import RNA_SEQ_INFO_FILE, UPDATE_NETWORK_LOG_FILE
NON_ZERO_RATIO = 0.2 # omit *_quant.txt files with too many zeros.
@@ -102,15 +103,6 @@ def read_ena_data_info_json(fname):
return d
-def write_log_file(s, fname):
- f = open(fname, 'a')
- curr_time = datetime.now().strftime('%Y-%m-%d %H:%M')
- s = '[' + curr_time + ']: ' + s
- if not '\n' in s:
- s += '\n'
- f.write(s)
- f.close()
-
### main
if not os.path.exists(RNA_SEQ_INFO_FILE):
print('make_parameter_rnaseq.py: you must provide %s. See parse_ena_xml.py on how to make it.' % (RNA_SEQ_INFO_FILE))