Skip to content

Mapping non_scatter keys to valueFrom fields #54

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

Merged
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
8 changes: 6 additions & 2 deletions cwltool/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ def valueFromFunc(k, v):
if "valueFrom" not in kwargs:
kwargs["valueFrom"] = valueFromFunc
if method == "dotproduct" or method is None:
jobs = dotproduct_scatter(step, inputobj, basedir, scatter,
non_scatter = [v for v in valueFrom if v not in scatter]
jobs = dotproduct_scatter(step, inputobj, basedir, scatter, non_scatter,
callback, **kwargs)
elif method == "nested_crossproduct":
jobs = nested_crossproduct_scatter(step, inputobj,
Expand Down Expand Up @@ -506,7 +507,7 @@ def setTotal(self, total):
self.output_callback(self.dest, self.processStatus)


def dotproduct_scatter(process, joborder, basedir, scatter_keys, output_callback, **kwargs):
def dotproduct_scatter(process, joborder, basedir, scatter_keys, non_scatter_keys, output_callback, **kwargs):
l = None
for s in scatter_keys:
if l is None:
Expand All @@ -525,6 +526,9 @@ def dotproduct_scatter(process, joborder, basedir, scatter_keys, output_callback
for s in scatter_keys:
jo[s] = kwargs["valueFrom"](s, joborder[s][n])

for s in non_scatter_keys:
jo[s] = kwargs["valueFrom"](s, joborder[s])

for j in process.job(jo, basedir, functools.partial(rc.receive_scatter_output, n), **kwargs):
yield j

Expand Down