Skip to content

Commit

Permalink
List where parameter references & expressions are allowed (#110)
Browse files Browse the repository at this point in the history
and improve layout
  • Loading branch information
mr-c authored May 30, 2018
1 parent f06fba5 commit f49dc3e
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 24 deletions.
51 changes: 51 additions & 0 deletions _episodes/06-params.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,54 @@ Note that because `File` parameters are objects, to get the path to an
input file you must reference the path field on a file object; to
reference the path to the tar file in the above example you would write
`$(inputs.tarfile.path)`.

> ## Where are parameter references allowed?
> You can only use parameter references in certain fields. These are:
>
> - From [`CommandLineTool`](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandLineTool)
> - `arguments`
> - `valueFrom`
> - `stdin`
> - `stdout`
> - `stderr`
> - From [CommandInputParameter](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandInputParameter)
> - `format`
> - `secondaryFiles`
> - From [`inputBinding`](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandLineBinding)
> - `valueFrom`
> - From [CommandOutputParamater](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandOutputParameter)
> - `format`
> - `secondaryFiles`
> - From [CommandOutputBinding](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandOutputBinding)
> - `glob`
> - `outputEval`
> - From `Workflow`
> - From [InputParameter](http://www.commonwl.org/v1.0/Workflow.html#InputParameter) and [WorkflowOutputParameter](http://www.commonwl.org/v1.0/Workflow.html#WorkflowOutputParameter)
> - `format`
> - `secondaryFiles`
> - From `steps`
> - From [WorkflowStepInput](http://www.commonwl.org/v1.0/Workflow.html#WorkflowStepInput)
> - `valueFrom`
> - From [ExpressionTool](https://www.commonwl.org/v1.0/Workflow.html#ExpressionTool)
> - `expression`
> - From [InputParameter](http://www.commonwl.org/v1.0/Workflow.html#InputParameter) and [ExpressionToolOutputParameter](http://www.commonwl.org/v1.0/Workflow.html#ExpressionToolOutputParameter)
> - `format`
> - `secondaryFiles`
> - From [`ResourceRequirement`](http://www.commonwl.org/v1.0/CommandLineTool.html#ResourceRequirement)
> - `coresMin`
> - `coresMax`
> - `ramMin`
> - `ramMax`
> - `tmpdirMin`
> - `tmpdirMax`
> - `outdirMin`
> - `outdirMax`
> - From [`InitialWorkDirRequirement`](http://www.commonwl.org/v1.0/CommandLineTool.html#InitialWorkDirRequirement)
> - `listing`
> - in [Dirent](http://www.commonwl.org/v1.0/CommandLineTool.html#Dirent)
> - `entry`
> - `entryname`
> - From `EnvVarRequirement`
> - From [EnvironmentDef](http://www.commonwl.org/v1.0/CommandLineTool.html#EnvironmentDef)
> - `envValue`
{: .callout }
75 changes: 51 additions & 24 deletions _episodes/13-expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,30 +86,57 @@ 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:

- [`arguments`](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandLineTool)
- [`coresMin`](http://www.commonwl.org/v1.0/CommandLineTool.html#ResourceRequirement)
- [`coresMax`](http://www.commonwl.org/v1.0/CommandLineTool.html#ResourceRequirement)
- [`entry`](http://www.commonwl.org/v1.0/CommandLineTool.html#Dirent)
- [`entryname`](http://www.commonwl.org/v1.0/CommandLineTool.html#Dirent)
- `format` (in a [CommandInputParameter](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandInputParameter), [CommandOutputParamater](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandOutputParameter), [WorkflowOutputParameter](http://www.commonwl.org/v1.0/Workflow.html#WorkflowOutputParameter), or [ExpressionToolOutputParameter](http://www.commonwl.org/v1.0/Workflow.html#ExpressionToolOutputParameter))
- [`expression`](http://www.commonwl.org/v1.0/Workflow.html#ExpressionTool)
- [`envValue`](http://www.commonwl.org/v1.0/CommandLineTool.html#EnvironmentDef)
- [`glob`](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandOutputBinding)
- [`listing`](http://www.commonwl.org/v1.0/CommandLineTool.html#InitialWorkDirRequirement)
- [`outdirMin`](http://www.commonwl.org/v1.0/CommandLineTool.html#ResourceRequirement)
- [`outdirMax`](http://www.commonwl.org/v1.0/CommandLineTool.html#ResourceRequirement)
- [`outputEval`](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandOutputBinding)
- `secondaryFiles` (in a [CommandInputParameter](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandInputParameter), [CommandOutputParamater](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandOutputParameter), [WorkflowOutputParameter](http://www.commonwl.org/v1.0/Workflow.html#WorkflowOutputParameter), or [ExpressionToolOutputParameter](http://www.commonwl.org/v1.0/Workflow.html#ExpressionToolOutputParameter))
- [`ramMin`](http://www.commonwl.org/v1.0/CommandLineTool.html#ResourceRequirement)
- [`ramMax`](http://www.commonwl.org/v1.0/CommandLineTool.html#ResourceRequirement)
- [`stdin`](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandLineTool)
- [`stdout`](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandLineTool)
- [`stderr`](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandLineTool)
- [`tmpdirMin`](http://www.commonwl.org/v1.0/CommandLineTool.html#ResourceRequirement)
- [`tmpdirMax`](http://www.commonwl.org/v1.0/CommandLineTool.html#ResourceRequirement)
- `valueFrom` (in a [CommandLineBinding](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandLineBinding), or [WorkflowStepInput](http://www.commonwl.org/v1.0/Workflow.html#WorkflowStepInput))
> ## Where are parameter references allowed?
> Just like [parameter references]({{ page.root }}{% link _episodes/06-params.md %}), you can use JavaScript Expressions
> only in certain fields. These are:
>
> - From [`CommandLineTool`](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandLineTool)
> - `arguments`
> - `valueFrom`
> - `stdin`
> - `stdout`
> - `stderr`
> - From [CommandInputParameter](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandInputParameter)
> - `format`
> - `secondaryFiles`
> - From [`inputBinding`](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandLineBinding)
> - `valueFrom`
> - From [CommandOutputParamater](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandOutputParameter)
> - `format`
> - `secondaryFiles`
> - From [CommandOutputBinding](http://www.commonwl.org/v1.0/CommandLineTool.html#CommandOutputBinding)
> - `glob`
> - `outputEval`
> - From `Workflow`
> - From [InputParameter](http://www.commonwl.org/v1.0/Workflow.html#InputParameter) and [WorkflowOutputParameter](http://www.commonwl.org/v1.0/Workflow.html#WorkflowOutputParameter)
> - `format`
> - `secondaryFiles`
> - From `steps`
> - From [WorkflowStepInput](http://www.commonwl.org/v1.0/Workflow.html#WorkflowStepInput)
> - `valueFrom`
> - From [ExpressionTool](https://www.commonwl.org/v1.0/Workflow.html#ExpressionTool)
> - `expression`
> - From [InputParameter](http://www.commonwl.org/v1.0/Workflow.html#InputParameter) and [ExpressionToolOutputParameter](http://www.commonwl.org/v1.0/Workflow.html#ExpressionToolOutputParameter)
> - `format`
> - `secondaryFiles`
> - From [`ResourceRequirement`](http://www.commonwl.org/v1.0/CommandLineTool.html#ResourceRequirement)
> - `coresMin`
> - `coresMax`
> - `ramMin`
> - `ramMax`
> - `tmpdirMin`
> - `tmpdirMax`
> - `outdirMin`
> - `outdirMax`
> - From [`InitialWorkDirRequirement`](http://www.commonwl.org/v1.0/CommandLineTool.html#InitialWorkDirRequirement)
> - `listing`
> - in [Dirent](http://www.commonwl.org/v1.0/CommandLineTool.html#Dirent)
> - `entry`
> - `entryname`
> - From `EnvVarRequirement`
> - From [EnvironmentDef](http://www.commonwl.org/v1.0/CommandLineTool.html#EnvironmentDef)
> - `envValue`
{: .callout }


[file-prop]: http://www.commonwl.org/v1.0/CommandLineTool.html#File
Expand Down

0 comments on commit f49dc3e

Please sign in to comment.