Introduction
|
|
First Example
|
CWL documents are written in YAML and/or JSON.
The command called is specified with baseCommand .
Each expected input is described in the inputs section.
Input values are specified in a separate YAML file.
The tool description and input files are provided as arguments to a CWL runner.
|
Essential Input Parameters
|
Inputs are described in the inputs section of a CWL description.
Files should be described with class: File .
You can use the inputBinding section to describe where and how an input appears in the command.
|
Returning Output Files
|
Outputs are described in the outputs section of a CWL description.
The field outputBinding describes how to to set the value of each output parameter.
Wildcards are allowed in the glob field.
|
Capturing Standard Output
|
|
Parameter References
|
|
Running Tools Inside Docker
|
|
Additional Arguments and Parameters
|
Use the arguments section to describe command line options that do not correspond exactly to input parameters.
Runtime parameters provide information about the environment when the tool is actually executed.
Runtime parameters are referred under the runtime namespace.
|
Array Inputs
|
Array parameter definitions are nested under the type field with type: array .
The appearance of array parameters on the command line differs depending on with the inputBinding field is provided in the description.
Use the itemSeperator field to control concatenatation of array parameters.
|
Array Outputs
|
|
Advanced Inputs
|
|
Environment Variables
|
|
JavaScript Expressions
|
If InlineJavascriptRequirement is specified, you can include JavaScript expressions that will be evaulated by the CWL runner.
Expressions are only valid in certain fields.
Expressions should only be used when no built in CWL solution exists.
|
Creating Files at Runtime
|
|
Staging Input Files
|
|
File Formats
|
You can document the expected format of input and output File s.
Once your tool is mature, we recommend specifying formats by referencing existing ontologies e.g. EDAM.
|
Metadata and Authorship
|
|
Custom Types
|
You can create your own custom types to load into descriptions.
These custom types allow the user to configure the behaviour of a tool without tinkering directly with the tool description.
Custom types are described in separate YAML files and imported as needed.
|
Specifying Software Requirements
|
|
Writing Workflows
|
Each step in a workflow must have its own CWL description.
Top level inputs and outputs of the workflow are described in the inputs and outputs fields respectively.
The steps are specified under steps .
Execution order is determined by the flow of inputs and outputs between steps.
|
Nested Workflows
|
A workflow can be used as a step in another workflow, if the workflow engine supports the SubworkflowFeatureRequirement .
The workflows are specified under steps , with the worklow’s description file provided as the value to the run field.
Use default to specify a default value for a field, which can be overwritten by a value in the input object.
Use > to ignore newlines in long commands split over multiple lines.
|