Convert a value channel containing a list to queue channel #4609
-
|
I have a process which fetches the runs for a ncbi bioproject and saves them to a file, But, the problem with this is the map returns a value channel, so instead of broadcasting each value to downloadSRA process it just passes the entire list to the process.
tl;dr: How to create a Channel.of(someChannel.toList()) ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
I just needed another flatten and it works, although it feels very roundabout way of doing it |
Beta Was this translation helpful? Give feedback.
flattenis what you need, and you can make it a bit simpler:fetchRunAccesionsForBioProject() .map { it.readLines() } .flatten()The output of
fetchRunAccesionsForBioProjectis a value channel because it has no inputs. When a process has no inputs or all of its inputs are value channels, the output will also be a value channel.