RStudio Overview

Although many programming languages exist, the Damrauer Lab primarily uses the R programming language for analyses. The RStudio development environment for R enables efficient coding, filesystem navigation, and creation of dynamic documents, presentations, and publications which can be easily shared among collaborators. There is also a rich ecosystem of publicly-available packages that enable reproducible execution of code/analyses.

The default RStudio environment is based on a Docker/Singularity container maintained on ghcr.io. This includes basic bioinformatics features for R from Bioconductor, as well as common packages from the Tidyverse and elsewhere.

Accessing RStudio on the LPC

  1. If necessary (eg. off-campus) activate your VPN to join the PMACS network
  2. Login to scisub7 using: ssh username@scisub7.pmacs.upenn.edu
  3. Navigate to the rstudio directory in the voltron project folder: cd /project/voltron/rstudio/
  4. Execute run_rstudio_ssh.sh to start an interactive rstudio session: ./run_rstudio_ssh.sh or bash run_rstudio_ssh.sh

Each user can currently run one RStudio session at a time. Each session is created using a unique, job-specific password. The session can be accessed using any web browser. Once you execute the run_rstudio_ssh.sh command, you should see instructions for accessing your unique job. Sample instructions are reproduced below:

Starting RStudio Server session with 1 core(s) and 16GB of RAM per core...

1. Create an SSH tunnel from your local workstation to the server by executing the following command in a new terminal window:

    ssh -N -L 8787:roubaix:8787 username@scisub7.pmacs.upenn.edu 

2. Navigate your web browser to:

    http://localhost:8787 

3. Login to RStudio Server using the following credentials:

    user: username 
    password: password 

When finished using RStudio Server, terminate the job:

1. Exit the RStudio Session (power button in the top right corner of the RStudio window)
2. Issue the following command on the login node (scisub7.pmacs.upenn.edu):

    bkill jobid

Package Management

The default RStudio container includes RStudio Server, Bioconductor, Tidyverse, and other common packages. If you need a package that isn’t pre-installed within the container, you can install a copy within your user directory using typical commands like: install.packages() and devtools::install_github().

Singularity Images

The Singularity image containing the default RStudio container is located at https://ghcr.io/mglev1n/bioconductor-tidyverse. To update the image, execute the following commands in the terminal:

  1. Start an interactive session: bsub -q voltron_interactive -Is bash

  2. Load the singularity module: module load singularity

  3. Use the singularity pull command to download the image:

    • The default lab image can be found on the Github Container Repository: singularity pull oras://ghcr.io/mglev1n/bioconductor-tidyverse:singularity-latest

    • The singularity pull command can more broadly be used to download Docker/Singularity images from places like ghcr.io or Docker Hub and convert them to singularity containers: singularity pull docker://ghcr.io/rocker-org/tidyverse:latest

  4. Exit the interactive session using exit