From d23cce0a4ebc033eb9269d590b839649b76ad5b9 Mon Sep 17 00:00:00 2001 From: choang Date: Fri, 6 Oct 2023 08:40:29 -0700 Subject: [PATCH] Add --ignore_warnings to diamond command to resolve error he sequences are expected to be proteins but only contain DNA letters. Use the option --ignore-warnings to proceed. --- gget/gget_diamond.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gget/gget_diamond.py b/gget/gget_diamond.py index 94dc76ab..e7a53461 100644 --- a/gget/gget_diamond.py +++ b/gget/gget_diamond.py @@ -122,12 +122,12 @@ def diamond( if out is None: command = f"{PRECOMPILED_DIAMOND_PATH} makedb --quiet --in {reference} -d reference \ - && {PRECOMPILED_DIAMOND_PATH} blastp --quiet -q {input_file} -d reference -o {output} --{sensitivity}" + && {PRECOMPILED_DIAMOND_PATH} blastp --quiet -q {input_file} -d reference -o {output} --{sensitivity} --ignore-warnings" else: output = out # The double-quotation marks allow white spaces in the path, but this does not work for Windows command = f"{PRECOMPILED_DIAMOND_PATH} makedb --quiet --in {reference} -d reference \ - && {PRECOMPILED_DIAMOND_PATH} blastp --quiet -q {input_file} -d reference -o {out}.tsv --{sensitivity}" + && {PRECOMPILED_DIAMOND_PATH} blastp --quiet -q {input_file} -d reference -o {out}.tsv --{sensitivity} --ignore-warnings" # Run diamond command and write command output with subprocess.Popen(command, shell=True, stderr=subprocess.PIPE) as process_2: stderr_2 = process_2.stderr.read().decode("utf-8")