Instructions to install R Modules on Dalma

In order to install R packages, we need to access the internet to download a script. During an interactive session on Dalma, R does not have access to bioconductor. So we will install the R packages on the login node and then start an interactive session to start the analysis.

First load the relevant modules and start R.

[msk8@login-0-4 rnaseq_alignment]$ module load gencore
Loading module 'gencore/1'
[msk8@login-0-4 rnaseq_alignment]$ module load gencore_build/1.0
[msk8@login-0-4 rnaseq_alignment]$ module load gencore_base
[msk8@login-0-4 rnaseq_alignment]$ module load gencore_rnaseq/1.0
[msk8@login-0-4 rnaseq_alignment]$ R

R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

>

Now we can source the bioconductor site to install the packages we are interested in. Note that the first time you do this, R will ask you if you want to setup a personal library. You must say yes. You don’t have permission to make changes to system wide R library.

>source("http://bioconductor.org/biocLite.R")
Warning in install.packages("BiocInstaller", repos = a["BioCsoft", "URL"]) :
'lib = "/scratch/gencore/.local/easybuild/software/gencore_rnaseq/1.0/lib/R/library"' is not writable
Would you like to use a personal library instead? (y/n) y
Would you like to create a personal library
~/R/x86_64-pc-linux-gnu-library/3.2
to install packages into? (y/n) y
trying URL 'http://bioconductor.org/packages/3.2/bioc/src/contrib/BiocInstaller_1.20.3.tar.gz'
Content type 'application/x-gzip' length 15942 bytes (15 KB)
==================================================
downloaded 15 KB

* installing *source* package ‘BiocInstaller’ ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Bioconductor version 3.2 (BiocInstaller 1.20.3), ?biocLite for help
A new version of Bioconductor is available after installing the most recent
version of R; see http://bioconductor.org/install
* DONE (BiocInstaller)

The downloaded source packages are in
‘/var/tmpdata/Rtmp4RHcDD/downloaded_packages’
Bioconductor version 3.2 (BiocInstaller 1.20.3), ?biocLite for help
A new version of Bioconductor is available after installing the most recent
version of R; see http://bioconductor.org/install

The packages needed for RNA-seq module. Before you start installing you can first check if the module is already available by running the library() command. Below the commands are assuming that none of the packages are installed. At the end of the installation message, you will get a message to update old packages, just type “n” for no.

> biocLite("Rsamtools")
.
.
.
* DONE (Rsamtools)

The downloaded source packages are in
‘/var/tmpdata/Rtmp4RHcDD/downloaded_packages’
Old packages: 'acepack', 'boot', 'cluster', 'codetools', 'colorspace', 'DBI',
'digest', 'fastcluster', 'foreign', 'futile.logger', 'ggplot2', 'gridExtra',
'gtable', 'Gviz', 'Hmisc', 'lambda.r', 'lattice', 'latticeExtra', 'Matrix',
'matrixStats', 'mgcv', 'munsell', 'nlme', 'nnet', 'plyr', 'proto', 'Rcpp',
'RcppArmadillo', 'RCurl', 'reshape2', 'RSQLite', 'scales', 'snow', 'stringi',
'stringr', 'survival', 'XML', 'xtable'
Update all/some/none? [a/s/n]: n

> biocLite("GenomicFeatures")
> biocLite("GenomicAlignments")
> biocLite("DESeq2")
> biocLite("GOstats")
> biocLite("GO.db")
> biocLite("Category")
> biocLite("org.At.tair.db")

Now we have to quit ( no need to save the workspace ) start an interactive session and start R again.

> quit()
Save workspace image? [y/n/c]: n