nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

kraken2: init at 2.1.5

Open cardealerT opened this issue 7 months ago • 7 comments

Description of Changes

Added kraken2 taxonomic sequence classification system to by-name/kr

homepage: https://ccb.jhu.edu/software/kraken2/

github: https://github.com/DerrickWood/kraken2

Also added cardealerT and A1egator to maintainers list

Things done

  • Built on platform(s)
    • [ ] x86_64-linux
    • [x] aarch64-linux
    • [ ] x86_64-darwin
    • [x] aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • [ ] sandbox = relaxed
    • [ ] sandbox = true
  • [ ] Tested, as applicable:
  • [ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • [x] Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • [ ] (Package updates) Added a release notes entry if the change is major or breaking
    • [ ] (Module updates) Added a release notes entry if the change is significant
    • [ ] (Module addition) Added a release notes entry if adding a new NixOS module
  • [x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

cardealerT avatar Apr 28 '25 14:04 cardealerT

axed previous pull request because I blew it up. my shiny first time contributor badge is now gone :(

cardealerT avatar Apr 28 '25 14:04 cardealerT

@jbedo how's this looking now.

cardealerT avatar May 05 '25 23:05 cardealerT

$out/bin is full of a bunch of random scripts that shouldn't be included

16S_gg_installation.sh       build_kraken2_db.sh          download_genomic_library.sh  kraken2                      mask_low_complexity.sh
16S_rdp_installation.sh      build_rdp_taxonomy.pl        download_taxonomy.sh         kraken2-build                rsync_from_ncbi.pl
16S_silva_installation.sh    build_silva_taxonomy.pl      dump_table                   kraken2-inspect              scan_fasta_file.pl
add_to_library.sh            classify                     estimate_capacity            lookup_accession_numbers     standard_installation.sh
build_db                     clean_db.sh                  k2                           lookup_accession_numbers.pl
build_gg_taxonomy.pl         cp_into_tempfile.pl          k2mask                       make_seqid2taxid_map.pl

the scripts aren't random, they are called as subroutines throughout kraken2, kraken2-build and kraken2-inspect, which are all required for kraken2 to function.

k2 is the exception here. its an WIP python analogue to the shell and perl files. havent included python for buildInputs as kraken2, kraken2-build and kraken2-inspect are used almost exclusively in dependent software.

cardealerT avatar May 06 '25 01:05 cardealerT

$out/bin is full of a bunch of random scripts that shouldn't be included

16S_gg_installation.sh       build_kraken2_db.sh          download_genomic_library.sh  kraken2                      mask_low_complexity.sh
16S_rdp_installation.sh      build_rdp_taxonomy.pl        download_taxonomy.sh         kraken2-build                rsync_from_ncbi.pl
16S_silva_installation.sh    build_silva_taxonomy.pl      dump_table                   kraken2-inspect              scan_fasta_file.pl
add_to_library.sh            classify                     estimate_capacity            lookup_accession_numbers     standard_installation.sh
build_db                     clean_db.sh                  k2                           lookup_accession_numbers.pl
build_gg_taxonomy.pl         cp_into_tempfile.pl          k2mask                       make_seqid2taxid_map.pl

the scripts aren't random, they are called as subroutines throughout kraken2, kraken2-build and kraken2-inspect, which are all required for kraken2 to function.

k2 is the exception here. its an WIP python analogue to the shell and perl files. havent included python for buildInputs as kraken2, kraken2-build and kraken2-inspect are used almost exclusively in dependent software.

they shouldn't be in $out/bin, they will all get added to the user's path which will clutter it (and have scripts not meant to be called directly in the path doesn't make much sense).

0xda157 avatar May 06 '25 01:05 0xda157

$out/bin is full of a bunch of random scripts that shouldn't be included

16S_gg_installation.sh       build_kraken2_db.sh          download_genomic_library.sh  kraken2                      mask_low_complexity.sh
16S_rdp_installation.sh      build_rdp_taxonomy.pl        download_taxonomy.sh         kraken2-build                rsync_from_ncbi.pl
16S_silva_installation.sh    build_silva_taxonomy.pl      dump_table                   kraken2-inspect              scan_fasta_file.pl
add_to_library.sh            classify                     estimate_capacity            lookup_accession_numbers     standard_installation.sh
build_db                     clean_db.sh                  k2                           lookup_accession_numbers.pl
build_gg_taxonomy.pl         cp_into_tempfile.pl          k2mask                       make_seqid2taxid_map.pl

the scripts aren't random, they are called as subroutines throughout kraken2, kraken2-build and kraken2-inspect, which are all required for kraken2 to function. k2 is the exception here. its an WIP python analogue to the shell and perl files. havent included python for buildInputs as kraken2, kraken2-build and kraken2-inspect are used almost exclusively in dependent software.

they shouldn't be in $out/bin, they will all get added to the user's path which will clutter it (and have scripts not meant to be called directly in the path doesn't make much sense).

understood.

cardealerT avatar May 06 '25 01:05 cardealerT

I suggest placing them in libexec/kraken2 and then linking kraken2, kraken2-build, kraken2-inspect, and possibly k2 to bin/. k2 also needs python3 as part of the build inputs.

jbedo avatar May 06 '25 04:05 jbedo

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 402555


x86_64-linux

:white_check_mark: 1 package built:
  • kraken2

0xda157 avatar May 14 '25 18:05 0xda157

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 402555

Logs: https://github.com/awwpotato/nixpkgs-review-gha/actions/runs/16308255883


x86_64-linux

:white_check_mark: 1 package built:
  • kraken2

aarch64-linux

:white_check_mark: 1 package built:
  • kraken2

x86_64-darwin (sandbox = true)

:x: 1 package failed to build:
  • kraken2

Error logs: `x86_64-darwin`
kraken2
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: SHELL=/nix/store/wpm185cm7754fvdcxlw1j5k2c4h2pb5a-bash-5.2p37/bin/bash
make -C src all
make[1]: Entering directory '/nix/build/nix-build-kraken2-2.1.5.drv-0/source/src'
clang++ -fopenmp -Wall -std=c++11 -O3 -DLINEAR_PROBING   -c -o estimate_capacity.o estimate_capacity.cc
In file included from estimate_capacity.cc:7:
In file included from ./kraken2_headers.h:30:
./omp_hack.h:11:10: fatal error: 'omp.h' file not found
   11 | #include 
      |          ^~~~~~~
1 error generated.
make[1]: *** [: estimate_capacity.o] Error 1
make[1]: Leaving directory '/nix/build/nix-build-kraken2-2.1.5.drv-0/source/src'
make: *** [Makefile:12: all] Error 2

aarch64-darwin (sandbox = true)

:x: 1 package failed to build:
  • kraken2

Error logs: `aarch64-darwin`
kraken2
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: SHELL=/nix/store/jg93ssisp2ybs513p4xx5277bq7vdcxb-bash-5.2p37/bin/bash
make -C src all
make[1]: Entering directory '/nix/build/nix-build-kraken2-2.1.5.drv-0/source/src'
clang++ -fopenmp -Wall -std=c++11 -O3 -DLINEAR_PROBING   -c -o estimate_capacity.o estimate_capacity.cc
In file included from estimate_capacity.cc:7:
In file included from ./kraken2_headers.h:30:
./omp_hack.h:11:10: fatal error: 'omp.h' file not found
   11 | #include 
      |          ^~~~~~~
1 error generated.
make[1]: *** [: estimate_capacity.o] Error 1
make[1]: Leaving directory '/nix/build/nix-build-kraken2-2.1.5.drv-0/source/src'
make: *** [Makefile:12: all] Error 2

0xda157 avatar Jul 16 '25 01:07 0xda157

For clang have to import openmp from llvmPackages, though this may have version mismatches (#79818).

jbedo avatar Jul 16 '25 04:07 jbedo

The maintainers commit needs to come first, so that they can be referenced in the second commit without causing eval errors.

mweinelt avatar Jul 16 '25 11:07 mweinelt