Skip to content

DSL2: Can you emit: an optional output? #1980

Answered by pditommaso
Mxrcon asked this question in Q&A
Discussion options

You must be logged in to vote

The correct syntax is

nextflow.enable.dsl=2

process foo{

	output: 
	tuple val(a), file("*.txt")
	tuple val(b), file("*.tsv"), emit: test_channel, optional: true
	tuple val(c), file("*.csv")
	script:
	a = "1"
	b = "2"
	c = "3"
	"""
	touch nothing.txt
	touch nothing.csv
	"""
}

workflow{
 foo()
}

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@Mxrcon
Comment options

Comment options

You must be logged in to vote
3 replies
@Mxrcon
Comment options

@jonbra
Comment options

@g1ronn1mo
Comment options

Answer selected by Mxrcon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
5 participants