R-CBRG

Section: CCB R (7)
Last updated: Wed 10 Jan 16:53:42 GMT 2024
Index Return to Main Contents
 

DEPRECATION NOTICE

This CCB documentation has been superseded by our new website: https://lumin.imm.ox.ac.uk  

OVERVIEW

As well as the standard R versions that you'd normally expect, we've additionally preinstalled hundreds of additional packages for you to use R-installs(7). These are available via the R-cbrg module.  

BASIC USAGE

If you just want to get up and running with our curated set of commonly used bioinformatics packages, you can do so with a single command:

$ module load R-cbrg

If you just want to use R and have no need for any other command line tools, simply navigate any browser to https://rstudio.molbiol.ox.ac.uk. If at any point your session becomes unresponsive and you want to terminate it and start a new one, log into your account via SSH and run the following command:

$ touch ~/.kill_my_R_session
Then wait for 5 minutes. Please note that this will terminate all processes that you are running on our R-Studio / Jupyter Notebook server.  

REQUESTING ADDITIONAL PACKAGES

If you need to use a package which isn't already installed, please contact us via the address below before attempting to install a local copy. In many cases we can easily add it to the central installation.  

IMAGE PLOTTING PROBLEMS

If you have problems with errors relating to X11 when making graphical plots, this is most likely due to JADE not having an X-server installed. To work around this problem, please add the following to your R scripts:
options(bitmapType='cairo')
 

ADVANCED USAGE

The setup of the R-cbrg module uses the following system. R-base contains fixed, unchanging installations of the base languages. This is for safety; they cannot be accidentally overwritten causing unexpected changes of behaviour. R-cbrg contains separate package and library repositories for each version of R. Because packages and library versions also change over time, we take a snapshot of the state every 3 months and then lock this to prevent changes causing unexpected behaviour. A single current version for each provides a continual rolling 'head' where changes are applied. Loading the R-cbrg module will automatically pull in the latest stable base and all packages or libraries:

$ module load R-cbrg
Loading R-cbrg/current
  Loading requirement: R-base/4.3.0
$ module list
Currently Loaded Modulefiles:
  1) R-base/4.3.0(default) 2) R-cbrg/current(default)
If you want to use a different version of the libraries, for example because a recent update broke something you relied on, you can do that by loading it manually:

$ module load R-cbrg/202104
Loading R-cbrg/202104
  Loading requirement: R-base/4.3.0
$ module list
Currently Loaded Modulefiles:
   1) R-base/4.3.0(default) 2) R-cbrg/202104
 

RSTUDIO TALKING TO PYTHON

Some R packages interface with Python packages, for example Seurat interfaces with Python Numpy. This is easy to enable with our module system, but tricky within RStudio. To achieve manually, append the following R code to the top of your main R script. This just mimics loading our Python module python-cbrg. Ensure it is executed before reticulate is loaded anywhere.
python_bin_dir <- "/package/python-base/3.11.3/bin"
python_pkg_dir <- "/package/python-cbrg/current/3.11/lib/python3.11/site-packages"
Sys.setenv(PATH = paste(python_bin_dir, Sys.getenv("PATH"), sep=':'))
Sys.setenv(PYTHONPATH = paste(python_pkg_dir, Sys.getenv("PYTHONPATH"), sep=':'))
 

GETTING HELP

You can email the CCB team using the email address help@imm.ox.ac.uk. Using this address ensures your email is logged and assigned a tracking number, and will go to all the core team, which means the appropriate person or people will be able to pick it up.  

COPYRIGHT

This text is copyright University of Oxford and MRC and may not be reproduced or redistributed without permission.  

AUTHOR

Duncan Tooke <duncan.tooke@imm.ox.ac.uk>  

SEE ALSO

python-cbrg(7)


 

Index

DEPRECATION NOTICE
OVERVIEW
BASIC USAGE
REQUESTING ADDITIONAL PACKAGES
IMAGE PLOTTING PROBLEMS
ADVANCED USAGE
RSTUDIO TALKING TO PYTHON
GETTING HELP
COPYRIGHT
AUTHOR
SEE ALSO