Open mahesh-panchal opened 10 months ago
Throw an error on a empty channel:
params.something = 'test'
workflow {
ch_in = Channel.empty()
.ifEmpty{ error "Error" }
.filter{ it != null }
TASK( ch_in ).view()
}
process TASK{
input:
val message
script:
"""
echo $message
"""
output:
stdout
}
How to use a function or closure to group channel operations
Is your feature request related to a problem? Please describe.
It would be good to have a place to describe implementation patterns to common issues encountered by developers.
Describe the solution you'd like
A page with the implementation patterns that's easy to look up.
Additional context
Going through some code reviews, some common implementation issues pop up, that are sometimes addressed in strange ways. It would be nice to provide some best practice ways to deal with certain scenarios.
Examples:
collectFile
withmeta
information.storeDir
instead ofpublishDir
.combine
to make a Cartesian product of inputs vs indexes, andmap
and+
to merge metadata appropriately.