Commit 5f8a99af authored by Lorenz Kapsner's avatar Lorenz Kapsner

reset, clean push of v16.3 from ubuntu host

parent 37700236

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This diff is collapsed.
include makefile.inc
postgres:
$(MAKE) -C ddl/postgres/GLOBAL createdb
$(MAKE) postgres_load
postgres_load:
$(MAKE) -C ddl/postgres load
$(MAKE) -C data/postgres load
postgres_drop:
$(MAKE) -C ddl/postgres/GLOBAL drop
oracle:
$(MAKE) -C ddl/oracle load
$(MAKE) -C data/oracle load
oracle_drop:
$(MAKE) -C ddl/oracle drop
update_datasets:
$(MAKE) -C samples/studies update_datasets
.PHONY: postgres postgres_load postgres_drop oracle oracle_drop update_datasets
/root/
/build/
/R-*/
include ../makefile.inc
R_MIRROR ?= http://cran.ma.imperial.ac.uk
R_VERSION = 3.5.1
R_SOURCE = R-$(R_VERSION)
R_PREFIX ?= $(realpath .)/root
R_EXEC = $(R_PREFIX)/bin/R
RSERVE_CONF ?= $(realpath .)/Rserv_nodaemon.conf
R_FLAGS ?= -O2 -march=native
$(R_SOURCE):
curl -f $(R_MIRROR)/src/base/R-3/$@.tar.gz | $(TAR_COMMAND) xzf -
build/Makefile: $(R_SOURCE)
mkdir -p build && cd build && \
CFLAGS="$(R_FLAGS)" \
CXXFLAGS="$(R_FLAGS)" \
FFLAGS="$(R_FLAGS)" \
LIBnn=lib \
LDFLAGS="-Wl,-rpath=$(R_PREFIX)/lib/R/lib,--enable-new-dtags" \
../$(R_SOURCE)/configure --prefix=$(R_PREFIX) \
--enable-R-shlib --with-readline \
--enable-R-profiling --enable-memory-profiling \
--with-libpng --without-jpeglib --without-libtiff \
--without-system-xz --without-ICU \
--without-recommended-packages
# for the default prefix, expose a relative path target
ifeq ($(R_PREFIX), $(realpath .)/root)
root/bin/R: $(R_EXEC)
endif
$(R_EXEC): build/Makefile
$(MAKE) -C build -j8 && $(MAKE) -C build -j8 install
cran_packages: cran_pkg.R $(R_EXEC)
CRAN_MIRROR=$(R_MIRROR) $(R_EXEC) -f $<
other_packages: other_pkg.R cran_packages $(R_EXEC)
CRAN_MIRROR=$(R_MIRROR) $(R_EXEC) -f $<
install_packages: cran_packages other_packages
start_Rserve start_Rserve.dbg:
$(R_EXEC) CMD $(patsubst start_%,%,$@)
# phony target because it depends on value of env var
write_default_rserve:
@test -n '$(TRANSMART_USER)' || { \
echo 'Define $$TRANSMART_USER' 2>&1 ; false; }
echo 'USER=$(TRANSMART_USER)' > /etc/default/rserve
$(RSERVE_CONF): Rserv_nodaemon.conf
mkdir -p '$(dir $@)'
cp '$<' '$@'
# must be run as root
install_rserve_init: /etc/init.d/rserve
/etc/init.d/rserve: write_default_rserve $(RSERVE_CONF)
R_PREFIX='$(R_PREFIX)' RSERVE_CONF=$(RSERVE_CONF) php \
-d variables_order=E -d open_basedir=/ \
rserve.php > $@
chmod +x '$@'
install_rserve_upstart: /etc/init/rserve.conf
/etc/init/rserve.conf: write_default_rserve $(RSERVE_CONF)
R_PREFIX='$(R_PREFIX)' RSERVE_CONF=$(RSERVE_CONF) php \
-d variables_order=E -d open_basedir=/ \
rserve.conf.php > $@
initctl reload-configuration
install_rserve_unit: /etc/systemd/system/rserve.service
/etc/systemd/system/rserve.service: $(RSERVE_CONF)
R_PREFIX='$(R_PREFIX)' RSERVE_CONF=$(RSERVE_CONF) \
TRANSMART_USER=$(TRANSMART_USER) php \
-d variables_order=E -d open_basedir=/ rserve.service.php > $@
systemctl daemon-reload
clean:
rm -rf build $(R_SOURCE) root
.PHONY: install_packages cran_packages other_packages clean \
start_Rserve start_Rserve.dbg install_init write_default_rserve
.DELETE_ON_ERROR:
# See http://rforge.net/Rserve/doc.html#conf for more information
# Don't change the next line; the job/service expects the program not to fork
deamon=0
required.packages <- c("reshape", "reshape2", "ggplot2", "data.table", "Cairo",
"snowfall", "gplots", "Rserve", "foreach", "doParallel", "visreg",
"pROC", "jsonlite", "RUnit");
missing.packages <- function(required) {
return(required[
!(required %in% installed.packages()[,"Package"])]);
}
new.packages <- missing.packages(required.packages)
if (length(new.packages)) {
print("Installing packages...")
print(new.packages)
install.packages(new.packages, repos=Sys.getenv("CRAN_MIRROR"));
}
if (length(missing.packages(required.packages))) {
print("Failed packages...")
failed.packages <- missing.packages(required.packages)
print(failed.packages)
warning('Some packages not installed');
quit("no");
}
# WCGNA is in CRAN but depends on several packages not in cran (impute, GO.db,
# AnnotationDbi), which is something that really should not happen with a sane
# repository.
# Anyway, that's why it is installed here
required.packages <- c("WGCNA", "impute", "multtest", "CGHbase", "CGHtest",
"CGHtestpar", "edgeR", "snpStats", "preprocessCore",
"GO.db", "AnnotationDbi", "QDNAseq");
missing.packages <- function(required) {
return(required[
!(required %in% installed.packages()[,"Package"])]);
}
new.packages <- missing.packages(required.packages);
if (!length(new.packages))
q();
source("http://bioconductor.org/biocLite.R");
bioclite.packages <-
intersect(new.packages, c("impute", "multtest", "CGHbase", "edgeR",
"snpStats", "preprocessCore", "GO.db",
"AnnotationDbi", "QDNAseq"));
if (length(bioclite.packages))
biocLite(bioclite.packages);
# 1.10.0 version contains an important fix.
# We still need to install the old package with biocLite first to install all dependencies.
# For some reasons below installations does not take care of installing dependencies first.
download.file(
url="http://bioconductor.org/packages/release/bioc/src/contrib/QDNAseq_1.16.0.tar.gz",
dest="/tmp/QDNAseq_1.16.0.tar.gz", method="internal");
install.packages("/tmp/QDNAseq_1.16.0.tar.gz",
repos=NULL, type="source");
if (length(intersect(new.packages, c("CGHtest")))) {
download.file(
url="http://files.thehyve.net/CGHtest_1.1.tar.gz",
dest="/tmp/CGHtest_1.1.tar.gz", method="internal");
install.packages("/tmp/CGHtest_1.1.tar.gz",
repos=NULL, type="source")
}
if (length(intersect(new.packages, c("CGHtestpar")))) {
download.file(
url="http://files.thehyve.net/CGHtestpar_0.0.tar.gz",
dest="/tmp/CGHtestpar_0.0.tar.gz", method="internal");
install.packages("/tmp/CGHtestpar_0.0.tar.gz",
repos=NULL, type="source")
}
if (length(intersect(new.packages, c("WGCNA")))) {
install.packages("WGCNA", repos=Sys.getenv("CRAN_MIRROR"));
}
if (length(missing.packages(required.packages))) {
print("Failed packages...")
failed.packages <- missing.packages(required.packages)
print(failed.packages)
warning('Some packages not installed');
quit("no");
}
<?php
$p = $_ENV['R_PREFIX'];
$c = $_ENV['RSERVE_CONF'];
?>
description "Rserve (TCP/IP server for running R expressions)"
start on runlevel [2345]
stop on runlevel [!2345]
pre-start script
if [ -f /etc/default/rserve ]; then
. /etc/default/rserve
fi
if [ -z "$USER" ]; then
echo '$USER not defined' >&2
stop; exit 0;
fi
end script
script
if [ -f /etc/default/rserve ]; then
. /etc/default/rserve
fi
exec sudo -u "$USER" '<?= "$p/bin/R" ?>' CMD Rserve --quiet --vanilla --RS-conf '<?= "$c" ?>'
end script
respawn
R/rserve.php 0 → 100755