etal / cnvkit

Copy number variant detection from targeted DNA sequencing
http://cnvkit.readthedocs.org
Other
501 stars 162 forks source link

Error Installing CNVKit via Miniconda #848

Closed James-Brundage closed 9 months ago

James-Brundage commented 9 months ago

I am attempting to install CNVKit in a clean conda environment, but the enviornment will not solve. My commands are as follows:

conda create -n jnb_env conda activate jnb_env conda install cnvkit

However, I get the following output:

Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
Collecting package metadata (repodata.json): \ WARNING conda.models.version:get_matcher(548): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.8.0.*, but conda is ignoring the .* and treating it as 1.8.0
WARNING conda.models.version:get_matcher(548): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.9.0.*, but conda is ignoring the .* and treating it as 1.9.0
done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: \ 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                                

UnsatisfiableError:

At first glance, this looked like a dependency installation issue. When I installed Miniconda, as suggested by the cnvkit documentation I added the bioconda, conda-forge and defaults via these commands:

# Configure the sources where conda will find packages
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge

I double checked that these channels were actually available via conda config --show channels which gave:

channels:
  - conda-forge
  - bioconda
  - defaults

I then tried to manually install the cnvkit dependencies via conda install in jnb_env. I was able to install all of them except for pysam and pyvcf. This remained true even after I specified the bioconda channel for installation. I was able to pip install pysam but not pyvcf.

I have tried these approaches on both MacOS (macOS Ventura 13.0) and Linux (CentOS Linux 7 (Core)) each with python 3.7 in the conda environment.


What am I doing wrong in the installation process? I have not seen this issue posted, so I assume I am making an error somewhere! Thank you for your help!

James-Brundage commented 9 months ago

I believe the issue was the python version for the install. Issue was resolved with the following:

conda create -n jnb_env python=3.11
conda activate jnb_env
pip install --upgrade pip setuptools==57.5.0
pip install numpy scipy pandas matplotlib reportlab biopython pyfaidx pysam pyvcf
pip install cnvkit

Prior to this, I needed to install the required R scripts as well.