Skip to content

Commit 481ea75

Browse files
tom-tanmr-c
andauthored
Add explanation of what happens when modifying basename (#401)
* Add explanation of what happens when modifying `basename` make the example complete --------- Co-authored-by: Michael R. Crusoe <1330696+mr-c@users.noreply.github.com>
1 parent dbeb91c commit 481ea75

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/faq.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,15 @@ This example demonstrates how to change the name of an output file
6262
from the default name given to it by a tool:
6363
6464
```yaml
65-
cwlVersion: v1.0 # or v1.1
65+
cwlVersion: v1.0
6666
class: CommandLineTool
6767
requirements:
6868
InlineJavascriptRequirement: {}
6969

70-
baseCommand: []
70+
baseCommand: [ touch, otu_table.txt ]
7171

72-
inputs: []
72+
inputs:
73+
otu_table_name: string
7374

7475
outputs:
7576
otu_table:
@@ -79,6 +80,9 @@ outputs:
7980
outputEval: ${self[0].basename=inputs.otu_table_name; return self;}
8081
```
8182
83+
By modifying the `basename` field in the `outputEval` field, CWL workflow engines will rename
84+
the file using the new name for subsequent steps or as a workflow-level output.
85+
8286
## How do I reference a local script?
8387

8488
There are two ways to reference a local script:

0 commit comments

Comments
 (0)