Skip to content
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

List where parameter references & expressions are allowed #110

Merged
merged 4 commits into from
May 30, 2018
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
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