Hello, I am working on implementing a channel fact...
# nextflow-plugins
u
Hello, I am working on implementing a channel factory plugin. It effectively looks like this:
Copy code
@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
?