Skip to content

Commit 8eab264

Browse files
committed
Mapping non_scatter keys to valueFrom fields
1 parent c79511b commit 8eab264

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cwltool/workflow.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ def valueFromFunc(k, v):
224224
if "valueFrom" not in kwargs:
225225
kwargs["valueFrom"] = valueFromFunc
226226
if method == "dotproduct" or method is None:
227-
jobs = dotproduct_scatter(step, inputobj, basedir, scatter,
227+
non_scatter = [v for v in valueFrom if v not in scatter]
228+
jobs = dotproduct_scatter(step, inputobj, basedir, scatter, non_scatter,
228229
callback, **kwargs)
229230
elif method == "nested_crossproduct":
230231
jobs = nested_crossproduct_scatter(step, inputobj,
@@ -506,7 +507,7 @@ def setTotal(self, total):
506507
self.output_callback(self.dest, self.processStatus)
507508

508509

509-
def dotproduct_scatter(process, joborder, basedir, scatter_keys, output_callback, **kwargs):
510+
def dotproduct_scatter(process, joborder, basedir, scatter_keys, non_scatter_keys, output_callback, **kwargs):
510511
l = None
511512
for s in scatter_keys:
512513
if l is None:
@@ -525,6 +526,9 @@ def dotproduct_scatter(process, joborder, basedir, scatter_keys, output_callback
525526
for s in scatter_keys:
526527
jo[s] = kwargs["valueFrom"](s, joborder[s][n])
527528

529+
for s in non_scatter_keys:
530+
jo[s] = kwargs["valueFrom"](s, joborder[s])
531+
528532
for j in process.job(jo, basedir, functools.partial(rc.receive_scatter_output, n), **kwargs):
529533
yield j
530534

0 commit comments

Comments
 (0)