Skip to content

Commit ba35fb4

Browse files
rmccolemr-c
authored andcommitted
explanations about echo and file contents
* 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].
1 parent 69d9af1 commit ba35fb4

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

_episodes/02-1st-example.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,28 @@ keypoints:
1313
- "Input values are specified in a separate YAML file."
1414
- "The tool description and input files are provided as arguments to a CWL runner."
1515
---
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.
1718

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.
1921

2022
*1st-tool.cwl*
2123
~~~
2224
{% include cwl/02-1st-example/1st-tool.cwl %}
2325
~~~
2426
{: .source}
2527

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:
2729

2830
*echo-job.yml*
2931
~~~
3032
{% include cwl/02-1st-example/echo-job.yml %}
3133
~~~
3234
{: .source}
3335

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.
3538

3639
~~~
3740
$ cwl-runner 1st-tool.cwl echo-job.yml
@@ -45,22 +48,27 @@ Final process status is success
4548
~~~
4649
{: .output}
4750

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`:
4955

5056
~~~
5157
cwlVersion: v1.0
5258
class: CommandLineTool
5359
~~~
5460
{: .source}
5561

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.
5764

5865
~~~
5966
baseCommand: echo
6067
~~~
6168
{: .source}
6269

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.
6472

6573
~~~
6674
inputs:
@@ -71,7 +79,9 @@ inputs:
7179
~~~
7280
{: .source}
7381

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.
7585

7686
~~~
7787
outputs: []
@@ -80,5 +90,8 @@ outputs: []
8090

8191
This tool has no formal output, so the `outputs` section is an empty list.
8292

83-
[json]: https://json.org
93+
[json]: http://json.org
94+
[yaml]: http://yaml.org
95+
[echo]: http://www.linfo.org/echo.html
96+
8497
{% include links.md %}

0 commit comments

Comments
 (0)