Snakemake/miniforge: Nothing provides libgcc-ng >=12 needed by freebayes-1.3.6-hbfe0e7f_2

894 views Asked by At

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?

2

There are 2 answers

1
merv On BEST ANSWER

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.

2
dariober On

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.