Skip to content

Commit f23f6f4

Browse files
authored
use merge_nested instead
1 parent 6cfc2a8 commit f23f6f4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

_extras/miscellaneous.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,18 @@ outputs: []
133133

134134
Using [`MultipleInputFeatureRequirement`](https://www.commonwl.org/v1.0/Workflow.html#MultipleInputFeatureRequirement)
135135
along with
136-
[`linkMerge: merge_flattened`](https://www.commonwl.org/v1.0/Workflow.html#WorkflowStepInput)
136+
[`linkMerge: merge_nested`](https://www.commonwl.org/v1.0/Workflow.html#WorkflowStepInput)
137137

138-
> merge_flattened
138+
> merge_nested
139139

140-
> 1. The source and sink parameters must be compatible types,
141-
> or the source type must be compatible with single element from the "items" type of the destination array parameter.
142-
> 2. Source parameters which are arrays are concatenated.
143-
> Source parameters which are single element types are appended as single elements.
140+
> The input must be an array consisting of exactly one entry for each input link.
141+
> If "merge_nested" is specified with a single link, the value from the link must be wrapped in a single-item list.
142+
143+
Which means "create a list with exactly these sources as elements"
144144

145145
Or in other words: if the destination is of type `File[]` (an array of `File`s)
146-
and the source is a single `File` then add `MultipleInputFeatureRequirement` to the `requirements`
147-
and add `linkMerge: merge_flattened` under the appropriate `in` entry of the destination step.
146+
and the source is a single `File` then add `MultipleInputFeatureRequirement` to the Workflow level `requirements`
147+
and add `linkMerge: merge_nested` under the appropriate `in` entry of the destination step.
148148

149149
```yaml
150150
cwlVersion: v1.0
@@ -162,7 +162,7 @@ steps:
162162
in:
163163
cat_in: # type is File[]
164164
source: [ readme ] # but the source is of type File
165-
linkMerge: merge_flattened
165+
linkMerge: merge_nested
166166
out: [txt]
167167
168168
outputs:

0 commit comments

Comments
 (0)