From 2027c3d8f389c53fde14b22f23162bdd38b99f52 Mon Sep 17 00:00:00 2001 From: Luiz Irber Date: Tue, 25 Jun 2024 20:31:13 -0700 Subject: [PATCH] set executable for subprocess.run --- wort/blueprints/compute/tasks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wort/blueprints/compute/tasks.py b/wort/blueprints/compute/tasks.py index 63c83e9..3fcbc38 100644 --- a/wort/blueprints/compute/tasks.py +++ b/wort/blueprints/compute/tasks.py @@ -2,6 +2,7 @@ import os import shutil from io import BytesIO +import shlex from subprocess import run, CalledProcessError from tempfile import NamedTemporaryFile @@ -104,10 +105,11 @@ def compute_genomes(accession, path, name): "sourmash compute -k 21,31,51 " " --scaled 1000 " " --track-abundance " - " --name {name:q} " + " --name {shlex.quote(name)} " f" -o {f.name} " - f" <(curl {path})", + f" <(curl {path} | zcat)", shell=True, capture_output=True, check=True, + executable="/bin/bash", ) except CalledProcessError as e: # We ignore SIGPIPE, since it is informational (and makes sense,