easyblock = 'ConfigureMake'

name = 'RSEM'
version = '1.2.30'

homepage = 'http://deweylab.github.io/RSEM/'
description = """RNA-Seq by Expectation-Maximization"""

toolchain = {'name': 'foss', 'version': '2016a'}

source_urls = ['https://github.com/deweylab/RSEM/archive/']
sources = ['v%(version)s.tar.gz']

patches = ['RSEM-%(version)s_makefiles.patch']

skipsteps = ['configure']
installopts = "prefix=%(installdir)s"

dependencies = [
    ('ncurses', '6.0'),
    ('zlib', '1.2.8'),
]

sanity_check_paths = {
    'files': [
        'bin/rsem-calculate-expression',
        'bin/rsem-plot-model',
        'bin/rsem-plot-transcript-wiggles',
        'bin/rsem-bam2wig',
        'bin/rsem-generate-data-matrix',
        'bin/rsem-run-em',
        'bin/convert-sam-for-rsem'],
    'dirs': ['bin/samtools-1.3'],
}

moduleclass = 'bio'
