easyblock = 'MakeCp'

name = 'HISAT2'
version = '2.0.5'

homepage = 'https://ccb.jhu.edu/software/hisat2/index.shtml'
description = """HISAT2 is a fast and sensitive alignment program for mapping next-generation sequencing reads
 (both DNA and RNA) against the general human population (as well as against a single reference genome)."""

toolchain = {'name': 'intel', 'version': '2017a'}

sources = ['%(namelower)s-%(version)s-source.zip']
source_urls = ['ftp://ftp.ccb.jhu.edu/pub/infphilo/%(namelower)s/downloads/']

patches = ['HISAT2-%(version)s_intel-fixes.patch']

checksums = ['b6d867e1f8463012d1de3d1472573906']

dependencies = [
    ('NGS', '1.3.0'),
    ('ncbi-vdb', '2.8.2'),
]

buildopts = 'CC="$CC" CPP="$CXX" RELEASE_FLAGS="$CFLAGS" '
buildopts += "USE_SRA=1 NCBI_NGS_DIR=$EBROOTNGS NCBI_VDB_DIR=$EBROOTNCBIMINVDB"

executables = ['hisat2', 'hisat2-align-l', 'hisat2-align-s', 'hisat2-build', 'hisat2-build-l', 'hisat2-build-s',
               'hisat2-inspect', 'hisat2-inspect-s', 'hisat2-inspect-l']
files_to_copy = [(executables, 'bin')]

sanity_check_paths = {
    'files': ['bin/%s' % x for x in executables],
    'dirs': [],
}

moduleclass = 'bio'
