0

I could not install htslib v1.12 with conda using either commands:

conda install -c bioconda htslib
conda install -c bioconda/label/broken htslib

Using conda install -c bioconda/label/cf201901 htslib gave me htslib v1.9.

Does anyone know how to install v1.12 with conda? Thanks!

  • Have you tried `conda install -c bioconda htslib=1.12`? – merv Apr 24 '21 at 07:14
  • Note that labels are really only for advanced use cases - unless you know you need a particular label, always use the default one (e.g., `bioconda` in this case). That particular label you tried was basically a checkpoint when for when Conda Forge transitioned to a new build stack, so it only includes old builds. – merv Apr 24 '21 at 07:20
  • Yes, I did try `htslib=1.12` but it returned "Solving envrironment: failed", which was the same error as the 2 above commands: – Ngân Trần Apr 24 '21 at 12:09
  • What about `conda install -c conda-forge -c bioconda htslib=1.12`? If that doesn’t work, then you need to install it in a new environment (i.e., you have something incompatible installed in the current environment). – merv Apr 25 '21 at 00:16
  • Wow. Thanks very much! I can install htslib finally. Could you please explain the addition `-c conda-forge`? – Ngân Trần Apr 25 '21 at 04:14

1 Answers1

0

The directives OP reference are from Anaconda Cloud, which are generic and miss the nuances that using specialized channels often entails. Specifically, Bioconda expects the following channel prioritization:

channels:
  - conda-forge
  - bioconda
  - defaults

This is the order Bioconda uses when building and testing packages. Not following this can lead to undefined behavior.

Best practice is to either set this globally - great if you primarily work with bioinformatics software - or set it in an env-specific way (i.e., use conda config --env).

Otherwise, to mimic this channel priority manually one would use

conda install --override-channels -c conda-forge -c bioconda -c defaults htslib=1.12

but most of the time one can get away with

conda install -c conda-forge -c bioconda htslib=1.12
merv
  • 67,214
  • 13
  • 180
  • 245