-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_bioc.sh
executable file
·28 lines (19 loc) · 1.16 KB
/
install_bioc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
Rver="R-3.3.1"
# The "Matrix" package dependency will fail if these aren't symlinked
ln -s /usr/lib/liblapack.so.3 /usr/lib/liblapack.so
ln -s /usr/lib/libblas.so.3 /usr/lib/libblas.so
# Install and build R (Using 'apt-get install' on Ubuntu Trusty installs version 3.0.2 of R)
curl https://cran.r-project.org/src/base/R-3/${Rver}.tar.gz | tar -C /opt -zx
cd /opt/${Rver}
/opt/${Rver}/configure --with-readline=no --with-x=no || exit 1
make || exit 1
make install || exit 1
apt-get -qq install -y --no-install-recommends r-base-dev
# Install Bioconductor programs we need
echo "install.packages(c(\"devtools\", \"gplots\", \"survival\"), repos=\"http://lib.stat.cmu.edu/R/CRAN/\")" | R --save --restore || exit 1
echo "source(\"http://bioconductor.org/biocLite.R\"); biocLite(c(\"cummeRbund\", \"DESeq\", \"edgeR\"), ask=FALSE)" | R --save --restore || exit 1
# TODO - Eventually install \"DESeq2\" as well
# RSQLite must be no higher than version 1.1.2, since cummeRbund is not compatible with later versions
echo "require(devtools); install_version(\"RSQLite\", version = \"1.1-2\", repos = \"http://cran.us.r-project.org\")" | R --save --restore || exit 1
# done