Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 474 Bytes

File metadata and controls

32 lines (20 loc) · 474 Bytes

Optional output

Problem

A task in your workflow is expected to not create an output file in some circumstances.

Solution

Declare such output as an optional file.

Code

process foo {
  output:
  file 'foo.txt' optional true into foo_ch

  script:
  '''
  your_command
  '''
}

Run it

Use the the following command to execute the example:

nextflow run patterns/optional-output.nf