【问题标题】:How to combine multiple queue channels with values in Nextflow?如何将多个队列通道与 Nextflow 中的值结合起来?
【发布时间】:2020-07-07 17:00:20
【问题描述】:

我想在 Nextflow 上的先前流程的同一输入上使用不同的变量多次运行分析:

process a {
    output:
    file id, "{id}.out" into a
}

metadata = Channel.fromPath("metadata.tsv")

vars_to_analyze = Channel.from(["var_a", "var_b"])

process b {
    input:
    tuple id, file from a
    file m from metadata
    val var from vars_to_analyze

    output:
    tuple id, path("${id}-${var}.out") into b

    """
    command --var ${var} --metadata ${m} ${file} > ${id}-${var}.out
    """
}

重用具有不同值的元数据和文件的正确方法是什么?

【问题讨论】:

  • 似乎combine operator 应该是这样,但似乎无法使其工作:combined = a.combine(metadata).combine(vars_to_analyze)
  • .combine() 有什么问题?
  • 不要多次使用同一个输入。

标签: bioinformatics pipeline nextflow


【解决方案1】:

元数据文件不要使用通道,只需声明为

metadata = file("metadata.tsv")

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-13
    • 2018-10-13
    • 2013-04-19
    • 2011-04-30
    • 1970-01-01
    相关资源
    最近更新 更多