【问题标题】:Running Rscript in Nextflow pipeline在 Nextflow 管道中运行 Rscript
【发布时间】:2021-03-26 16:42:39
【问题描述】:

我正在尝试在 Nextflow 管道中运行 Rscript。这个 Rscript 有一个包“ggolot2”。

我有这个错误:

库中的错误(ggplot2):没有名为“ggplot2”的包, 执行已停止。

为什么会出现这个错误?

代码如下:

process fingerprint_plot {

    publishDir "${params.outdir}/fingerprint_plot", mode: 'copy'

    input:
    set val(sample_id), file(samples) from sample_cov_ch
    set val(control_id), file(controls) from control_cov_ch.collect()

    output:
    file("${sample_id}.fingerprint.pdf") into fingerprint_plot_ch

    script:
    """

    Rscript /mnt/Data/cut_and_tag/cut_tag_fingerprint_cmd.R --args ${controls} ${control_id} ${samples} ${sample_id} ${sample_id}.fingerprint.pdf

    """
}

【问题讨论】:

  • 执行环境中缺少库“ggplot2”。就像@TimurShtatland 建议的那样,您需要将r-ggplot2 添加到您的Conda 依赖项列表中:stackoverflow.com/a/66782501/751863

标签: r nextflow


【解决方案1】:

可能,ggplot2 未安装。你可以像这样have Nextflow install it via conda

process fingerprint_plot {
    conda 'r-ggplot2'
    // ...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-06-11
    • 1970-01-01
    • 2015-05-09
    • 2021-12-29
    • 2022-08-12
    • 1970-01-01
    • 2021-10-13
    • 2019-01-08
    相关资源
    最近更新 更多