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

{bio}[gompi/2023a] Kraken2 v2.1.3 #21834

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions easybuild/easyconfigs/k/Kraken2/Kraken2-2.1.3-gompi-2023a.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
easyblock = 'PackedBinary'

name = 'Kraken2'
version = '2.1.3'

homepage = 'https://github.com/DerrickWood/kraken2/wiki'
description = """Kraken is a system for assigning taxonomic labels to short DNA sequences,
usually obtained through metagenomic studies. Previous attempts by other
bioinformatics software to accomplish this task have often used sequence
alignment or machine learning techniques that were quite slow, leading to
the development of less sensitive but much faster abundance estimation
programs. Kraken aims to achieve high sensitivity and high speed by
utilizing exact alignments of k-mers and a novel classification algorithm."""

# part is compiled with $CXX, the rest is in Perl
toolchain = {'name': 'gompi', 'version': '2023a'}
toolchainopts = {'openmp': True, 'cstd': 'c++11'}

github_account = 'DerrickWood'
source_urls = [GITHUB_LOWER_SOURCE]
sources = ['v%(version)s.tar.gz']
patches = [
'%(name)s-2.1.3_fix_installation_for_easybuild.patch',
]
checksums = [
{'v2.1.3.tar.gz': '5269fa14adfb02e38c2da2e605e909a432d76c680d73e2e0e80e27ccd04d7c69'},
{'Kraken2-2.1.3_fix_installation_for_easybuild.patch':
'd2faecff258133033cb81d5ac70d1a7ff1b4323091411aa835a13de83f2cc174'},
]

dependencies = [
('Perl', '5.36.1'),
('BLAST+', '2.14.1'),
('wget', '1.24.5'),
]

install_cmd = 'cd %(builddir)s/%(namelower)s-%(version)s && '
install_cmd += './install_kraken2.sh %(installdir)s/bin'

# Kraken2 databases can be downloaded from https://benlangmead.github.io/aws-indexes/k2
# or built as described in https://github.com/DerrickWood/kraken2/wiki/Manual#kraken-2-databases
# The following commands will build and install the standard databases (100GB) in local_db_path
# local_db_path = '%(installdir)s/db'
# postinstallcmds = [
# 'mkdir %s' % local_db_path,
# 'cd %%(installdir)s/bin && ./kraken2-build --standard --threads %%(parallel)s --db %s' % local_db_path,
# ]

sanity_check_paths = {
'files': ['bin/%s' % x for x in [
'16S_gg_installation.sh', '16S_rdp_installation.sh', '16S_silva_installation.sh', 'add_to_library.sh',
'build_db', 'build_gg_taxonomy.pl', 'build_kraken2_db.sh', 'build_rdp_taxonomy.pl', 'build_silva_taxonomy.pl',
'classify', 'clean_db.sh', 'cp_into_tempfile.pl', 'download_genomic_library.sh', 'download_taxonomy.sh',
'dump_table', 'estimate_capacity', 'kraken2', 'kraken2-build', 'kraken2-inspect', 'kraken2lib.pm',
'lookup_accession_numbers.pl', 'make_seqid2taxid_map.pl', 'mask_low_complexity.sh', 'rsync_from_ncbi.pl',
'scan_fasta_file.pl']],
'dirs': [],
}

sanity_check_commands = [
'kraken2 --help',
'kraken2-build --help',
'kraken2-inspect --help',
'build_db -h',
'classify -h',
]

moduleclass = 'bio'
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Fix install script and src/Makefile for EasyBuild.

Åke Sandgren, 2021-04-30
Update: Petr Král (INUITS)
diff -u install_kraken2.sh.orig install_kraken2.sh
--- install_kraken2.sh.orig 2023-06-07 02:25:37.000000000 +0200
+++ install_kraken2.sh 2024-11-12 11:34:20.122193572 +0100
@@ -23,7 +23,9 @@

# Perl cmd used to canonicalize dirname - "readlink -f" doesn't work
# on OS X.
-export KRAKEN2_DIR=$(perl -MCwd=abs_path -le 'print abs_path(shift)' "$1")
+# export KRAKEN2_DIR=$(perl -MCwd=abs_path -le 'print abs_path(shift)' "$1")
+
+export KRAKEN2_DIR=$1

mkdir -p "$KRAKEN2_DIR"
make -C src install
diff -u src/Makefile.orig src/Makefile
--- src/Makefile.orig 2023-06-07 02:25:37.000000000 +0200
+++ src/Makefile 2024-11-12 10:13:26.330138787 +0100
@@ -1,6 +1,6 @@
-CXX = g++
+CXX ?= g++
KRAKEN2_SKIP_FOPENMP ?= -fopenmp
-CXXFLAGS = $(KRAKEN2_SKIP_FOPENMP) -Wall -std=c++11 -O3
+CXXFLAGS ?= $(KRAKEN2_SKIP_FOPENMP) -Wall -std=c++11 -O3
CXXFLAGS += -DLINEAR_PROBING

.PHONY: all clean install
Loading