Skip to content

Commit

Permalink
Move diamond changes to another branch
Browse files Browse the repository at this point in the history
  • Loading branch information
lvreynoso committed May 8, 2024
1 parent 8e399f2 commit 72ca008
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
12 changes: 2 additions & 10 deletions lib/idseq_utils/idseq_utils/diamond_scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""

import os
import shlex
import shutil
import sys
import errno
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 0 additions & 4 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions workflows/diamond/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions workflows/diamond/diamond.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -45,4 +45,4 @@ task RunDiamond {
runtime {
docker: docker_image_id
}
}
}

0 comments on commit 72ca008

Please sign in to comment.