pipeline - 如何将流程输出发送到 Nextflow 中的多个 channel ?

标签 pipeline nextflow

我正在实现一个 Nextflow 工作流程,其中每个流程都可以提供不同流程下游可能需要的多个输出。

process multiple_outputs {
   input:
   tuple id, input from previous_process

   output:
   tuple id, input_for_a, input_for_b, input_for_a_b into downstream
}

Nextflow 文档指出 operator into can use multiple channelspromotes channel duplication as a pattern .

但是这些选项似乎都不适用于 the process primitivemultiple channel output is not documented :

  • 模式found on this answer (语法错误):

    output:
    tuple id, input_for_a, input_for_b, input_for_a_b into { downstream_a; downstream_b }
    // nor these variants:
    //
    // `into { downstream_a, downstream_b }`
    // `into downstream_a, downstream_b`
    // `into tuple a, b`
    
  • 将输出重复到重复的 channel (一个 channel 为空):

    output:
    tuple id, input_for_a, input_for_a_b into downstream_a
    tuple id, input_for_b, input_for_a_b into downstream_b
    // runs, but cannot find the file in one of the channels
    

在多个 channel 中使用输出的正确方法是什么?

最佳答案

输出声明应该是:

output:
tuple id, input_for_a, input_for_b, input_for_a_b into(downstream_a, downstream_b)

或者,您可能需要考虑使用不再有单 channel 使用要求的 DLS2。了解更多相关信息here .

关于pipeline - 如何将流程输出发送到 Nextflow 中的多个 channel ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62706742/

相关文章:

bash - 将流程脚本中生成的文件内容保存到 Nextflow 变量中

Nextflow DSL2 : how to combine outputs (channels) from multiple processes into input of another process by part of filename?

scikit-learn - 将管道与 GridSearchCV 一起使用

bash - 为什么 tee 等待所有子 shell 完成?

c - (Asterisk PBX) 如何从 features.conf 中的 asterisk agi 控制用 C 编写的程序

benchmarking - 基准 channel 创建 NextFlow

docker - Nextflow配置文件问题

c++ - 相当于 DirectX 渲染状态的 OpenGL

amazon-web-services - 通过 CloudFormation 将函数动态附加到 AppSync Pipeline Resolver

nextflow - 如何强制 Nextflow 流程重新计算并忽略恢复工作流程中的缓存