Skip to content

Consistent formatting and additional array detail #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _episodes/02-1st-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The simplest "hello world" program. This accepts one input parameter, writes a
~~~
{: .source}

Use a YAML object in a separate file to describe the input of a run:
Use a YAML or JSON object in a separate file to describe the input of a run:

*echo-job.yml*
~~~
Expand Down
6 changes: 4 additions & 2 deletions _episodes/09-array-inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,7 @@ In addition, the `itemSeperator` field, if provided, specifies that array
values should be concatenated into a single argument separated by the item
separator string.

You can specify arrays of arrays, arrays of records, and other complex
types.
Note that the arrays of inputs are specified inside square brackets `[]` in `array-inputs-job.yml`. Arrays can also be expressed over multiple lines, where
array values that are not defined with an associated key is marked by a leading
`-`, as demonstrated in the next lesson.
You can specify arrays of arrays, arrays of records, and other complex types.
4 changes: 4 additions & 0 deletions _episodes/10-array-outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@ Final process status is success
}
~~~
{: .output}

The array of expected outputs is specified in `array-outputs-job.yml` with each
entry marked by a leading `-`. This format can also be used in CWL descriptions
to mark entries in arrays, as demonstrated in several of the upcoming sections.
11 changes: 10 additions & 1 deletion _episodes/13-expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ See the [list of recommended practices][rec-practices].__
~~~
{: .source}

As this tool does not require any `inputs` we can run it with an (almost) empty job file:
As this tool does not require any `inputs` we can run it with an (almost) empty
job file:

*empty.yml*

Expand All @@ -40,6 +41,10 @@ As this tool does not require any `inputs` we can run it with an (almost) empty
~~~
{: .source}

`empty.yml` contains a description of an empty JSON object. JSON objects
descriptions are contained inside curly brackets `{}`, so an empty object is
represented simply by a set of empty brackets.

We can then run `expression.cwl`:

~~~
Expand All @@ -51,6 +56,10 @@ Final process status is success
~~~
{: .output}

Note that requirements must be provided as an array, with each entry (in this
case, only `class: InlineJavascriptRequirement`) marked by a `-`. The same
syntax is used to describe the additional command line arguments.

You can only use expressions in certain fields. These are:

- `filename`
Expand Down
28 changes: 14 additions & 14 deletions _includes/cwl/record.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ inputs:
prefix: -B
exclusive_parameters:
type:
- type: record
name: itemC
fields:
itemC:
type: string
inputBinding:
prefix: -C
- type: record
name: itemD
fields:
itemD:
type: string
inputBinding:
prefix: -D
type: record
name: itemC
fields:
itemC:
type: string
inputBinding:
prefix: -C
type: record
name: itemD
fields:
itemD:
type: string
inputBinding:
prefix: -D
outputs: []
baseCommand: echo