How can I ensure that processes respect the order of a queue channel? #5156
-
Hello there, As the title suggests, I'm struggling with how to ensure that processes respect the order of a queue channel (correct me here if it is not) and process its elements in sequence? I am using version 23.10.1 and have the following process that should take into account the order of the channel
The
I have shortened the paths here for display purposes, in the original they are complete and exist. Sorting my channel based on the first element works. The script does not throw an error and the process is created and executed 10 times. However, the order of my previously sorted channel is not taken into account. The choice of elements that are processed first appears random. I have run the script several times and the choice of the first element of the process appears random and not sorted. I tried to force the process with Is there anything else I can try or am I missing something? I would appreciate support and answers! EDIT: Typos |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
The Why do you need to ensure that the inputs are processed in order? |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer. I am working with large data sets from a sequencer that contains several different samples. I have already built a very large pipeline with Nextflow for my analysis. Since parts of the analysis take a very long time, it would be advantageous to send the samples with a higher weighting through this process first, so that they can already be forwarded to the next processes. Background: I have programmed a GUI for this analysis that is to be made available to several users. I would like some samples to be considered first by the analysis. To do this, I allow the user to assign a priority order to the samples in advance so that I can sort the samples within Nextflow in the channel and start the processes accordingly. |
Beta Was this translation helpful? Give feedback.
I see. I'm not sure if that can be done at the moment. It might become possible once we make the process syntax more flexible, because then you would be able to invoke the tasks in a specific order. But it is not possible right now