user
07/09/2024, 5:42 PM@Factory
DataflowWriteChannel<Path> fromWebApi() {
downloadFileFromWebApi(downloadTo = 'foo.txt')
def result = Channel.fromPath('foo.txt')
return result
}
Nextflow does not seem to like this, and I am not sure why. Specifically, I get ERROR ~ Channels cannot be used as output in more than one process or operator.
Firstly, it is not clear why this constrain exists.
Secondly, I tried different operators to make a copy of the channel, but still get the same error.
How can I implement this channel factory without having to manually re-implement channel.fromPath?