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

Add workaround for compatibility with WDL workflows that expect the user to have access to task-level outputs #5093

Closed
adamnovak opened this issue Sep 17, 2024 · 1 comment · Fixed by #5096
Assignees
Labels

Comments

@adamnovak
Copy link
Member

adamnovak commented Sep 17, 2024

The ENCODE ATAC-seq workflow produces important files as task-level outputs. But since it has a workflow-level output section that does not include them, Toil discards them.

We should allow the user to override the WDL spec and preserve/export task outputs instead of or in addition to any workflow-level outputs, to support running this workflow and any others like it.

We probably need to touch here:

toil/src/toil/wdl/wdltoil.py

Lines 3394 to 3414 in 8faca0f

if self._workflow.outputs is None:
# The output section is not declared
# So get all task outputs and return that
# First get all task output names
output_set = set()
for call in self._workflow.body:
if isinstance(call, WDL.Tree.Call):
for type_binding in call.effective_outputs:
output_set.add(type_binding.name)
# Collect all bindings that are task outputs
output_bindings: WDL.Env.Bindings[WDL.Value.Base] = WDL.Env.Bindings()
for binding in unwrap(self._bindings):
if binding.name in output_set:
# The bindings will already be namespaced with the task namespaces
output_bindings = output_bindings.bind(binding.name, binding.value)
else:
# Output section is declared and is nonempty, so evaluate normally
# Combine the bindings from the previous job
with monkeypatch_coerce(standard_library):
output_bindings = evaluate_output_decls(self._workflow.outputs, unwrap(self._bindings), standard_library)

┆Issue is synchronized with this Jira Story
┆Issue Number: TOIL-1646

@adamnovak adamnovak added the wdl label Sep 17, 2024
@unito-bot
Copy link

➤ Adam Novak commented:

We might want to have some magic to sniff out this particular workflow (or maybe anything with croo metadata) and turn this on by default, to annoy the fewest users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants