集成 conda env 的 Snakemake 未正确安装
我的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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您很可能还想安装 python,因为根据 docs 不建议使用系统范围的Python:
You most likely want to install python as well, since according to docs it's not recommended to use the system-wide python: