1.4 AnVIL Onboarding
1.4.1 Join AnVIL
1.4.1.1 Purpose
You will need an account on AnVIL in order to use the platform. In this section we’ll go over the specifics of account creation.
1.4.1.2 Learning Objectives
- Create an account on AnVIL
- Login to AnVIL
- Share the email you used to sign up for AnVIL with your instructor (if applicable)
1.4.1.3 Introduction
AnVIL (The Genomic Data Science Analysis, Visualization, and Informatics Lab-space) is a platform created by the National Human Genome Research Institute (NHGRI) in collaboration with cloud computing platform providers like Google and Microsoft. Using AnVIL we can access computing resources on the cloud through your browser without need for any fancy physical equipment. Through AnVIL you will also have access to all the software and data necessary to complete your research project.
In this section, we will set up our accounts on AnVIL and go through the entire lifecycle of an RStudio environment from creation to deletion. You will repeat this process throughout the semester; feel free to refer back to this section if you need a refresher on how to use AnVIL.

1.4.1.4 Part 1 – Create an account on AnVIL
Follow the written steps below or refer to the slides or video guide.

- Open anvil.terra.bio in Google Chrome . Google Chrome is the only officially supported web browser for AnVIL. Because of this, while you can run AnVIL in other browsers you strongly suggest using Chrome.
- Tip: bookmark this page so that you can easily access it throughout the course.
- Click the hamburger icon (3 lines) in the top left corner of the screen
- Click “Sign in”

- Click “Sign in with Google”.
- Sign in with a Google associated email address such as an institutional email that uses Gmail or a personal Gmail account. You must use a Google associated email address to gain access to Google Cloud computing resources.
- If you are a student, share the email you used to sign up for AnVIL with your instructor following their instructions.
Instructors should collect the student emails and use them in the next section, “Setting up workspaces on AnVIL.” Students do not need to set up a workspace, and should proceed to the section, “Running a module on AnVIL”.
1.4.2 Running a module on AnVIL

1.4.2.1 Purpose
In this section we will go over how to run C-MOOR modules on AnVIL. We will go over how to create an RStudio environment in that workspace to run the module and properly end a session on AnVIL to prevent runaway costs.
1.4.2.2 Learning Objectives
- Launch a module through the cloned workspace
- Close out a session on AnVIL properly to prevent runaway costs
1.4.2.3 Introduction
Before beginning this assignment, you should have already created an AnVIL account and submitted the email you used to sign up for AnVIL to your instructor. In this assignment you will learn how to setup an RStudio environment on AnVIL. This environment is analogous to preparing a lab space for a physical lab. You have to have the right equipment and reagents to be able to do the activity.
This assignment shows you how to set up the RStudio environment and start up your first C-MOOR tutorial.
1.4.2.4 Part 1 – Confirm you have access to your class workspace
The workspace is the heart of AnVIL. To be able to run modules, you need to have access to the class workspace. Here are some key points about workspaces:
- Every workspace comes with its own Google Bucket (our cloud storage). Your bucket will be empty.
- Every workspace has its own billing project. Students who are not yet associated with a billing project will not be able to compute on their workspace.
- We can control access levels of users and set them either as owners, writers, or readers. Students will be writers with compute access.
The workspace is the heart of AnVIL.
- Open AnVIL in Google Chrome
- Click on the hamburger icon in the top left corner
- Login to your AnVIL account
- Click on the hamburger icon in the top left corner again
- Click workspaces
- Confirm you see your class workspace
- Click on the workspace name to enter the workspace.
1.4.2.5 Part 2 – Start access a module
When you open the workspace, you will be on the dashboard tab by default. The dashboard contains the instructions on how to use the workspace, links to C-MOOR websites, and the startup script. Let’s try running a module.

Copy the URL of the startup script. Make sure there are no spaces before or after what you copy. This script is held in the original workspace everyone cloned. You will need to input this URL soon.
Click on the Environment Configuration button, the cloud with a thunderbolt.

In the RStudio section, click Settings
In the startup script field, paste the URL for the startup script.
Select 4 CPUs and 15 gigabytes of memory.
Confirm that the cloud compute cost is 20 cents per hour. If it is not 20 cents per hour, reselect CPUs and memory allocation in step 5 This is a known bug in AnVIL at the writing of this guide.
Scroll to the bottom of the window and click “Create”. It will take about 2 minutes for the environment to be created.

It will take some time for the RStudio Environment to be created. You can keep track of the status of the environment based on the colored dot next to the RStudio icon. The dot will turn green when the environment is ready. While it is loading (blue), you cannot interact with it.

- When the environment is ready, use the Open RStudio button that will pop up. If you hold down Ctrl as you click, you can open RStudio in a new window.

- Use the file explorer in RStudio to navigate to your module of choice. First, enter the folder of the curriculum you are using, either rnaseq (not cure-rnaseq) or 16s. Then enter the folder of the module you want to run.

- In the module’s directory, open the .Rmd file by double clicking its name.

- Click Run Document in the open .Rmd file
When you are finished, make sure you close out your session properly to prevent runaway costs!.
1.4.2.6 Part 3 – Closing out a session on AnVIL

- On the right side of the screen, click the Cloud Environment button. This is the Cloud with the lightning symbol.
- Under the RStudio section, click settings.
- Scroll to the bottom of the new window and click delete environment.
- Check Delete everything, including the persistent disk or your instructor’s billing account will incur costs for storage.