【发布时间】:2021-03-03 10:38:42
【问题描述】:
使用 NextFlow (DSL=2),我想使用文件的每一行作为工作流的流输入。
nextflow.enable.dsl=2
process bar {
input: val data
output: val result
exec:
result = data.toUpperCase()
}
workflow {
myFile = file('input_test.txt')
myReader = myFile.newReader()
myFile.withInputStream {
String line
while( line = myReader.readLine() ) {
channel.from(line) | bar | view
}
}
}
我面临的问题是我只能使用一次“bar”进程:
Process 'bar' has been already used -- If you need to reuse the same component include it with a different name or include in a different workflow context
我还尝试创建一个从线路和呼叫栏获取通道的子工作流。
有没有办法使用 Nextflow 将流数据用作输入?
注意:我的最终目标不仅仅是应用大写函数。我想在数据流上链接几个复杂的过程。
谢谢!
【问题讨论】:
标签: java-stream workflow nextflow