Workflow API classes

CWL Workflow

Workflow

class cwlgen.workflow.Workflow(workflow_id=None, label=None, doc=None, cwl_version='v1.0', inputs=None, outputs=None, steps=None, requirements=None, hints=None)[source]

A workflow describes a set of steps and the dependencies between those steps. When a step produces output that will be consumed by a second step, the first step is a dependency of the second step.

Documentation: https://www.commonwl.org/v1.0/Workflow.html#Workflow

__init__(workflow_id=None, label=None, doc=None, cwl_version='v1.0', inputs=None, outputs=None, steps=None, requirements=None, hints=None)[source]
Parameters:
  • workflow_id (STRING) – The unique identifier for this process object.
  • label (STRING) – A short, human-readable label of this process object.
  • doc (STRING) – A long, human-readable description of this process object.
  • cwl_version (CWLVersion) – CWL document version. Always required at the document root. Default: ‘v1.0’
export(outfile=None)[source]

Export the workflow in CWL either on STDOUT or in outfile.

Inputs and Outputs

InputParameter

class cwlgen.workflow.InputParameter(param_id, label=None, secondary_files=None, param_format=None, streamable=None, doc=None, input_binding=None, default=None, param_type=None)[source]

Documentation: https://www.commonwl.org/v1.0/Workflow.html#InputParameter

__init__(param_id, label=None, secondary_files=None, param_format=None, streamable=None, doc=None, input_binding=None, default=None, param_type=None)[source]
Parameters:
  • param_id (STRING) – unique identifier for this parameter
  • label (STRING) – short, human-readable label
  • secondary_files (STRING) – If type is a file, describes files that must be included alongside the primary file(s)
  • param_format (STRING) – If type is a file, uri to ontology of the format or exact format
  • streamable (BOOLEAN) – If type is a file, true indicates that the file is read or written sequentially without seeking
  • doc (STRING) – documentation
  • param_type (STRING corresponding to CWLType) – type of data assigned to the parameter
  • input_binding (CommandLineBinding) –

WorkflowStep

class cwlgen.workflow.WorkflowStep(step_id, run, label=None, doc=None, scatter=None, scatter_method=None)[source]

A workflow step is an executable element of a workflow. It specifies the underlying process implementation (such as CommandLineTool or another Workflow) in the run field and connects the input and output parameters of the underlying process to workflow parameters.

Documentation: https://www.commonwl.org/v1.0/Workflow.html#WorkflowStep

__init__(step_id, run, label=None, doc=None, scatter=None, scatter_method=None)[source]
Parameters:
  • step_id (STRING) – The unique identifier for this workflow step.
  • run (STRING | CommandLineTool | ExpressionTool | Workflow) – Specifies the process to run.
  • label (STRING) – A short, human-readable label of this process object.
  • doc (STRING | list[STRING]) – A long, human-readable description of this process object.
  • scatter (STRING | list[STRING]) – Field to scatter on, see: https://www.commonwl.org/v1.0/Workflow.html#WorkflowStep
  • scatter_method (STRING | list[STRING] in [dotproduct, nested_crossproduct, flat_crossproduct]) – Required if scatter is an array of more than one element.