Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: add to bioconda #48

Closed
wdecoster opened this issue Jan 15, 2019 · 9 comments
Closed

Request: add to bioconda #48

wdecoster opened this issue Jan 15, 2019 · 9 comments

Comments

@wdecoster
Copy link

wdecoster commented Jan 15, 2019

Hi,

Would it be possible to add a GangSTR recipe to bioconda? That makes installation generally lots easier. I haven't added anything more complicated than python scripts, but here are some guidelines...

Thanks,
Wouter

@mbargull
Copy link

mbargull commented Apr 1, 2021

Hi @wdecoster, @nmmsv,

it has been a while since this issue was opened. But now, thanks to @christopher-schroeder, GangSTR is available via Bioconda 🎉.

We've added a patch to enable us to link to already packaged dependencies:
https://github.com/bioconda/bioconda-recipes/blob/b3d86283385df3ede3fa2c2f2fd0c9d565ffa420/recipes/gangstr/0001-Unvendor-dependencies-use-pkg-config-instead.patch
It would be very helpful to have this behavior available in your upstream sources (e.g., optionally via some -DVENDOR_DEPS=0 flag or similar).
NB: The patch only has

+pkg_check_modules(hts REQUIRED htslib)
+pkg_check_modules(nlopt REQUIRED nlopt)
+pkg_check_modules(gsl REQUIRED gsl)

but having

+pkg_check_modules(hts REQUIRED htslib>=MIN_HTS_VERSION)
+pkg_check_modules(nlopt REQUIRED nlopt>=MIN_NLOPT_VERSION)
+pkg_check_modules(gsl REQUIRED gsl>=MIN_GSL_VERSION)

(with MIN_*_VERSION replaced with proper values, of course) would be even better ;).

Cheers,
Marcel

@wdecoster
Copy link
Author

Good to hear!

@christopher-schroeder
Copy link

Even if I have initialized this and wrote a simple working recipe, the applause should go to @mbargull for his amazing knowledge about patching, make, cmake and conda.

@mbargull
Copy link

mbargull commented Apr 1, 2021

I'll take the applause for the last 10 % of the work and tip my hat to you ;).

@gymreklab
Copy link
Owner

Thanks for adding this!

@nmmsv
Copy link
Collaborator

nmmsv commented Apr 5, 2021

Hi @mbargull and @christopher-schroeder
Thanks for adding the rule to bioconda! I tried installing using conda and ran into a couple of issues. Since I'm not familiar with Conda (and only recently started usingCmake), I decided to ask them here to see if you have an insight.

  1. I tried installing Gangstr using conda in an interactive ubuntu 20.04 docker and got the following error. Am I doing something wrong?
$ conda install -c bioconda gangstr
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 versions

Package libstdcxx-ng conflicts for:
python=3.8 -> libffi[version='>=3.2.1,<3.3a0'] -> libstdcxx-ng[version='>=7.2.0']
python=3.8 -> libstdcxx-ng[version='>=7.3.0']

Package libgcc-ng conflicts for:
python=3.8 -> zlib[version='>=1.2.11,<1.3.0a0'] -> libgcc-ng[version='>=7.2.0']
python=3.8 -> libgcc-ng[version='>=7.3.0']

Package openssl conflicts for:
python=3.8 -> openssl[version='>=1.1.1d,<1.1.2a|>=1.1.1e,<1.1.2a|>=1.1.1g,<1.1.2a|>=1.1.1j,<1.1.2a']
gangstr -> htslib[version='>=1.10.2,<1.11.0a0'] -> openssl[version='>=1.1.1a,<1.1.2a|>=1.1.1g,<1.1.2a']
  1. Is there a benefit to using pkgconfig as opposed to building from source like I do in the CMakeLists? I tried using pkgconfig using the changes that you made to the rule, and wasn't able to get it working on my end.

Thanks again! I appreciate your contribution! :)

@christopher-schroeder
Copy link

christopher-schroeder commented Apr 5, 2021

Hey @nmmsv,

the reason this happens is very likely that you did not setup the bioconda channel as stated in the docu and therefore missing conda-forge. You have two options:

  1. Setup the default channels by:
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge

This will add bioconda and conda-forge to the default list of channels. Then you can simply use:

conda install gangstr

to install gangstr. This is the prefered way for bioinformaticians, because all the important tools are in bioconda and you dont want to add bioconda and conda-forge to the install parameters every time.

  1. Simply add conda-forge to the channels as parameter:

conda install -c bioconda -c conda-forge gangstr


In both cases I strongly recommend using mamba instead of conda. You can install mamba by

conda install -c conda-forge mamba

and then use it like you would use conda:

mamba install gangstr

or

mamba install -c bioconda -c conda-forge gangstr

@wdecoster
Copy link
Author

Also worth mentioning that it is usually a good idea not to install stuff in your base environment but create a new environment instead
mamba create -n ganstr_env gangstr

@nmmsv
Copy link
Collaborator

nmmsv commented Apr 19, 2021

Oops that makes sense. It works now.
Thank you all for your help in setting this up! I have added installation with conda to the readme page.

@nmmsv nmmsv closed this as completed Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants