From e62f451673fcac16b72134bc0d8783e11f51de4c Mon Sep 17 00:00:00 2001 From: Amandine PERRIN <amandine.perrin@pasteur.fr> Date: Thu, 22 Oct 2020 19:10:27 +0200 Subject: [PATCH] Write tree commands to details log --- PanACoTA/tree_module/fasttree_func.py | 3 +-- PanACoTA/tree_module/iqtree_func.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/PanACoTA/tree_module/fasttree_func.py b/PanACoTA/tree_module/fasttree_func.py index e761204c..47665301 100755 --- a/PanACoTA/tree_module/fasttree_func.py +++ b/PanACoTA/tree_module/fasttree_func.py @@ -113,7 +113,7 @@ def run_fasttree(alignfile, boot, outdir, model, quiet): logfile = os.path.join(outdir, align_name + ".fasttree.log") treefile = os.path.join(outdir, align_name + ".fasttree_tree.nwk") cmd = f"FastTreeMP -nt {model} -noml -nocat {bootinfo} -log {logfile} {alignfile}" - logger.info("Fasttree command: " + cmd) + logger.details("Fasttree command: " + cmd) if quiet: fnull = open(os.devnull, 'w') else: @@ -121,5 +121,4 @@ def run_fasttree(alignfile, boot, outdir, model, quiet): stdout = open(treefile, "w") error = ("Problem while running Fasttree. See log file ({}) for " "more information.").format(logfile) - logger.details(cmd) utils.run_cmd(cmd, error, stdout=stdout, eof=True, logger=logger, stderr=fnull) diff --git a/PanACoTA/tree_module/iqtree_func.py b/PanACoTA/tree_module/iqtree_func.py index 73d4ad85..980f0ab6 100644 --- a/PanACoTA/tree_module/iqtree_func.py +++ b/PanACoTA/tree_module/iqtree_func.py @@ -126,12 +126,11 @@ def run_tree(alignfile, boot, outdir, quiet, threads, **kwargs): prefix = f"--prefix {treefile}" cmd = (f"{soft} -s {alignfile} {threadinfo} -m {model} {mem_info} {bootinfo} {wb_info} " f"{seqtype} {prefix} -quiet {fast}") - logger.info("IQtree command: " + cmd) + logger.details("IQtree command: " + cmd) if quiet: fnull = open(os.devnull, 'w') else: fnull = None error = (f"Problem while running IQtree. See log file ({logfile}) for " "more information.") - logger.details(cmd) utils.run_cmd(cmd, error, eof=True, logger=logger, stderr=fnull) -- GitLab