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

fix: create jobname with wildcards of all jobs in job groups #8

Merged
merged 2 commits into from
Jun 3, 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
16 changes: 14 additions & 2 deletions snakemake_executor_plugin_lsf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,21 @@ def run_job(self, job: JobExecutorInterface):
# with job_info being of type
# snakemake_interface_executor_plugins.executors.base.SubmittedJobInfo.

log_folder = f"group_{job.name}" if job.is_group() else f"rule_{job.name}"
if job.is_group():
# use the group name, which is in groupid
log_folder = f"group_{job.groupid}"
# get all wildcards of all the jobs in the group and
# prepend each with job name, as wildcards of same
# name can contain different values across jobs
wildcard_dict = {
f"{j.name}__{k}": v
for j in job.jobs
for k, v in j.wildcards_dict.items()
}
else:
log_folder = f"rule_{job.name}"
wildcard_dict = job.wildcards_dict

wildcard_dict = job.wildcards_dict
if wildcard_dict:
wildcard_dict_noslash = {
k: v.replace("/", "___") for k, v in wildcard_dict.items()
Expand Down
Loading