DSL2: Can you emit: an optional output? #1980
-
Hello there! I'm studying nextflow, specially with the DSL2 and I'm trying to name an optional output, my code is here:
I'm trying to emit and optional output and nextflow returns me this error:
This feature exists? or should I request it? Thanks for your attention. |
Beta Was this translation helpful? Give feedback.
Answered by
pditommaso
Apr 1, 2021
Replies: 2 comments 4 replies
-
Hi! I had this issue before, and its actually a really easy fix! nextflow.enable.dsl=2
process foo{
output:
tuple val(a), file("*.txt")
tuple val(b), file("*.tsv"), emit: test_channel optional true // this line is only change
tuple val(c), file("*.csv")
script:
a = "1"
b = "2"
c = "3"
"""
touch nothing.txt
touch nothing.csv
"""
}
workflow{
foo()
}
|
Beta Was this translation helpful? Give feedback.
1 reply
-
The correct syntax is
|
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Mxrcon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The correct syntax is