From 39e6969b150672a9e0a5f1b3c5e21229844a852a Mon Sep 17 00:00:00 2001 From: Amandine PERRIN <amandine.perrin@pasteur.fr> Date: Thu, 22 Oct 2020 12:59:20 +0200 Subject: [PATCH] Add mmseqs commands at details level --- PanACoTA/pangenome_module/mmseqs_functions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PanACoTA/pangenome_module/mmseqs_functions.py b/PanACoTA/pangenome_module/mmseqs_functions.py index b57bbc14..af42e1aa 100755 --- a/PanACoTA/pangenome_module/mmseqs_functions.py +++ b/PanACoTA/pangenome_module/mmseqs_functions.py @@ -245,7 +245,8 @@ def run_mmseqs_clust(args): mmseqdb, mmseqclust, tmpdir, logmmseq, min_id, threads, clust_mode = args cmd = ("mmseqs cluster {} {} {} --min-seq-id {} --threads {} --cluster-mode " "{}").format(mmseqdb, mmseqclust, tmpdir, min_id, threads, clust_mode) - msg = "Problem while clustering proteins with mmseqs. See log in {logmmseq}" + logger.details(f"MMseqs command: {cmd}") + msg = f"Problem while clustering proteins with mmseqs. See log in {logmmseq}" with open(logmmseq, "a") as logm: utils.run_cmd(cmd, msg, eof=False, stdout=logm, stderr=logm) @@ -279,7 +280,7 @@ def mmseqs_to_pangenome(mmseqdb, mmseqclust, logmmseq, start, outfile=None): """ cmd = f"mmseqs createtsv {mmseqdb} {mmseqdb} {mmseqclust} {mmseqclust}.tsv" msg = "Problem while trying to convert mmseq result file to tsv file" - logger.info(f"MMseqs command: {cmd}") + logger.details(f"MMseqs command: {cmd}") with open(logmmseq, "a") as logf: utils.run_cmd(cmd, msg, eof=True, stdout=logf, stderr=logf) # Convert the tsv file to a 'pangenome' file: one line per family -- GitLab