2

I am running a Snakemake NGS data analysis pipeline, one rule uses Freebayes, it's env looks like this:

name: freebayes
channels:
  - bioconda
dependencies:
 - freebayes=1.3.6

While creating the env this error occurs:

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

If I set the channel to conda-forge the error changes to:

- nothing provides requested freebayes 1.3.6**

How could I solve this?

Freek
  • 1,097
  • 2
  • 12
  • 30

2 Answers2

2

Bioconda as a channel depends on Conda Forge and so specifying bioconda as the only channel is incorrect. Instead, a proper specification for using the bioconda channel is

name: freebayes
channels:
  - conda-forge
  - bioconda
  - defaults
dependencies:
 - freebayes=1.3.6

See the channel configuration in the Usage section.

merv
  • 67,214
  • 13
  • 180
  • 245
0

If this helps, I can recreate the issue with:

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

I can fix it by setting:

conda config --set channel_priority flexible
mamba env create ... # Ok now

Once done, you may want to reset it:

conda config --set channel_priority strict

since at the time of this writing bioconda recommends strict priority.

dariober
  • 8,240
  • 3
  • 30
  • 47
  • This does not work for me, and you can see from my question that I'm already not in strict mode. But your answer led me to this solution which does work for : ```yaml name: freebayes channels: - bioconda dependencies: - freebayes=1.3.6 - conda-forge::libgcc-ng ``` I add the channel for libgcc-ng explicitly. Btw, why is it so clumsy to discuss things via comments here on SO, do you know? – Freek Jan 04 '23 at 12:29
  • If you found a solution, post it as an answer and accept it. Comments are deliberately clumsy to prevent lengthy discussions and encourage users to submit self-contained questions and answers instead. – dariober Jan 04 '23 at 12:49