easyblock = 'Bundle'

name = 'R-bundle-Bioconductor'
version = '3.2'
versionsuffix = '-R-%(local_rver)s'

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

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

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

local_rver = '3.2.3'
versionsuffix = '-R-%s' % local_rver
dependencies = [('R', local_rver)]

local_name_tmpl = '%(name)s_%(version)s.tar.gz'
local_ext_options = {
    'source_urls': [
        # package archive
        'http://cran.r-project.org/src/contrib/Archive/%(name)s',
        'http://cran.r-project.org/src/contrib/',  # current version of packages
        # mirror alternative for current packages
        'http://cran.freestatistics.org/src/contrib',
    ],
    'source_tmpl': local_name_tmpl,
}
local_bioconductor_options = {
    'source_urls': [
        'http://www.bioconductor.org/packages/3.2/bioc/src/contrib/',
        'http://www.bioconductor.org/packages/3.2/data/annotation/src/contrib/',
        'http://www.bioconductor.org/packages/3.2/data/experiment/src/contrib/',
    ],
    'source_tmpl': local_name_tmpl,
}

# CRAN packages on which these Bioconductor packages depend are available in R module on which this depends
# !! order of packages is important !!
exts_list = [
    ('BiocGenerics', '0.16.1', local_bioconductor_options),
    ('Biobase', '2.30.0', local_bioconductor_options),
    ('S4Vectors', '0.8.11', local_bioconductor_options),
    ('IRanges', '2.4.8', local_bioconductor_options),
    ('GenomeInfoDb', '1.6.3', local_bioconductor_options),
    ('AnnotationDbi', '1.32.3', local_bioconductor_options),
    ('zlibbioc', '1.16.0', local_bioconductor_options),
    ('XVector', '0.10.0', local_bioconductor_options),
    ('Biostrings', '2.38.4', local_bioconductor_options),
    ('GenomicRanges', '1.22.4', local_bioconductor_options),
    ('BiocParallel', '1.4.3', local_bioconductor_options),
    ('Rsamtools', '1.22.0', local_bioconductor_options),
    ('lambda.r', '1.1.7', local_ext_options),
    ('futile.options', '1.0.0', local_ext_options),
    ('futile.logger', '1.4.1', local_ext_options),
    ('SummarizedExperiment', '1.0.2', local_bioconductor_options),
    ('GenomicAlignments', '1.6.3', local_bioconductor_options),
    ('ShortRead', '1.28.0', local_bioconductor_options),
    ('graph', '1.48.0', local_bioconductor_options),
    ('affyio', '1.40.0', local_bioconductor_options),
    ('BiocInstaller', '1.20.1', local_bioconductor_options),
    ('preprocessCore', '1.32.0', local_bioconductor_options),
    ('affy', '1.48.0', local_bioconductor_options),
    ('GO.db', '3.2.2', local_bioconductor_options),
    ('limma', '3.26.9', local_bioconductor_options),
    ('RBGL', '1.46.0', local_bioconductor_options),
    ('org.Hs.eg.db', '3.2.3', local_bioconductor_options),
    ('AnnotationForge', '1.12.2', local_bioconductor_options),
    ('KEGG.db', '3.2.2', local_bioconductor_options),
    ('annaffy', '1.42.0', local_bioconductor_options),
    ('gcrma', '2.42.0', local_bioconductor_options),
    ('oligoClasses', '1.32.0', local_bioconductor_options),
    ('edgeR', '3.12.1', local_bioconductor_options),
    ('PFAM.db', '3.2.2', local_bioconductor_options),
    ('perm', '1.0-0.0', local_ext_options),
    ('baySeq', '2.4.1', local_bioconductor_options),
    ('qvalue', '2.2.2', local_bioconductor_options),
    ('impute', '1.44.0', local_bioconductor_options),
    ('samr', '2.0', local_ext_options),
    ('DEGseq', '1.24.0', local_bioconductor_options),
    ('hgu133plus2.db', '3.2.2', local_bioconductor_options),
    ('illuminaio', '0.12.0', local_bioconductor_options),
    ('rtracklayer', '1.30.4', local_bioconductor_options),
    ('biomaRt', '2.26.1', local_bioconductor_options),
    ('GenomicFeatures', '1.22.13', local_bioconductor_options),
    ('bumphunter', '1.10.0', local_bioconductor_options),
    ('multtest', '2.26.0', local_bioconductor_options),
    ('siggenes', '1.44.0', local_bioconductor_options),
    ('DynDoc', '1.48.0', local_bioconductor_options),
    ('genoset', '1.24.0', local_bioconductor_options),
    ('NOISeq', '2.14.1', local_bioconductor_options),
    ('Rgraphviz', '2.14.0', local_bioconductor_options),
    ('RNASeqPower', '1.10.0', local_bioconductor_options),
    ('annotate', '1.48.0', local_bioconductor_options),
    ('GSEABase', '1.32.0', local_bioconductor_options),
    ('genefilter', '1.52.1', local_bioconductor_options),
    ('Category', '2.36.0', local_bioconductor_options),
    ('GOstats', '2.36.0', local_bioconductor_options),
    ('BSgenome', '1.38.0', local_bioconductor_options),
    ('VariantAnnotation', '1.16.4', local_bioconductor_options),
    ('biovizBase', '1.18.0', local_bioconductor_options),
    ('OrganismDbi', '1.12.1', local_bioconductor_options),
    ('ggbio', '1.18.5', local_bioconductor_options),
    ('geneplotter', '1.48.0', local_bioconductor_options),
    ('DESeq2', '1.10.1', local_bioconductor_options),
    ('ReportingTools', '2.10.0', local_bioconductor_options),
    ('affycoretools', '1.42.0', local_bioconductor_options),
    ('TxDb.Hsapiens.UCSC.hg19.knownGene', '3.2.2', local_bioconductor_options),
    ('Homo.sapiens', '1.3.1', local_bioconductor_options),
    ('BSgenome.Hsapiens.UCSC.hg19', '1.4.0', local_bioconductor_options),
    ('AgiMicroRna', '2.20.0', local_bioconductor_options),
    ('GenomeGraphs', '1.30.0', local_bioconductor_options),
    ('geneLenDataBase', '1.6.0', local_bioconductor_options),
    ('goseq', '1.22.0', local_bioconductor_options),
    ('KEGGREST', '1.10.1', local_bioconductor_options),
    ('KEGGgraph', '1.28.0', local_bioconductor_options),
    ('KEGGprofile', '1.12.0', local_bioconductor_options),
    ('GEOquery', '2.36.0', local_bioconductor_options),
    ('mixOmics', '5.2.0', local_ext_options),
    ('minfi', '1.16.1', local_bioconductor_options),
    ('FDb.InfiniumMethylation.hg19', '2.2.0', local_bioconductor_options),
    ('methylumi', '2.16.0', local_bioconductor_options),
    ('lumi', '2.22.1', local_bioconductor_options),
    ('widgetTools', '1.48.0', local_bioconductor_options),
    ('tkWidgets', '1.48.0', local_bioconductor_options),
    ('Mfuzz', '2.30.0', local_bioconductor_options),
    ('maSigPro', '1.42.0', local_bioconductor_options),
    ('SPIA', '2.22.0', local_bioconductor_options),
    ('Gviz', '1.14.7', local_bioconductor_options),
    ('cummeRbund', '2.12.1', local_bioconductor_options),
    ('GenomicFiles', '1.6.2', local_bioconductor_options),
    ('derfinderHelper', '1.4.1', local_bioconductor_options),
    ('derfinder', '1.4.4', local_bioconductor_options),
    ('polyester', '1.6.0', local_bioconductor_options),
    ('Rsubread', '1.20.5', local_bioconductor_options),
    ('pcaMethods', '1.60.0', local_bioconductor_options),
    ('marray', '1.48.0', local_bioconductor_options),
    ('CGHbase', '1.30.0', local_bioconductor_options),
    ('sigaR', '1.14.0', local_bioconductor_options),
    ('HCsnip', '1.10.0', local_bioconductor_options),
    ('metagenomeSeq', '1.12.0', local_bioconductor_options),
    ('gdsfmt', '1.6.2', local_bioconductor_options),
    ('SNPRelate', '1.4.2', local_bioconductor_options),
]

modextrapaths = {'R_LIBS': ''}

sanity_check_paths = {
    'files': [],
    'dirs': ['AnnotationDbi', 'BiocInstaller', 'GenomicFeatures'],
}

moduleclass = 'bio'
