You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior: I should either be able to name a stdout output, or not
Actual: I can name a stdout output as long as it is part of a tuple, even if it's the only entry in the tuple
Steps to reproduce the problem
process sayHello {
input:
val number
output:
path("*.txt"), emit: test1
tuple stdout, emit: test2
script:
"""
echo "Hello ${number}" | tee test_${number}.txt
"""
}
workflow {
test = Channel.of(1, 2, 3)
sayHello(test)
sayHello.out.test2.view()
}
This runs sucessfully but produces a warning: WARN: Output tuple must define at least two elements -- Check process sayHello
On the other hand, this will not run:
process sayHello {
input:
val number
output:
path("*.txt"), emit: test1
stdout, emit: test2
script:
"""
echo "Hello ${number}" | tee test_${number}.txt
"""
}
workflow {
test = Channel.of(1, 2, 3)
sayHello(test)
sayHello.out.test2.view()
}
You can think of stdout like a function call. Because there is no positional argument like there is for val or path, you don't need the comma before the emit option.
Also, I plopped this code into the VS Code extension (now with built-in language server) and it gave a better error message:
The language server uses a more strict parser that will be integrated into Nextflow itself in the future, so you'll get the better error either way. Hope this clears things up
Bug report
Expected behavior and actual behavior
Expected behavior: I should either be able to name a stdout output, or not
Actual: I can name a stdout output as long as it is part of a tuple, even if it's the only entry in the tuple
Steps to reproduce the problem
This runs sucessfully but produces a warning:
WARN: Output
tuplemust define at least two elements -- Check process sayHello
On the other hand, this will not run:
Error:
Environment
Additional context
Not sure if this a bug or a feature request. Thanks!
The text was updated successfully, but these errors were encountered: