Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 179 lines (147 sloc) 7.94 KB
#! /bin/bash
# https://www.r-project.org/
# export GITHUB_PAT='5***b' 38 secret chars :)
. ./github_pat.source
if [ -z "$GITHUB_PAT" ] ; then
echo "# Error: GITHUB_PAT is not set, build of 'dynverse/dyno' is supposed to fail."
echo "# Check the dvteam mails for 'personal access token'"
exit 1
fi
PKG=R
VERSION=3.5.3
BUILD=0
PREFIX=/pkg/$PKG-$VERSION-$BUILD
if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi
# neither home nor /usr/local/package
PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin
export PATH
set -xe
umask 022
BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp
test -d $BUILD_TMPDIR && rm -r $BUILD_TMPDIR
mkdir -p $BUILD_TMPDIR/home
export TMPDIR=$BUILD_TMPDIR
export HOME=$BUILD_TMPDIR/home
exec </dev/null
mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi
EOF
. $PREFIX/profile
export MAKEFLAGS="-j $(nproc)"
# We need the environment (MAKEFLAGS, GITHUB_PAT), so '--vanilla' is no longer an option
# --vanilla : Combine --no-save, --no-restore, --no-site-file --no-init-file and --no-environ
STRACCIATELLA='--no-save --no-restore --no-site-file --no-init-file'
BUILDDIR=$BUILD_TMPDIR/build
mkdir -p $BUILDDIR
cd $BUILDDIR
( # for 'dynverse/dyno'
test -e udunits-2.2.26.tar.gz || wget ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.26.tar.gz
test -d udunits-2.2.26 || tar xvf udunits-2.2.26.tar.gz
cd udunits-2.2.26
CFLAGS='-O2 -fPIC' \
./configure --prefix=$PREFIX --libdir=$PREFIX/lib64 --enable-shared=no
make
make install
)
export UDUNITS2_INCLUDE=$PREFIX/include
export UDUNITS2_LIBS=$PREFIX/lib64
test -e R-$VERSION.tar.gz || wget https://cran.r-project.org/src/base/R-3/R-$VERSION.tar.gz
test -d R-$VERSION || tar xvf R-$VERSION.tar.gz
cd R-$VERSION
sed -i 's/en_GB/en_US/g' tests/reg-tests-3.R tests/reg-tests-3.Rout.save
./configure \
--prefix=$PREFIX \
--with-pic \
--with-recommended-packages \
--enable-shared \
--with-x \
--enable-R-shlib \
LDFLAGS=-Wl,-rpath,$PREFIX/lib64/R/lib
export TZ=CEST # some tests need timezone
make
make check
make install
cd $BUILDDIR
R $STRACCIATELLA --quiet -e "update.packages(repos='https://cran.uni-muenster.de/',ask=FALSE)"
# Bioconductor base packages
#
test -e biocLite.R || wget https://bioconductor.org/biocLite.R
R $STRACCIATELLA --quiet -e "source('biocLite.R');biocLite()"
# CRAN packages
# we install with BiocInstaller (biocLite), because some CRAN packages
# have dependencies into Bioconductor packages
#
PKG=(
AdequacyModel BBmisc BH BatchJobs BayesDA Boruta BradleyTerry2 C50 Cairo CircStats Ckmeans.1d.dp DBI
DEoptimR ExomeDepth FField Formula GGally GeneNet GlobalOptions HMM HardyWeinberg Hmisc KernSmooth
LSD Lahman LearnBayes MASS MatrixEQTL Matrix PerfMeas R.cache R.methodsS3 R.oo R.utils R2HTML R6
RCircos RColorBrewer RCurl RGtk2 RJSONIO RMySQL ROCR RRF RSQLite RUnit RWeka RWekajars RcppArmadillo
RcppEigen Rcpp SparseM SuppDists TFMPvalue TH.data TSP TeachingDemos VGAM VennDiagram WGCNA XML
abind acepack ade4 akima aod ape ash assertthat base64 base64enc bdsmatrix beanplot beeswarm bgmm
bigmemory.sri bigmemory bigrf bit bitops boot bootstrap bpca brew brglm c060 caTools car caret
checkmate chron circlize class clue cluster coda codetools coin colorspace combinat corpcor
corrgram corrplot crayon curl data.table deldir devtools dichromat digest dismo doMC doParallel
doRNG doSNOW dostats dplyr dtw dynamicTreeCut e1071 earth elasticnet energy entropy evaluate evd
exactRankTests fANCOVA fail fastICA fastcluster fastmatch fdrtool fields filehash flashClust foreach
foreign formatR futile.logger futile.options gRbase gbm gclus gdata genetics getopt ggm ggplot2 git2r
glasso glmnet gmp gnm gplots gridBase gridExtra gridSVG grofit gsubfn gtable gtools h2o haplo.stats
harvestr hash hdi hdrcde hexbin hflights highr hsmm htmltools httpuv httr hwriter igraph inline intervals
ipred iterators itertools jsonlite kernlab knitr ks labeling lambda.r lars latticeExtra lattice lava
lazyeval leaps lhs linprog lint lintr lme4 lmtest locfit longitudinal lpSolve magrittr manipulate mapproj
maps maptools maptree markdown matrixStats mclust mda memoise meta mgcv mice microbenchmark mime minqa
misc3d mitools mixtools mlegp mnormt modeltools multcomp multicool munsell mvtnorm nleqslv nlme nloptr
nnet nor1mix numDeriv optparse pROC pamr party partykit pbapply pbkrtest pcalg penalizedSVM peperr pheatmap
pkgmaker plotmo plotrix pls plus plyr prodlim profileModel proto proxy pwr qtl quadprog quantreg qvcalc
rFerns rJava randomForest randomGLM raster rbenchmark registry relaimpo relimp remotes reshape2 reshape rex
rggobi rgl rjson rlecuyer rmarkdown rmeta rngtools robustbase roxygen2 rpart rstudioapi rversions sandwich
scales scalreg scatterplot3d sda segmented sendmailR seqinr seriation setRNG setwidth sfsmisc shape
shiny sm snow snowfall som sp spam spatial spdep splancs spls statmod stepPlr stringdist stringi stringr
strucchange survey survival survrec svMisc svTools tables testthat tgp tidyr vcd venneuler verification
waveslim whisker xlsx xlsxjars xml2 xtable yaml zipfR zoo
)
P=$(printf ',"%s"' "${PKG[@]}") # ,"ACME","ALL"....
P=${P#,} # "ACME","ALL",...
R $STRACCIATELLA --quiet -e "source('biocLite.R');biocLite(c($P))"
# Bioconductor packages, and user request even if they are from cran, reason: see above
PKG=(
ACME ALL AnnotationDbi AnnotationForge BSgenome.Ecoli.NCBI.20080805 BSgenome BeadDataPackR BioNet Biobase
BiocGenerics BiocInstaller BiocParallel Biostrings CNEr Category CellNOptR ChIPpeakAnno DESeq2 DESeq
DNAcopy DirichletMultinomial FDb.InfiniumMethylation.hg19 GEOquery GO.db GOTHiC GOstats GSEABase GSEAlm
GenomeGraphs GenomeInfoDb GenomicAlignments GenomicFeatures GenomicRanges GlobalAncova Gviz HTqPCR
Homo.sapiens IRanges MEDIPS OmicCircos OrganismDbi RBGL ROC Rgraphviz Rhtslib Rsamtools S4Vectors
ShortRead TFBSTools TxDb.Hsapiens.UCSC.hg19.knownGene VariantAnnotation XVector affyPLM affy affyio
annotate arrayQualityMetrics bamsignals beadarray biomaRt biovizBase bumphunter chipseq cummeRbund easyRNASeq
edgeR exomeCopy gcrma genefilter geneplotter genomeIntervals ggbio globaltest graph hgu95av2 hgu95av2cdf
illuminaio impute limma lumi methylumi minfi multtest muscle org.Hs.eg.db pcaMethods preprocessCore qvalue
rhdf5 rtracklayer seqLogo siggenes simpleaffy snpStats topGO vsn yeastCC zlibbioc
DEXSeq
qsea # 13.12.2016 lienhard
devtools # 29.03.2017 pacini
YosefLab/scone # 29.03.2017 pacini
rhondabacher/SCnorm # 29.03.2017 pacini
MAST # 29.03.2017 pacini
scDD # 03.03.2017 pacini
zinbwave # 15.03.2018 stanisla
monocle # 21.06.2018 pacinihdf5r
hdf5r Seurat # 20.08.2018 kretzmer
# digest # 29.08.2018 stanisla (update request, already present see above)
QuasR MethylSeekR # 30.08.2018 alena
rnaseqGene apeglm # 4.09.2018 alena
RNAseq123 Glimma # 4.09.2018 alena
RhpcBLASctl # 8.04.2019 Kreitler
)
P=$(printf ',"%s"' "${PKG[@]}") # ,"ACME","ALL"....
P=${P#,} # "ACME","ALL",...
R $STRACCIATELLA --quiet -e "source('biocLite.R');biocLite(c($P))"
# Finally the things that come from github
R $STRACCIATELLA --quiet -e 'library("devtools");install_github("jokergoo/ComplexHeatmap");install_github("jokergoo/EnrichedHeatmap")' # 15.02.2019 kretzmer
# dynverse/dyno likes to have Slingshot, SCORPIUS and Monocle3 from a singularity context, well
# at least rcannood/SCORPIUS builds w/o fuzz.
R $STRACCIATELLA --quiet -e 'library("devtools");install_github("rcannood/SCORPIUS", build_vignettes = TRUE)'
R $STRACCIATELLA --quiet -e 'library("devtools");install_github("dynverse/dyno")' # 8.04.2019 Virginie Stanislas
# BPSC needs kpsewhich from '/usr/local/package/bin/kpsewhich', so extend the path here and now
PATH=$PATH:/usr/local/package/bin
R $STRACCIATELLA --quiet -e 'library("devtools");install_github("nghiavtr/BPSC")' # 3.03.2017 pacini
exit