Skip to content

Commit

Permalink
feat: Conda support for HTSinfer workflow (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
uniqueg authored Feb 11, 2024
1 parent 5e2556e commit 32c9156
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions zarp/snakemake/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,35 +65,7 @@ def compile_command(self, snakefile: Path) -> List[str]:
bind_paths_str: List[str]
bind_paths_arg: str
if self.run_config.dependency_embedding == "CONDA":
# Conda is currently not supported for the HTSinfer workflow
if snakefile.name == "htsinfer.smk":
cmd_ls.append("--use-singularity")
bind_paths = [
self.exec_dir,
self.run_config.working_directory,
self.run_config.zarp_directory,
os.environ.get("TMP"),
os.environ.get("TMPDIR"),
]
bind_paths_str = list(
set(str(item) for item in bind_paths if item is not None)
)
if self.bind_paths is not None:
bind_paths_str.extend(
[str(path) for path in self.bind_paths]
)
bind_paths_str = [
item for item in bind_paths_str if item != DUMMY_DATA
]
bind_paths_arg = ",".join(bind_paths_str)
cmd_ls.extend(
["--singularity-args", f"--bind {bind_paths_arg}"])
LOGGER.warning(
"Conda not supported for HTSinfer workflow."
" Using Singularity instead."
)
else:
cmd_ls.append("--use-conda")
cmd_ls.append("--use-conda")
elif self.run_config.dependency_embedding == "SINGULARITY":
cmd_ls.append("--use-singularity")
bind_paths = [
Expand Down

0 comments on commit 32c9156

Please sign in to comment.