You can run RStudio and the all the code in this workshop using University of Michigan’s Great Lakes High Performance Cluster (HPC). By the end of this guide you will be able to:
You can run RStudio locally on your workstation. However, running RStudio on Great Lakes is a nice approach because:
That said, using Great Lakes is different than using your laptop/workstation. A few key ideas:
If you have problems/questions, please don’t hesitate to email us at: bioinformatics-workshops@umich.edu
When emailing it will speed things along if you could include:
You need a UM core-imaged workstation and a web browser.
You need to be on UM campus or connected to the UM VPN or Michigan Medicine VPN using Cisco Secure Client. (This will require Duo 2-factor authentication.)
You need a user account on Great Lakes. The first time, you need to request this from ARC; it can take 1-2 days to get set up:
You will need data. Below, we’ll show you how to download the input data used in the workshop, but you can adapt that to use your own data.
Open OnDemand (OOD) connects you to the Great Lakes cluster through your web browser. Once you’ve got everything you need from above, you’re going to use OOD to launch a RStudio session.
If off-campus, connect to the VPN using Cisco Secure Client.
In your browser, go to Great Lakes Open On Demand:
greatlakes.arc-ts.umich.edu and login with your
uniqname and password.
In the menu at the top of the screen, click Interactive
Apps and select RStudio.
The previous step will display a launch configuration
page with several fields, e.g. …
Enter values below in the corresponding fields:
Field | Value |
---|---|
R Version | Rtidyverse/4.4.0 |
RStudio version | RStudio/2024.04.1 |
Slurm account | (This is in the email from ARC) |
Partition | standard |
Number of hours | 4 (Enough to get started, adjust if you need more time) |
Number of cores | 1 |
Memory (GB) | 4 (Enough to get started, ok to boost this if you ever run out) |
Module commands |
After you’ve entered the values above, at the bottom of this page
click Launch. (Conveniently, the values you entered
above will now be your default for launching an RStudio session.) The
screen will update to show Great Lakes is preparing your session.
When the session is ready (usually a few seconds later), the
screen will update:
This will open a new browser tab that contains your RStudio
session:
You may see a prompt asking permission to use the clipboard.
Click Allow.
The inputs used in the workshop can be installed locally. In the
RStudio window, click on the Terminal tab. The tab will
be blank with a prompt that looks something like this:
[YOUR_UNIQNAME@glXXXX ~]$
Paste the following block into the Terminal prompt: and hit Enter/Return.
# download workshop inputs --------------------------------------------------
mkdir -p intro-r-rstudio-workshop
cd intro-r-rstudio-workshop
# Use curl to download
# We'll use evironment variables to avoid extremely long command lines
source_url="https://umich-brcf-bioinf-workshop.s3.us-east-1.amazonaws.com"
source_file="IRR/workshop-inputs-irr.tgz"
curl -o workshop_irr_inputs.tgz ${source_url}/${source_file}
# tar unpacks the tarball into directories
tar xzvf workshop_irr_inputs.tgz
# Since we have unpacked the tarball, we can remove it
rm workshop_irr_inputs.tgz
ls IRR/data
The last line should show two files:
gapminder_1997.csv
gapminder_data.csv
Now you can review the workshop lessons.
Below are details on several ways to move files to or from Great Lakes.
Note that to transfer a file to/from Great Lakes, you will need to be on the campus network or on the VPN.
Open OnDemand (OOD) lets you browse your files and move small files (e.g. scripts or plots) between your workstation and Great Lakes using your web browser.
1.1 In your workstation’s browser, open the OOD Dashboard. Along the top menu, click on Files. (Note that if you shrink the screen very small, the menu items will be hidden in a “hamburger”.) In the dropdown menu, click Home Directory.
1.2 OOD will
display the contents of your home directory. You can click on a
directory to see its contents.
1.3 To view a
plot graphic, you can click on the hamburger and then select
View. This will open the plot in a new browser tab.
1.4 You can
download one or more files by selecting their checkboxes and clicking
the Download button. (Note: if you select a directory
and click Download, OOD will download the contents as a
single zipped file.)
To analyze your own files, we recommend transferring them to Great Lakes using Globus.
Globus is a fast, secure, and fault tolerant way to move files of any size.
Globus is much better than OOD for transferring larger files like FASTQ files, Cell Ranger outputs, or saved Seurat data objects.
Details on how to set up and use Globus are outside the scope of this guide, but we recommend these links:
For larger files/directories, we strongly recommend you use Globus.
That said, if you are more comfortable with command line tools, you can
transfer files using the secure copy command scp. scp
is a lot like cp
but it allows you to copy files across a network.
To transfer from your workstation to Great Lakes:
3.1 From you workstation terminal or command window, cd
into the directory that contains your data. 3.2 Adjust the
scp
command below to match the correct source directory and
uniqname and hit Enter/Return to execute.
# Copy the SOURCE_DIR dir contents from your workstation to Great Lakes home dir
# -r copies recursively
# -p preserves the file modification times
scp -pr SOURCE_DIR YOUR_UNIQNAME@greatlakes-xfer.arc-ts.umich.edu:
3.3 The first time you run this command, you may see a prompt like the following; type yes and hit Enter/Return to continue.
The authenticity of host '...' can't be established.
ECDSA key fingerprint is SHA256:....
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
The command will print a warning (e.g. Warning: Permanently added ‘SERVER_ADDRESS’ to the list of known hosts). This is fine.
3.4 When prompted, type your UM password followed by Enter/Return.
3.5 You can also transfer files from Great Lakes to your workstation.
From your workstation terminal or command window, adjust the
scp
command below to match the correct source file and
uniqname and hit Enter/Return to execute.
# Copy the SOURCE_FILE from Great Lakes to your current workstation dir
scp YOUR_UNIQNAME@greatlakes-xfer.arc-ts.umich.edu:PATH/TO/SOURCE_FILE .
3.6 When prompted, type your UM password followed by Enter/Return.