Skip to content
Discussion options

You must be logged in to vote

The appropriate way to handle channels is to use channel operators. You can use the branch operator (docs here) for checking a condition. It will create N new channels, where N is the number of conditions that you described, distributing the channel elements according to your condition. If you want something more elaborate, you can also use a Nextflow process. If you want a process to only create tasks based on a condition, you can also use the when block (docs here).

The rule of thumb to remember: If you want to do something with a channel, you need to use a channel operator (or a process) 😉

Replies: 1 comment 1 reply

Comment options

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

Answer selected by saberiato
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants