3 Exercises

3.1 Launch Terra

Go to anvilproject.org, find the box that says Terra, and click on “Launch”.

The terra launch button on AnVIL Next, you will need Log in.

The log in button for AnVIL

If you have never used AnVIL before, you will need to create a new account. You can use a Google or Institutional account to log in. Otherwise if you already have an account, you can skip ahead to the next section.

the first window when starting an account with AnVIL

To create an account you will need to supply some information and read the Terra Terms of Service.

If you accept the Terms of Service, check the box for agreement and the register button will become active.

The inactive register button because the box has not been checked for agreement with the terms of service.

The active reister button

This will open a new tab for you of the AnVIL workspaces, now you are ready to start working in AnVIL!

The workspaces window for AnVIL

3.2 Clone HPRC Workspace

At anvil.terra.bio/#workspaces:

  • Enter hprc in the search box
  • Click on the “Public” tab
  • Find the AnVIL_HPRC workspace
  • Click on the circle with three vertical dots on the right side of the workspace information window

An image of the workspace window showing searching for the hprc workspace

Select “Clone” from the menu options.

An image of the workspace options menu to clone the workspace

You can also directly access the workspace going to this link: https://anvil.terra.bio/#workspaces/anvil-datastorage/AnVIL_HPRC

If you have set up billing before, you can skip ahead to the Starting a cloud environment section.

If your instructor has provided a billing project, you can skip to the Use a billing project section.

3.2.1 First Time Billing Setup

If this is your first time on AnVIL, you will likely get a message that you need to start a Google Cloud billing account.

Message about needing a billing account

This will open a new page about linking a Google Cloud billing account to Terra. Click on the “Go to Google Cloud Console” button.

Billing account page

You may get a warning that you also need to set up two factor authentication. If so, please do so with your credentials. If you run into challenges, try one of your other accounts in which you have full administrative access.

warning about 2 factor authentication

Otherwise, or after you set up two factor authentication, you should get a message about having some free credits to use. Select to allow for any needed authorization and then click on the button that says “Try for free”.

Google Cloud $300 free credits

You will then need to set up your payment information. Don’t worry, you will not be exceeding the free credit amount, so you will not actually be charged!

Payment information window

Once you do this, you will see a “Start free” button become active.

Start free button

You will then see a message confirming you set up your account and have free credits.

Next you will need to add Terra to your billing account. Follow Step 2 in this guide to do so. Note that you will need to select “Project Billing Manager” instead though.

It may take a few minutes for these changes to become active, but then you can go back to AnVIL and check that you have added a billing manager for Step 2.

For this STEP 2, you will select “I have a billing account”.

Step 2 menu

Next for STEP 3, check that you have added terra as a billing manager.

Step 3 menu

You will need to authenticate the connection with Terra again.

Finally you will do STEP 4 to create a Terra billing project. If step 4 has a warning about your account not being set up right, you may need to click the refresh button that is in the warning.

Your instructor will provide information about the billing account that you should use and will set you up with one.

3.3 Use a Billing Project

Now you may or may not yet have access visible on this screen, but go back to clone the workspace using the menu on the far left of the AnVIL_HPRC workspace. This time, clicking on clone should pull up a new window that asks for the billing project. Select the account that your instructor told you about, and do not change the other settings.

Window for cloning, fill out the appropriate billing project from your instructor

Leave everything on the next two screens (sharing and Extra Security Options) as is as well.

Finally, click the blue “Create Workspace” button in the lower right corner on the Extra Security Options screen.

The create workspace button

3.4 Start a Cloud Environment

  • Click on the Environment Configuration (cloud icon)
  • Select Jupyter Settings
  • Scroll down and click “Create”

3.5 Find Tidbits

  • In the Dashboard tab, what are three types of sequencing data that are available?
  • In the Data tab participant table, what two superpopulations have the most participants?
  • In the Data tab sample table, how many samples lack any ilmn data?
  • In the Data tab assembly_sample table, what is the command to download the HG002 mat_fasta file?

3.6 Enter Terminal

  • In the Analysis tab, click on Terminal
  • Make a working copy of the HG002 mat_fasta
    • NOTE: Requester pays buckets require -u <google-project-id> [ref]
  • Examine file with ls -l and zcat *.fa.gz | head
gsutil cp 'gs://fc-4310e737-a388-4a10-8c9e-babe06aaf0cf/working/HPRC_PLUS/HG002/assemblies/year1_f1_assembly_v2_genbank/HG002.maternal.f1_assembly_v2_genbank.fa.gz' .

3.7 Shut Down

  • Click on the Environment Configuration (cloud icon)
  • Select Jupyter Settings
  • Scroll down and click “Delete Environment”
  • Select “Delete” after deciding to keep or delete your persistent disk
  • Click “hamburger” icon in the upper left, expand your name, select Cloud Environments and confirm no unnecessary resources are running