##
# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
#
# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA
# Authors::   Cedric Laczny <cedric.laczny@uni.lu>, Fotis Georgatos <fotis@cern.ch>
# License::   MIT/GPL
# $Id$
#
# This work implements a part of the HPCBIOS project and is a component of the policy:
# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-94.html
##

easyblock = 'ConfigureMake'

name = 'TopHat'
version = '2.0.8'

biodeps = 'biodeps'
biodeps_ver = '1.6'
biodeps_versuff = '-extended'
versionsuffix = '-%s-%s%s' % (biodeps, biodeps_ver, biodeps_versuff)

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

toolchain = {'name': 'ictce', 'version': '5.3.0'}
toolchainopts = {'optarch': True, 'pic': True}

sources = [SOURCELOWER_TAR_GZ]
source_urls = ['http://ccb.jhu.edu/software/tophat/downloads/']

patches = ['tophat_ictce.patch']

dependencies = [
    (biodeps, biodeps_ver, biodeps_versuff),
    ('zlib', '1.2.7'),
]

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

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

parallel = 1  # not sure for a parallel build

moduleclass = 'bio'
