-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
47 lines (38 loc) · 1.21 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright (C) 2018 Ahmad A. A. (https://github.com/bbpgrs/)
import common as cmn
import combine
import heatmap
import os
import logging
import time
import sys
"""
main module, program will be run through this module
"""
def main():
"""
Run program
"""
cmn.make_dir(cmn.LOG_DIR)
logging.basicConfig(
# filename=os.path.join(cmn.LOG_DIR, cmn.LOG_FILE_NAME % time.strftime(cmn.LOG_FILE_NAME_TIME)),
handlers=[
logging.FileHandler(os.path.join(cmn.LOG_DIR, cmn.LOG_FILE_NAME % time.strftime(cmn.LOG_FILE_NAME_TIME))),
logging.StreamHandler()
],
level=cmn.LOG_LEVEL,
format=cmn.LOG_MSG_FORMAT,
datefmt=cmn.LOG_TIME_FORMAT
)
start_time = time.time()
logging.info("Starting program ...\n")
if "-hmo" in sys.argv:
logging.info("Detected 'heatmap only' command line argument, program will use pre-existing combined PTEN correlation file.\n")
else:
combine.run()
heatmap.run()
logging.info("Finished running program.")
run_time = time.time() - start_time
logging.info("Total run time: %s.\n" % time.strftime('%H:%M:%S', time.gmtime(run_time)))
if __name__ == "__main__":
main()