Skip to content
Snippets Groups Projects
Commit 39e6969b authored by Amandine  PERRIN's avatar Amandine PERRIN
Browse files

Add mmseqs commands at details level

parent 3b8856bf
No related branches found
No related tags found
No related merge requests found
...@@ -245,7 +245,8 @@ def run_mmseqs_clust(args): ...@@ -245,7 +245,8 @@ def run_mmseqs_clust(args):
mmseqdb, mmseqclust, tmpdir, logmmseq, min_id, threads, clust_mode = args mmseqdb, mmseqclust, tmpdir, logmmseq, min_id, threads, clust_mode = args
cmd = ("mmseqs cluster {} {} {} --min-seq-id {} --threads {} --cluster-mode " cmd = ("mmseqs cluster {} {} {} --min-seq-id {} --threads {} --cluster-mode "
"{}").format(mmseqdb, mmseqclust, tmpdir, min_id, threads, clust_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: with open(logmmseq, "a") as logm:
utils.run_cmd(cmd, msg, eof=False, stdout=logm, stderr=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): ...@@ -279,7 +280,7 @@ def mmseqs_to_pangenome(mmseqdb, mmseqclust, logmmseq, start, outfile=None):
""" """
cmd = f"mmseqs createtsv {mmseqdb} {mmseqdb} {mmseqclust} {mmseqclust}.tsv" cmd = f"mmseqs createtsv {mmseqdb} {mmseqdb} {mmseqclust} {mmseqclust}.tsv"
msg = "Problem while trying to convert mmseq result file to tsv file" 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: with open(logmmseq, "a") as logf:
utils.run_cmd(cmd, msg, eof=True, stdout=logf, stderr=logf) utils.run_cmd(cmd, msg, eof=True, stdout=logf, stderr=logf)
# Convert the tsv file to a 'pangenome' file: one line per family # Convert the tsv file to a 'pangenome' file: one line per family
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment