Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Conda support for HTSinfer workflow #87

Merged
merged 1 commit into from
Feb 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading