pangenome / pggb

the pangenome graph builder
https://doi.org/10.1038/s41592-024-02430-3
MIT License
368 stars 41 forks source link

gsl dependencies issue in conda package #196

Closed soungalo closed 2 years ago

soungalo commented 2 years ago

Hello,
I installed pggb (v. 0.3.1) using conda. Installation completed successfully, however when I try running pggb I get the following error:

wfmash: error while loading shared libraries: libgsl.so.25: cannot open shared object file: No such file or directory
Command exited with non-zero status 127
wfmash -X -s 100k -p 97 -n 1 -t 60 chr1H.fa chr1H.fa
0.00s user 0.00s system 0% cpu 0.48s total 208Kb max memory

Looking at the files in the lib/ of my conda env, I see libgsl.so.27 is there. I tried downgrading to gsl v2.5, but looks like there is a dependency issue:

Encountered problems while solving:
  - package wfmash-0.8.2-h144baf3_0 requires gsl >=2.7,<2.8.0a0, but none of the providers can be installed

Any idea how to get out of this loop? I could just build from source, but would prefer to use conda.
Thanks!

AndreaGuarracino commented 2 years ago

As in #200, it is not always clear (to me) how to fix conda's dependencies. @piosierra (I am tagging you also here in case you know how to fix the problem) had dependency problems, and he solved them by using:

conda install -c bioconda -c conda-forge pggb

Could you please try this way?

soungalo commented 2 years ago

Unfortunately, this does not solve the problem. I've also tried specifying previous versions (0.3.0 and 0.2), but keep getting the same error. Any other suggestions?

subwaystation commented 2 years ago

Which conda version are you running? Maybe it is too old?

soungalo commented 2 years ago

Just updated to newest version (4.12.0) and retried, but got the same error. If you have a working conda env of PGGB, could you maybe upload its yaml file? You can get it by activating the env and then running conda env export > environment_droplet.yml.

subwaystation commented 2 years ago
(pggb) [heumos@savasana ~]$ conda install -c bioconda -c conda-forge pggb=0.3.1
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial 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: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:

  - feature:/linux-64::__glibc==2.35=0
  - feature:|@/linux-64::__glibc==2.35=0

Your installed version is: 2.35

I don't feel lucky today. My initial environment was created via conda create -n pggb python=3.10. I am also confused, because my installed version should match the requirements.

subwaystation commented 2 years ago

Alright, I got it running with

conda create -n pggb python=3.9
conda activate pggb
conda install -c bioconda pggb=0.3.1
pggb -i data/HLA/DRB1-3123.fa.gz -p 70 -s 3000 -G 2000 -n 10 -t 16 -v -V 'gi|568815561:#' -o out -M

Below the environment file. environment_droplet.yml.txt

I suspect python=3.9 is required. See https://stackoverflow.com/questions/63734508/stuck-at-solving-environment-on-anaconda or https://github.com/conda/conda/issues/9367.

Could you please try @soungalo? Thanks!

soungalo commented 2 years ago

I executed the commands as you list them, but got the same result, However, after creating an environment from your yaml file, I was able to run pggb without encountering the above error. I suspect this has to do with the specific gsl version (gsl=2.7=he838d99_0).

subwaystation commented 2 years ago

One last option: Remove all gsl packages you have installed or cached already via conda clean. Then try my suggestion above again. Or try mamba.

Else I am happy that my yaml file worked! :)

soungalo commented 2 years ago

I cannot remove gsl packages outside the environments I create because these are located in public directories which I do not have permissions to modify. I also tried everything with mamba, but it doesn't seem to be any different from conda (just faster...).

subwaystation commented 2 years ago

Got it. Thanks for trying!

wangyuhu123 commented 2 years ago

Hello, I have the same problem as you today. Here's what you can try:

Recreate a PGGB environment using conda: conda env create -f pGGb_environment.yml. Based on this method I successfully run and no more errors. The only change I made here was to change the GSL version to 2.5. Please remember to change the txt QQ图片20220808203451 suffix to yml pggb_environment.txt .