我正在运行一个Snakemake NGS数据分析管道,其中一个规则使用Freebayes,它的环境看起来像这样:
name: freebayes
channels:
- bioconda
dependencies:
- freebayes=1.3.6
创建环境时发生错误:
Building DAG of jobs...
Your conda installation is not configured to use strict channel priorities. This is however crucial for having robust and correct environments (for details, see https://conda-forge.org/docs/user/tipsandtricks.html). Please consider to configure strict priorities by executing 'conda config --set channel_priority strict'.
Creating conda environment envs/freebayes.yaml...
Downloading and installing remote packages.
CreateCondaEnvironmentException:
Could not create conda environment from /home/nlv24077/temp/test_legacy_pipeline/rules/../envs/freebayes.yaml:
Command:
mamba env create --quiet --file "/home/nlv24077/mpegg/snaqs_required_files/snakemake_envs/08937c429b94df5250c66c66154d19b9.yaml" --prefix "/home/nlv24077/mpegg/snaqs_required_files/snakemake_envs/08937c429b94df5250c66c66154d19b9"
Output:
Encountered problems while solving:
- nothing provides libgcc-ng >=12 needed by freebayes-1.3.6-hbfe0e7f_2
如果我将通道设置为conda-forge,则错误更改为:
- nothing provides requested freebayes 1.3.6**
我该如何解决这个问题?
Bioconda作为通道依赖于Conda Forge,因此指定bioconda
作为only通道是不正确的。相反,使用bioconda
通道的正确规范是
name: freebayes
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- freebayes=1.3.6
请参阅用法一节中的通道配置。
如果这有帮助,我可以重新创建问题:
conda config --set channel_priority strict
mamba env create --file freebayes.yaml
...
Looking for: ['freebayes=1.3.6']
Encountered problems while solving:
- package freebayes-1.3.6-h346b5cb_1 requires htslib >=1.14,<1.15.0a0, but none of the providers can be installed
我可以通过设置:
conda config --set channel_priority flexible
mamba env create ... # Ok now
一旦完成,你可能想要重置它:
conda config --set channel_priority strict
在撰写本文时,bioconda建议严格优先。