From 72ca008bc63aaadc4fb7b2e67b2e470f62be0253 Mon Sep 17 00:00:00 2001 From: lvreynoso Date: Wed, 8 May 2024 14:47:18 -0700 Subject: [PATCH] Move diamond changes to another branch --- lib/idseq_utils/idseq_utils/diamond_scatter.py | 12 ++---------- scripts/release.sh | 4 ---- workflows/diamond/Dockerfile | 6 +++--- workflows/diamond/diamond.wdl | 4 ++-- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/lib/idseq_utils/idseq_utils/diamond_scatter.py b/lib/idseq_utils/idseq_utils/diamond_scatter.py index 10ad3c8af..385301c1d 100644 --- a/lib/idseq_utils/idseq_utils/diamond_scatter.py +++ b/lib/idseq_utils/idseq_utils/diamond_scatter.py @@ -3,7 +3,6 @@ """ import os -import shlex import shutil import sys import errno @@ -72,15 +71,8 @@ def diamond_blastx( database, "--out", out, + f"--{diamond_args}", ] - - # backwards compatibility for function calls that expect this function - # to automatically append "--" to diamond_args - if diamond_args == "long-reads" or diamond_args == "mid-sensitive": - diamond_args = "--" + diamond_args - - cmd.extend(shlex.split(diamond_args)) - for query in queries: cmd += ["--query", query] if chunk: @@ -238,7 +230,7 @@ def blastx_join(chunk_dir: str, out: str, diamond_args: str, *query: str): diamond_blastx( cwd=tmp_dir, par_tmpdir="par-tmp", - block_size=1, + block_size=100 if "long-reads" in diamond_args else 10, database=db.name, out=out, join_chunks=chunks, diff --git a/scripts/release.sh b/scripts/release.sh index ec0dc9884..da13b1e74 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -28,10 +28,6 @@ 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/diamond/Dockerfile b/workflows/diamond/Dockerfile index c24bb2e0f..806ef944a 100644 --- a/workflows/diamond/Dockerfile +++ b/workflows/diamond/Dockerfile @@ -19,7 +19,7 @@ WORKDIR /tmp RUN git clone https://github.com/chanzuckerberg/czid-workflows WORKDIR /tmp/czid-workflows RUN pip3 install -r requirements-dev.txt +RUN git checkout rlim-add-diamond-modification +RUN cp short-read-mngs/idseq_utils/idseq_utils/diamond_scatter.py /usr/local/bin/ -COPY --from=lib idseq_utils/idseq_utils/diamond_scatter.py /usr/local/bin/ - -WORKDIR /workdir +WORKDIR /workdir \ No newline at end of file diff --git a/workflows/diamond/diamond.wdl b/workflows/diamond/diamond.wdl index 7a8f2f814..35af2d033 100644 --- a/workflows/diamond/diamond.wdl +++ b/workflows/diamond/diamond.wdl @@ -34,7 +34,7 @@ task RunDiamond { } command <<< - python3 /usr/local/bin/diamond_scatter.py blastx-chunk --db ~{db_chunk} --query ~{query_0} ~{if defined(query_1) then '--query ~{query_1}' else ''} --out-dir chunks --diamond-args="~{extra_args}" + python3 /usr/local/bin/diamond_scatter.py blastx-chunk --db ~{db_chunk} --query ~{query_0} ~{if defined(query_1) then '--query ~{query_1}' else ''} --out-dir chunks --diamond-args "~{extra_args}" >>> output { @@ -45,4 +45,4 @@ task RunDiamond { runtime { docker: docker_image_id } -} +} \ No newline at end of file