Replies: 1 comment
-
I didn't realize the Anyway, the best solution I can think of at the moment is to add a
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am a happy user of the following pattern, which collects a number of process outputs and feeds them into a merge process:
This works great, until I ran into the problem where there is no output from
proc1
(e.g. empty sample), which ideally would have to finish the pipeline as usual, just not execute anything downstream ofproc1
. This doesnt work, since the channel has been made non-empty by the twotoList()
operators, and output is now[[]]
.If I instead use
collect()
, it runs fine, no empty lists are made and thus the merge process is not executed. Unfortunatelycollect
creates a problem in that it seems to flatten the results to a single list, so the sort step doesnt work. So my question is, am I doing this wrong completely or is there some way to set a channel to empty (or close it) when detecting e.g. this:This strikes me as non-intuitive, but I don't know really. Until then I'm going with the alternative in which I do e.g.
ifEmpty(['NA', 'NA', 'NA'])
, and detect the problem in downstream processes.Beta Was this translation helpful? Give feedback.
All reactions