Переглянути джерело

1.Console log level changed to info
2.consensus logging basicConfig change

liuwei 5 роки тому
батько
коміт
e91899389e

+ 4 - 8
FALCON/falcon_kit/mains/consensus.py

@@ -128,7 +128,6 @@ def get_trimmed_seq(seq, s, e):
                     aln = '*', is_mapped = False, is_trimmed = True)
     return ret
 
-
 def get_consensus_core(seqs, min_cov, K, min_idt, allow_external_mapping):
     seqs_ptr = (c_char_p * len(seqs))()
     seqs_ptr[:] = [bytes(val.seq, encoding='ascii')  for val in seqs]
@@ -328,9 +327,9 @@ def parse_args(argv):
     return parser.parse_args(argv[1:])
 
 def run(args):
-    # logging.basicConfig(level=int(round(10*args.verbose_level)))
-    logging.basicConfig(level=logging.NOTSET,
-                        format='%(asctime)s: [%(module)s:%(funcName)s()line:%(lineno)d] - %(levelname)s :  %(message)s')
+    logging.basicConfig(level=int(round(10*args.verbose_level)))
+    # logging.basicConfig(level=logging.NOTSET,
+    #                     format='%(asctime)s: [%(module)s:%(funcName)s()line:%(lineno)d] - %(levelname)s :  %(message)s')
 
     assert args.n_core <= multiprocessing.cpu_count(), 'Requested n_core={} > cpu_count={}'.format(
             args.n_core, multiprocessing.cpu_count())
@@ -356,8 +355,6 @@ def run(args):
     inputs = []
     for datum in get_seq_data(config, args.min_n_read, args.min_len_aln):
         inputs.append((get_consensus, datum))
-    LOG.debug("====>len(get_seq_data({}, {}, {}))={}"
-              .format(config, args.min_n_read, args.min_len_aln, len(inputs)))
     try:
         LOG.info('====>running {!r}'.format(get_consensus))
         for res in exe_pool.imap(io.run_func, inputs):
@@ -377,8 +374,7 @@ def process_get_consensus_result(res, args, limit=500):
             LOG.warning("====>process_get_consensus_result() data error! res={}".format(res))
             return
         if len(cns) < limit:
-            LOG.debug("====>process_get_consensus_result() len(cns)={} < limit[{}]"
-                        .format(len(cns), limit))
+            LOG.debug("====>process_get_consensus_result() len(cns)={} < limit[{}]".format(len(cns), limit))
             return
 
         if args.output_full:

+ 1 - 1
FALCON/falcon_kit/run_support.py

@@ -503,7 +503,7 @@ handlers=stream,file_all
 
 [handler_stream]
 class=StreamHandler
-level=DEBUG
+level=INFO
 formatter=form02
 args=(sys.stderr,)