【发布时间】:2019-01-02 17:20:07
【问题描述】:
我有一个进程A,它将文件输出到通道outA。我想将该文件用作 3 个下游进程 B、C 和 D 的输入。由于创建的频道outA默认是队列频道,所以我不能直接多次使用该文件(与价值频道不同)。
目前,我使用into 运算符复制频道outA,如here 所述(参见下面的代码)。
我还知道您可以通过执行Channel.value(file('/path/to/file.txt')) 从文件创建价值渠道。
我目前的代码:
// Upstream process creating a queue channel with one file
process A {
output:
file outA
"echo 'Bonjour le monde !' > $outA"
}
// Queue channel triplication
outA.into {inB; inC; inD}
// Downstream processes all using the same file
process B {
input:
file inB
"script of process B $inB"
}
process C {
input:
file inC
"script of process C $inC"
}
process D {
input:
file inD
"script of process D $inD"
}
我工作正常,但我想知道是否可以将队列通道outA 转换为值通道,以便我可以使用相同的通道作为进程 B、C 和 D 的输入.
【问题讨论】:
标签: nextflow