akcorut / kGWASflow

kGWASflow is a Snakemake workflow for performing k-mers-based GWAS.
https://github.com/akcorut/kGWASflow/wiki
MIT License
28 stars 8 forks source link

Can't install via bioconda #15

Closed Ax3man closed 1 year ago

Ax3man commented 1 year ago

Hi, I tried installing this pipeline (which looks super useful!) on our cluster, but am running into version incompatibilities. I ran the line in the wiki:

conda create -c bioconda -n kgwasflow kgwasflow

And got:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: \ 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                               

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Package python conflicts for:
kgwasflow -> python[version='>=3.10.10']
Package click conflicts for:
kgwasflow -> click
Package snakemake conflicts for:
kgwasflow -> snakemake=7.25.0
Package mamba conflicts for:
kgwasflow -> mamba
Package numpy conflicts for:
kgwasflow -> numpy=1.23.5
Package pandas conflicts for:
kgwasflow -> pandas=1.5.3

I also tried specifiying using python 2.7: (since that is what kmersGWAS lists):

conda create -c bioconda -n kgwasflow kgwasflow python=2.7

But this gives even more incompatibilities.

Any clues?

akcorut commented 1 year ago

Hi @Ax3man,

Thanks for your interest in kGWASflow. This is a bit weird because I have tested the conda installation just now in both my local machine and a cluster, but I haven't had any problems. This is a guess, but could this be an issue with your conda version?

And also, conda create -c bioconda -n kgwasflow kgwasflow python=2.7 wouldn't work because kGWASflow requires python >=3.10. python 2.7 is being installed and used during a kGWASflow run in a separate rule environment so you don't have to worry about that.

Best, Kivanc

Ax3man commented 1 year ago

Thanks! I updated conda from v4.7.12 to the lastest v23.7.2. The error messages change, but the result is the same:

Running: ~/anaconda3/condabin/conda create -c bioconda -n kgwasflow kgwasflow Gives:

Collecting package metadata (current_repodata.json): \ DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): conda.anaconda.org:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): conda.anaconda.org:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/linux-64/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/noarch/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/linux-64/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/noarch/current_repodata.json HTTP/1.1" 200 None
| DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /bioconda/noarch/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /bioconda/linux-64/current_repodata.json HTTP/1.1" 200 None
done
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
Collecting package metadata (repodata.json): \ DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): conda.anaconda.org:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): conda.anaconda.org:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/linux-64/repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/noarch/repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/noarch/repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/linux-64/repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /bioconda/noarch/repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /bioconda/linux-64/repodata.json HTTP/1.1" 200 None
done
Solving environment: - 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                                                      

UnsatisfiableError: 

(that's the end of the output, nor error listed.)

Defining the python version to 3.10.10 gives the same, but now with an error at the end:

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package python conflicts for:
kgwasflow -> python[version='>=3.10.10']
python=3.10.10
kgwasflow -> click -> python[version='>=2.7,<2.8.0a0|>=3.10,<3.11.0a0|>=3.11,<3.12.0a0|>=3.7,<3.8.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0|>=3.6|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0']The following specifications were found to be incompatible with your system:

  - feature:/linux-64::__glibc==2.17=0
  - python=3.10.10 -> libgcc-ng[version='>=11.2.0'] -> __glibc[version='>=2.17']

Your installed version is: 2.17

Finally, I also tried to install locally on my laptop running Fedora, and this fails similarly:


Retrieving notices: ...working... done
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: / 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                                                      

UnsatisfiableError: 
akcorut commented 1 year ago

My guess is that it is an issue related to your base conda or how your bioconda channel is set up. But I'm not quite sure. Can I suggest a workaround? This might work:

  1. Create a new conda env with mamba:
    conda create -c conda-forge -n mamba_kgwas mamba
  2. Activate the conda env
    conda activate mamba_kgwas
  3. Install kGWASflow with mamba
    mamba install kgwasflow
  4. Test kGWASflow
    kGWASflow --help

Let me know if this fixes this issue. If not, I will think of some other fixes.

Best, Kivanc

Ax3man commented 1 year ago

Sorry, no dice. I can create and activate the environment, but that install line doesn't fine kgwasflow. So I tried:

mamba install kgwasflow -c conda-forge -c bioconda

Which works until it fails to download kgwasflow? End of output:

Downloading  (5) ━━━━━━━━━━━━╸━━╸━━━━━━━━━━━━━━  31.1MB /  68.4MB @  15.0MB/s frozenlist                 2.7s
Extracting  (59) ━━━━╸━━━━━━━━━━━━━━╸━━━━━━━━━━      26 /     133             docutils                   2.6skgwasflow                                          573.0 B @ 212.0 B/s  0.4s
Multi-download failed. Reason: Transfer finalized, status: 404 [https://conda.anaconda.org/bioconda/kgwasflow-1.2.3-pyhdfd78af_0.tar.bz2] 573 bytes
�:"VPt  "V4.0-pyha770c72_0.tar.bz2 extraction failed
error    libmamba Error when extracting package: [json.exception.type_error.316] invalid UTF-8 byte at index 0: 0x80
Segmentation fault

I'm sorry, I'm not much of python user, so this web of condas, mambas, conda-forges and biocondas etc is quite confusing.

akcorut commented 1 year ago

Can you try running mamba clean --all when the mamba_kgwas environment is active? Then, can you try to install kGWASflow by running only mamba install kgwasflow without adding -c conda-forge -c bioconda? I think there is an issue with mixing conda channels.

If that doesn't work, try installing kGWASflow by running conda install kgwasflow while mamba_kgwas environment is still active.

I'm sorry that you find the installation process confusing. Hopefully, we'll find a solution that works for you.

Kivanc

Ax3man commented 1 year ago

Yeah the install line doesn't find kgwasflow (that's why I was trying to add channels), i.e. running mamba install kgwasflow gives:

Looking for: ['kgwasflow']

pkgs/main/linux-64 (check zst)                      Checked  0.1s
pkgs/main/noarch (check zst)                       Checked  0.0s
pkgs/r/linux-64 (check zst)                        Checked  0.0s
pkgs/r/noarch (check zst)                          Checked  0.1s
pkgs/main/noarch                                   696.5kB @  10.3MB/s  0.1s
pkgs/r/linux-64                                      1.2MB @   8.8MB/s  0.2s
pkgs/main/linux-64                                   5.2MB @  25.5MB/s  0.3s
pkgs/r/noarch                                        1.3MB @   3.9MB/s  0.4s

Pinned packages:
  - python 3.11.*

Could not solve for environment specs
The following package could not be installed
└─ kgwasflow does not exist (perhaps a typo or a missing channel).

Using conda install kgwasflow now gives the same:

Collecting package metadata (current_repodata.json): | DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/linux-64/current_repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/linux-64/current_repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/noarch/current_repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/noarch/current_repodata.json HTTP/1.1" 304 0
done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): - DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/linux-64/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/noarch/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/linux-64/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/noarch/repodata.json HTTP/1.1" 304 0
done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - kgwasflow

Current channels:

  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.
akcorut commented 1 year ago

I see. It looks like bioconda isn't in the list of channels being searched, so it's not in your default channels. Can you add the channels by running the below commands:

# Bioconda
conda config --add channels bioconda
#Conda-forge
conda config --add channels conda-forge

Then just try to install kGWASflow with conda install kgwasflow again.

You can run conda config --show channels to check if the channels were added correctly

Ax3man commented 1 year ago

Success! Thanks so much for all your help.