【问题标题】:How do I send a process output to multiple channels in Nextflow?如何将流程输出发送到 Nextflow 中的多个通道?
【发布时间】:2020-07-07 17:19:49
【问题描述】:

我正在实施 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`
    
  • 重复输出到重复的通道(一个通道是空的):

    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
    

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

【问题讨论】:

    标签: pipeline nextflow


    【解决方案1】:

    输出声明应该是:

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

    或者,您可能需要考虑使用不再具有单通道使用要求的 DLS2。阅读更多关于它的信息here

    【讨论】:

      【解决方案2】:

      答案 b 似乎有效:

      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
      

      似乎因为不相关的原因失败了。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2023-01-13
        • 1970-01-01
        • 1970-01-01
        • 2021-09-19
        • 2022-01-13
        • 1970-01-01
        • 2019-10-08
        • 1970-01-01
        相关资源
        最近更新 更多