easyblock = 'Bundle'

name = 'R-bundle-extra'
version = '20150323'
rver = '3.1.3'
versionsuffix = '-R-%s' % rver

homepage = 'http://www.r-project.org/'
description = """R is a free software environment for statistical computing and graphics."""

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

# these are extensions for R
exts_defaultclass = 'RPackage'
exts_filter = ("R -q --no-save", "library(%(ext_name)s)")

dependencies = [
    ('R', rver),
    ('cURL', '7.41.0'),
    ('libxml2', '2.9.2'),
]

name_tmpl = '%(name)s_%(version)s.tar.gz'
ext_options = {
    'source_urls': [
        'http://cran.r-project.org/src/contrib/Archive/%(name)s',  # package archive
        'http://cran.r-project.org/src/contrib/',  # current version of packages
        'http://cran.freestatistics.org/src/contrib',  # mirror alternative for current packages
    ],
    'source_tmpl': name_tmpl,
}
# Bioconductor packages have a different download url
bioconductor_options = {
    'source_urls': [
        'http://www.bioconductor.org/packages/3.0/bioc/src/contrib/',
        'http://www.bioconductor.org/packages/3.0/data/annotation/src/contrib/',
        'http://www.bioconductor.org/packages/3.0/data/experiment/src/contrib/',
    ],
    'source_tmpl': name_tmpl,
}

# !! order of packages is important !!
exts_list = [
    ('RCurl', '1.95-4.5', ext_options),  # requires cURL
    ('XML', '3.98-1.1', ext_options),  # requires libxml2
    # extensions below require one or more extensions that have an external dependency listed above
    ('picante', '1.6-2', ext_options),
    ('spacodiR', '0.13.0115', ext_options),
    ('picante', '1.6-2', ext_options),
    ('httr', '0.6.1', ext_options),
    ('tkWidgets', '1.44.0', bioconductor_options),
    ('Mfuzz', '2.26.0', bioconductor_options),
    ('maSigPro', '1.38.0', bioconductor_options),
    ('rtracklayer', '1.26.3', bioconductor_options),
    ('BSgenome', '1.34.1', bioconductor_options),
    ('GEOquery', '2.32.0', bioconductor_options),
    ('biomaRt', '2.22.0', bioconductor_options),
    ('annotate', '1.44.0', bioconductor_options),
    ('GSEABase', '1.28.0', bioconductor_options),
    ('genefilter', '1.48.1', bioconductor_options),
    ('Category', '2.32.0', bioconductor_options),
    ('GOstats', '2.32.0', bioconductor_options),
    ('geneplotter', '1.44.0', bioconductor_options),
    ('DESeq2', '1.6.3', bioconductor_options),
    ('GenomicFeatures', '1.18.7', bioconductor_options),
    ('VariantAnnotation', '1.12.9', bioconductor_options),
    ('biovizBase', '1.14.1', bioconductor_options),
    ('OrganismDbi', '1.8.1', bioconductor_options),
    ('ggbio', '1.14.0', bioconductor_options),
    ('ReportingTools', '2.6.0', bioconductor_options),
    ('affycoretools', '1.38.0', bioconductor_options),
    ('AgiMicroRna', '2.16.0', bioconductor_options),
    ('DESeq', '1.18.0', bioconductor_options),
    ('GenomeGraphs', '1.26.0', bioconductor_options),
    ('geneLenDataBase', '1.1.1', bioconductor_options),
    ('goseq', '1.18.0', bioconductor_options),
    ('TxDb.Hsapiens.UCSC.hg19.knownGene', '3.0.0', bioconductor_options),
    ('Homo.sapiens', '1.1.2', bioconductor_options),
    ('KEGGgraph', '1.24.0', bioconductor_options),
    ('KEGGREST', '1.6.4', bioconductor_options),
    ('KEGGprofile', '1.8.2', bioconductor_options),
    ('minfi', '1.12.0', bioconductor_options),
    ('methylumi', '2.12.0', bioconductor_options),
    ('lumi', '2.18.0', bioconductor_options),
    ('Gviz', '1.10.11', bioconductor_options),
    ('methyAnalysis', '1.8.0', bioconductor_options),
    ('pathview', '1.6.0', bioconductor_options),
    ('SPIA', '2.18.0', bioconductor_options),
    ('cummeRbund', '2.8.2', bioconductor_options),
    ('spliceR', '1.8.0', bioconductor_options),
]

modextrapaths = {'R_LIBS': ''}

sanity_check_paths = {
    'files': [],
    'dirs': ['RCurl', 'XML', 'spliceR'],
}

moduleclass = 'lang'
