# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
# Author: Pablo Escobar Lopez
# Swiss Institute of Bioinformatics
# Biozentrum - University of Basel
# Modified by: Adam Huffman
# The Francis Crick Institute

easyblock = 'ConfigureMake'

name = 'TopHat'
version = '2.1.1'

homepage = 'http://ccb.jhu.edu/software/tophat/'
description = """TopHat is a fast splice junction mapper for RNA-Seq reads."""

toolchain = {'name': 'intel', 'version': '2017b'}
toolchainopts = {'pic': True, 'cstd': 'c++11'}

source_urls = ['http://ccb.jhu.edu/software/tophat/downloads/']
sources = [SOURCELOWER_TAR_GZ]
patches = [
    'tophat-2.0.13-zlib.patch',
    'TopHat-%(version)s_fix-templating-error.patch',
]
checksums = [
    '37840b96f3219630082b15642c47f5ef95d14f6ee99c06a369b08b3d05684da5',  # tophat-2.1.1.tar.gz
    'a33075c2affda995ddbd250933dbcaf94f68768b1eebead58a69705fc40306ef',  # tophat-2.0.13-zlib.patch
    '0ea02a4f8be842bb178574f7ca286d596200fcfdcc464921c0e3b7b3ebba154f',  # TopHat-2.1.1_fix-templating-error.patch
]

dependencies = [
    ('Boost', '1.65.1'),
    ('zlib', '1.2.11'),
]

configopts = '--with-boost=$EBROOTBOOST'

parallel = 1

sanity_check_paths = {
    'files': ['bin/tophat'],
    'dirs': [],
}

moduleclass = 'bio'
