Skip to content

Commit

Permalink
dispatch from pythonpath
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Oct 2, 2024
1 parent 112038a commit 9cd429f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/depiction_targeted_preproc/workflow/snakemake_invoke.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import contextlib
import os
import shlex
import shutil
import subprocess
from dataclasses import dataclass
from pathlib import Path

import sys
from loguru import logger


Expand Down Expand Up @@ -95,11 +95,10 @@ def _invoke_subprocess(self, work_dir: Path, result_files: list[Path], extra_arg
)

def get_base_command(self, extra_args: list[str], work_dir: Path) -> list[str]:
snakemake_bin = shutil.which("snakemake")
if snakemake_bin is None:
raise RuntimeError(f"snakemake not found, check PATH: {os.environ['PATH']}")
return [
snakemake_bin,
sys.executable,
"-m",
"snakemake",
"-d",
str(work_dir.absolute()),
"--cores",
Expand Down

0 comments on commit 9cd429f

Please sign in to comment.