easyblock = 'PackedBinary'

name = 'Kraken'
version = '0.10.5-beta'
versionsuffix = '-Perl-%(perlver)s'

homepage = 'http://ccb.jhu.edu/software/kraken/'
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 aclocal_complish 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 local_compiled with CXX, the rest is in Perl
toolchain = {'name': 'foss', 'version': '2016a'}
toolchainopts = {'openmp': True}

source_urls = ['http://ccb.jhu.edu/software/kraken/dl/']
sources = [SOURCELOWER_TGZ]

patches = ['Kraken_%(version)s_makefile.patch']

dependencies = [
    ('Perl', '5.22.1'),
    ('Jellyfish', '1.1.11'),
    ('wget', '1.17.1'),
]

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

sanity_check_paths = {
    'files': [
        'add_to_library.sh',
        'build_kraken_db.sh',
        'check_for_jellyfish.sh',
        'classify',
        'clean_db.sh',
        'cp_into_tempfile.pl',
        'db_shrink',
        'db_sort',
        'download_genomic_library.sh',
        'download_taxonomy.sh',
        'kraken',
        'kraken-build',
        'kraken-filter',
        'krakenlib.pm',
        'kraken-mpa-report',
        'kraken-report',
        'kraken-translate',
        'make_seqid_to_taxid_map',
        'read_merger.pl',
        'report_gi_numbers.pl',
        'set_lcas',
        'shrink_db.sh',
        'standard_installation.sh',
        'upgrade_db.sh',
        'verify_gi_numbers.pl'],
    'dirs': [],
}

moduleclass = 'bio'
