集成 conda env 的 Snakemake 未正确安装

发布于 2025-01-20 14:00:53 字数 1240 浏览 4 评论 0原文

我的snakemake管道中有一条规则来运行multiqc:

    rule summaryReport:
        input:
            fastqc_forward = expand(final_path + "/fastqc/{sample}_R1_fastqc.html", sample = samples),
            fastqc_rev = expand(final_path + "/fastqc/{sample}_R2_fastqc.html", sample = samples)
        output:
            report = final_path + "/fastqc/report_quality_control.html"
        params:
            path = final_path + "/fastqc"
        conda:
            "multiqc.yaml"
        shell:
            "multiqc {params.path} --filename {output.report}"

使用conda env文件multiqc.yaml:

name: multiqc 
channels:
  - conda-forge
  - bioconda
dependencies:
  - multiqc=1.12

当我运行管道时,出现以下错误:

Activating conda environment: /XXXX/.snakemake/conda/e8f3e6def45259d12dddd42fcd679657
Traceback (most recent call last):
  File "/XXXX/.snakemake/conda/e8f3e6def45259d12dddd42fcd679657/bin/multiqc", line 6, in <module>
    from multiqc.__main__ import multiqc
ModuleNotFoundError: No module named 'multiqc'

我已经测试过手动激活conda环境,确实有相同的情况运行 multiqc 时出错。

我已经测试过通过 Snakemake 外部的“multiqc.yaml”创建一个 conda 环境,在这种情况下 multiqc 运行正常。

如果有人对此有想法,那将对我有很大帮助!

先感谢您

I have a rule in my snakemake pipeline to run multiqc :

    rule summaryReport:
        input:
            fastqc_forward = expand(final_path + "/fastqc/{sample}_R1_fastqc.html", sample = samples),
            fastqc_rev = expand(final_path + "/fastqc/{sample}_R2_fastqc.html", sample = samples)
        output:
            report = final_path + "/fastqc/report_quality_control.html"
        params:
            path = final_path + "/fastqc"
        conda:
            "multiqc.yaml"
        shell:
            "multiqc {params.path} --filename {output.report}"

with the conda env file multiqc.yaml :

name: multiqc 
channels:
  - conda-forge
  - bioconda
dependencies:
  - multiqc=1.12

When I run the pipeline I've got the following error :

Activating conda environment: /XXXX/.snakemake/conda/e8f3e6def45259d12dddd42fcd679657
Traceback (most recent call last):
  File "/XXXX/.snakemake/conda/e8f3e6def45259d12dddd42fcd679657/bin/multiqc", line 6, in <module>
    from multiqc.__main__ import multiqc
ModuleNotFoundError: No module named 'multiqc'

I've tested to activate the conda environment manually and indeed there is the same error when running multiqc.

I've tested to create a conda env thanks to "multiqc.yaml" outside snakemake, and in this case multiqc is running correctly.

If someone has an idea about this it would help me a lot!

Thank you in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

反差帅 2025-01-27 14:00:53

您很可能还想安装 python,因为根据 docs 不建议使用系统范围的Python:

name: multiqc 
channels:
  - conda-forge
  - bioconda
dependencies:
  - python=3.7
  - multiqc=1.12

You most likely want to install python as well, since according to docs it's not recommended to use the system-wide python:

name: multiqc 
channels:
  - conda-forge
  - bioconda
dependencies:
  - python=3.7
  - multiqc=1.12
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文