You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update 02-1st-example.md
I added extra explanations about echo and the contents of the files the tutorial user should make, and the command they will execute.
I simplified the text about 'use a YAML or JSON object in a separate file' as it is very opaque to a beginner and didn't seem immediately relevant.
I included an explanation of how the specific command used here (cwl-runner 1st-tool.cwl echo-job.yml) is an example of the general form cwl-runner [tool-or-workflow-description] [input-job-settings].
Copy file name to clipboardExpand all lines: _episodes/02-1st-example.md
+22-9Lines changed: 22 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -13,25 +13,28 @@ keypoints:
13
13
- "Input values are specified in a separate YAML file."
14
14
- "The tool description and input files are provided as arguments to a CWL runner."
15
15
---
16
-
The simplest "hello world" program. This accepts one input parameter, writes a message to the terminal or job log, and produces no permanent output. CWL documents are written in [JSON][json] or [YAML][yaml], or a mix of the two.
16
+
The simplest "hello world" program. This accepts one input parameter, writes a message to the terminal or job log, and produces
17
+
no permanent output. CWL documents are written in [JSON][json] or [YAML][yaml], or a mix of the two.
17
18
18
-
First, create a file called 1st-tool.cwl, containing the boxed text below. It will help you to use a text editor that can be specified to produce text in YAML or JSON. Whatever text editor you use, the indents you see should not be created using tabs.
19
+
First, create a file called `1st-tool.cwl`, containing the boxed text below. It will help you to use a text editor that can be
20
+
specified to produce text in YAML or JSON. Whatever text editor you use, the indents you see should not be created using tabs.
19
21
20
22
*1st-tool.cwl*
21
23
~~~
22
24
{% include cwl/02-1st-example/1st-tool.cwl %}
23
25
~~~
24
26
{: .source}
25
27
26
-
Next, use a YAML or JSON object in a separate file to describe the input of a run:
28
+
Next, create a file called `echo-job.yml`, containing the following boxed text, which will describe the input of a run:
27
29
28
30
*echo-job.yml*
29
31
~~~
30
32
{% include cwl/02-1st-example/echo-job.yml %}
31
33
~~~
32
34
{: .source}
33
35
34
-
Now, invoke `cwl-runner` with the tool wrapper and the input object on the command line:
36
+
Now, invoke `cwl-runner` with the tool wrapper `1st-too.cwl` and the input object echo-job.yml on the command line. The command
37
+
is `cwl-runner 1st-tool.cwl echo-job.yml`. The boxed text below shows this command and the expected output.
35
38
36
39
~~~
37
40
$ cwl-runner 1st-tool.cwl echo-job.yml
@@ -45,22 +48,27 @@ Final process status is success
45
48
~~~
46
49
{: .output}
47
50
48
-
What's going on here? Let's break it down:
51
+
The command `cwl-runner 1st-tool.cwl echo-job.yml` is an example of a general form that you will often come across while using
52
+
CWL. The general form is `cwl-runner [tool-or-workflow-description] [input-job-settings]`
53
+
54
+
What's going on here? Let's break down the contents of `1st-tool.cwl`:
49
55
50
56
~~~
51
57
cwlVersion: v1.0
52
58
class: CommandLineTool
53
59
~~~
54
60
{: .source}
55
61
56
-
The `cwlVersion` field indicates the version of the CWL spec used by the document. The `class` field indicates this document describes a command line tool.
62
+
The `cwlVersion` field indicates the version of the CWL spec used by the document. The `class` field indicates this document
63
+
describes a command line tool.
57
64
58
65
~~~
59
66
baseCommand: echo
60
67
~~~
61
68
{: .source}
62
69
63
-
The `baseCommand` provides the name of program that will actually run (`echo`)
70
+
The `baseCommand` provides the name of program that will actually run (`echo`). [`echo`] is a built-in program in the bash and
71
+
C shells.
64
72
65
73
~~~
66
74
inputs:
@@ -71,7 +79,9 @@ inputs:
71
79
~~~
72
80
{: .source}
73
81
74
-
The `inputs` section describes the inputs of the tool. This is a list of input parameters and each parameter includes an identifier, a data type, and optionally an `inputBinding` which describes how this input parameter should appear on the command line. In this example, the `position` field indicates where it should appear on the command line.
82
+
The `inputs` section describes the inputs of the tool. This is a list of input parameters and each parameter includes an
83
+
identifier, a data type, and optionally an `inputBinding` which describes how this input parameter should appear on the command
84
+
line. In this example, the `position` field indicates where it should appear on the command line.
75
85
76
86
~~~
77
87
outputs: []
@@ -80,5 +90,8 @@ outputs: []
80
90
81
91
This tool has no formal output, so the `outputs` section is an empty list.
0 commit comments