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

eggnog-mapper: init at 1.0.3 #58905

Merged
merged 1 commit into from Apr 15, 2019
Merged

Conversation

luispedro
Copy link
Contributor

This is becoming widely used in bioinformatics. The packaging was inspired by bioconda's packaging at https://github.com/bioconda/bioconda-recipes/tree/master/recipes/eggnog-mapper (namely, the patching of setup.py, see also eggnogdb/eggnog-mapper#125)

Using this package requires one of hmmer or diamond to be present (both of which are in nixpkgs). You do not need both of them, but I am not sure if there is a way to specify optional dependencies in nix.

Things done

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)

  • Built on platform(s)

    • other Linux distributions
  • Tested execution of all binary files (usually in ./result/bin/)
    This package contains Python scripts not binaries; but, yes, I am currently using this package in my work and it works (to the best of my understanding).

@risicle
Copy link
Contributor

risicle commented Apr 11, 2019

Using this package requires one of hmmer or diamond to be present

How are these accessed by eggnog-mapper? Are they just called as binaries, expecting them to be in PATH? If so, they should probably be pinned down to specific dependencies. There are a couple of ways of doing this - probably best to look at using makeWrapper (see https://nixos.org/nixpkgs/manual/#ssec-stdenv-functions) to force the PATH seen by the eggnog executable.

As for making them "optional" - you can make the arguments to the toplevel function "optional" by giving them a "default" of null - e.g. ..., diamond ? null, .... If you do this you'll probably want to use an assert statement to ensure they're not both null. Then where you're using these variables you'll be wanting to cope with the fact that either of them could be null.

At some point you'll have to make a decision though over which of them you'll want to be depended on by the "default" package that gets built by hydra.

@luispedro
Copy link
Contributor Author

Thanks for the feedback. For the moment, I think it's better to make both of them dependencies for the user's convenience.

I added makeWrapper arguments to ensure eggnog-mapper finds the right binaries.

@risicle
Copy link
Contributor

risicle commented Apr 13, 2019

Builds for me and binaries appear to trivially "work" on non-nixos linux x86_64.

I slightly wonder whether it would be "nicer" to reformat the names of the installed executables to something cleaner like download-eggnog-data rather than download_eggnog_data.py, but it's probably not important.

@luispedro
Copy link
Contributor Author

I slightly wonder whether it would be "nicer" to reformat the names of the installed executables to
something cleaner like download-eggnog-data rather than download_eggnog_data.py, but it's probably
not important.

Even if those are nicer, the current names are mentioned in the eggnog-mapper docs, so it would be confusing for the user.

@luispedro luispedro force-pushed the add_eggnog_mapper branch 2 times, most recently from 108de9f to 31fe74f Compare April 14, 2019 06:06
Copy link
Member

@kalbasit kalbasit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpicks. Overall looks good.

@luispedro
Copy link
Contributor Author

Thanks. Rebased to master, squashed & re-pushed.

@kalbasit kalbasit merged commit 13a1f2c into NixOS:master Apr 15, 2019
@luispedro luispedro deleted the add_eggnog_mapper branch April 15, 2019 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants