In DSL2: Process only executed once even though channel is populated by 8 filepairs. #3954
-
In DSL2: Process only executed once even though channel is populated by 8 filepairs. I have the following short script which I want to use to trim my fastq files, however it only processes the first filepair (sample1), any idea why? nextflow.enable.dsl=2 log.info """\
process trimming {
} workflow { |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
The first task of this process consumes the first item from This results in the trimming_ch having zero items and the read_pairs_ch having 7 items. Since trimming_ch is empty, no additional tasks start. At least this is my hunch without testing but based on prior experience. |
Beta Was this translation helpful? Give feedback.
-
@J-81 is correct above. You have two queue channels as input to your process and one of them has a single element, which means the process will not generate a task as long as there aren't elements for both inputs to be consumed. One solution is to have the single-element channel as a value channel. Value channels are single-element channels that can be consumed indefinitely. You can do |
Beta Was this translation helpful? Give feedback.
-
Hey @J-81, hey @mribeirodantas , It was as you suspected, that the trimming channel only had only 1 item in the channel. Thanks for the help, it's running nicely now! Best, |
Beta Was this translation helpful? Give feedback.
@J-81 is correct above. You have two queue channels as input to your process and one of them has a single element, which means the process will not generate a task as long as there aren't elements for both inputs to be consumed.
One solution is to have the single-element channel as a value channel. Value channels are single-element channels that can be consumed indefinitely. You can do
trimming_ch.first()
to turn it into a value channel, for example.