From ca8e5ae948ac6a31cc077d50d1c0d9ddf29be5dc Mon Sep 17 00:00:00 2001 From: lvreynoso Date: Mon, 22 Apr 2024 11:51:52 -0700 Subject: [PATCH] Use shlex.split() on diamond_args; use --sensitive diamond option --- lib/idseq_utils/idseq_utils/diamond_scatter.py | 5 ++++- scripts/release.sh | 4 ++++ workflows/long-read-mngs/run.wdl | 4 ++-- workflows/short-read-mngs/non_host_alignment.wdl | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/idseq_utils/idseq_utils/diamond_scatter.py b/lib/idseq_utils/idseq_utils/diamond_scatter.py index 385301c1d..e1710171c 100644 --- a/lib/idseq_utils/idseq_utils/diamond_scatter.py +++ b/lib/idseq_utils/idseq_utils/diamond_scatter.py @@ -3,6 +3,7 @@ """ import os +import shlex import shutil import sys import errno @@ -71,8 +72,10 @@ def diamond_blastx( database, "--out", out, - f"--{diamond_args}", ] + + cmd.extend(shlex.split(diamond_args)) + for query in queries: cmd += ["--query", query] if chunk: diff --git a/scripts/release.sh b/scripts/release.sh index da13b1e74..ec0dc9884 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -28,6 +28,10 @@ else exit 1 fi +if [[ $WORKFLOW_NAME == long-read-mngs ]]; then + TAG="long-read-mngs-v0.7.6-branch-diamondsensitive" +fi + if [[ $( git branch --show-current) != "main" ]]; then COMMIT=$(git rev-parse --short HEAD) TAG=$TAG"-$COMMIT" diff --git a/workflows/long-read-mngs/run.wdl b/workflows/long-read-mngs/run.wdl index 820a5c85a..8c4794f59 100644 --- a/workflows/long-read-mngs/run.wdl +++ b/workflows/long-read-mngs/run.wdl @@ -612,7 +612,7 @@ task RunNRAlignment { if [[ "~{run_locally}" == true ]]; then diamond makedb --in "~{local_diamond_index}" -d reference - diamond blastx -d reference -q "~{assembled_reads_fa}" -o "diamond.m8" "--~{diamond_args}" + diamond blastx -d reference -q "~{assembled_reads_fa}" -o "diamond.m8" "~{diamond_args}" else python3 <