diff --git a/docs/01-intro.md b/docs/01-intro.md new file mode 100644 index 0000000..6bf7749 --- /dev/null +++ b/docs/01-intro.md @@ -0,0 +1,18 @@ +# (PART\*) Demo Chapters {-} + + + + +# Introduction + + +## Motivation + + +## Target Audience + +The course is intended for ... + +## Curriculum + +The course covers... diff --git a/docs/02-chapter_of_course.md b/docs/02-chapter_of_course.md new file mode 100644 index 0000000..4d203f3 --- /dev/null +++ b/docs/02-chapter_of_course.md @@ -0,0 +1,299 @@ + +# A new chapter + +*If you haven't yet read the getting started Wiki pages; [start there](https://github.com/jhudsl/OTTR_Template/wiki/Getting-started) + +Every chapter needs to start out with this chunk of code: + + + +## Learning Objectives + +*Every chapter also needs Learning objectives that will look like this: + +This chapter will cover: + +- {You can use https://tips.uark.edu/using-blooms-taxonomy/ to define some learning objectives here} +- {Another learning objective} + +## Libraries + +For this chapter, we'll need the following packages attached: + +*Remember to add [any additional packages you need to your course's own docker image](https://github.com/jhudsl/OTTR_Template/wiki/Using-Docker#starting-a-new-docker-image). + + +``` r +library(magrittr) +``` + + +## Subtopic + +Here's a subheading and some text in this subsection! + +### Code examples + +You can demonstrate code like this: + + +``` r +output_dir <- file.path("resources", "code_output") +if (!dir.exists(output_dir)) { + dir.create(output_dir) +} +``` + +And make plots too: + + +``` r +hist_plot <- hist(iris$Sepal.Length) +``` + + + +You can also save these plots to file: + + +``` r +png(file.path(output_dir, "test_plot.png")) +hist_plot +``` + +``` +## $breaks +## [1] 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 +## +## $counts +## [1] 5 27 27 30 31 18 6 6 +## +## $density +## [1] 0.06666667 0.36000000 0.36000000 0.40000000 0.41333333 0.24000000 0.08000000 +## [8] 0.08000000 +## +## $mids +## [1] 4.25 4.75 5.25 5.75 6.25 6.75 7.25 7.75 +## +## $xname +## [1] "iris$Sepal.Length" +## +## $equidist +## [1] TRUE +## +## attr(,"class") +## [1] "histogram" +``` + +``` r +dev.off() +``` + +``` +## png +## 2 +``` + +### Image example + +How to include a Google slide. It's simplest to use the `ottrpal` package: + +Major point!! example image + +But if you have the slide or some other image locally downloaded you can also use html like this: + +Major point!! example image + +### Video examples + +To show videos in your course, you can use markdown syntax like this: + +[A video we want to show](https://www.youtube.com/embed/VOCYL-FNbr0) + +Alternatively, you can use `knitr::include_url()` like this: +Note that we are using `echo=FALSE` in the code chunk because we don't want the code part of this to show up. +If you are unfamiliar with [how R Markdown code chunks work, read this](https://rmarkdown.rstudio.com/lesson-3.html). + + + +OR this works: + + + +### Links to files + +This works: + + + +Or this: + +[This works](https://genetics-gsa.org/education/genetics-learning-framework/). + +Or this: + + + +### Links to websites + +Examples of including a website link. + +This works: + + + +OR this: + +![Another link](https://yihui.org) + +OR this: + + + +### Citation examples + +We can put citations at the end of a sentence like this [@rmarkdown2021]. +Or multiple citations [@rmarkdown2021, @Xie2018]. + +but they need a ; separator [@rmarkdown2021; @Xie2018]. + +In text, we can put citations like this @rmarkdown2021. + +### Callout boxes + +There are some preset callout boxes available, which can be used like so: + +`notice`: + +::: {.notice} +Here's something interesting. +::: + +`warning`: + +::: {.warning} +Look out! +::: + +`dictionary`: + +::: {.dictionary} +Here's a definition. +::: + +`reflection`: + +::: {.reflection} +Consider this! +::: + +`github`: + +::: {.github} +Here's how you use GitHub. +::: + +`wip`: + +::: {.wip} +This section is a **Work in Progress**. +::: + +### Dropdown summaries + +
You can hide additional information in a dropdown menu +Here's more words that are hidden. +
+ +## Print out session info + +You should print out session info when you have code for [reproducibility purposes](https://jhudatascience.org/Reproducibility_in_Cancer_Informatics/managing-package-versions.html). + + +``` r +devtools::session_info() +``` + +``` +## ─ Session info ─────────────────────────────────────────────────────────────── +## setting value +## version R version 4.3.2 (2023-10-31) +## os Ubuntu 22.04.4 LTS +## system x86_64, linux-gnu +## ui X11 +## language (EN) +## collate en_US.UTF-8 +## ctype en_US.UTF-8 +## tz Etc/UTC +## date 2024-08-07 +## pandoc 3.1.1 @ /usr/local/bin/ (via rmarkdown) +## +## ─ Packages ─────────────────────────────────────────────────────────────────── +## package * version date (UTC) lib source +## askpass 1.2.0 2023-09-03 [1] RSPM (R 4.3.0) +## bookdown 0.39.1 2024-06-11 [1] Github (rstudio/bookdown@f244cf1) +## bslib 0.6.1 2023-11-28 [1] RSPM (R 4.3.0) +## cachem 1.0.8 2023-05-01 [1] RSPM (R 4.3.0) +## cli 3.6.2 2023-12-11 [1] RSPM (R 4.3.0) +## curl 5.2.0 2023-12-08 [1] RSPM (R 4.3.0) +## devtools 2.4.5 2022-10-11 [1] RSPM (R 4.3.0) +## digest 0.6.34 2024-01-11 [1] RSPM (R 4.3.0) +## ellipsis 0.3.2 2021-04-29 [1] RSPM (R 4.3.0) +## evaluate 0.23 2023-11-01 [1] RSPM (R 4.3.0) +## fansi 1.0.6 2023-12-08 [1] RSPM (R 4.3.0) +## fastmap 1.1.1 2023-02-24 [1] RSPM (R 4.3.0) +## fs 1.6.3 2023-07-20 [1] RSPM (R 4.3.0) +## glue 1.7.0 2024-01-09 [1] RSPM (R 4.3.0) +## highr 0.10 2022-12-22 [1] RSPM (R 4.3.0) +## hms 1.1.3 2023-03-21 [1] RSPM (R 4.3.0) +## htmltools 0.5.7 2023-11-03 [1] RSPM (R 4.3.0) +## htmlwidgets 1.6.4 2023-12-06 [1] RSPM (R 4.3.0) +## httpuv 1.6.14 2024-01-26 [1] RSPM (R 4.3.0) +## httr 1.4.7 2023-08-15 [1] RSPM (R 4.3.0) +## jquerylib 0.1.4 2021-04-26 [1] RSPM (R 4.3.0) +## jsonlite 1.8.8 2023-12-04 [1] RSPM (R 4.3.0) +## knitr 1.47.3 2024-06-11 [1] Github (yihui/knitr@e1edd34) +## later 1.3.2 2023-12-06 [1] RSPM (R 4.3.0) +## lifecycle 1.0.4 2023-11-07 [1] RSPM (R 4.3.0) +## magrittr * 2.0.3 2022-03-30 [1] RSPM (R 4.3.0) +## memoise 2.0.1 2021-11-26 [1] RSPM (R 4.3.0) +## mime 0.12 2021-09-28 [1] RSPM (R 4.3.0) +## miniUI 0.1.1.1 2018-05-18 [1] RSPM (R 4.3.0) +## openssl 2.1.1 2023-09-25 [1] RSPM (R 4.3.0) +## ottrpal 1.2.1 2024-06-11 [1] Github (jhudsl/ottrpal@828539f) +## pillar 1.9.0 2023-03-22 [1] RSPM (R 4.3.0) +## pkgbuild 1.4.3 2023-12-10 [1] RSPM (R 4.3.0) +## pkgconfig 2.0.3 2019-09-22 [1] RSPM (R 4.3.0) +## pkgload 1.3.4 2024-01-16 [1] RSPM (R 4.3.0) +## png 0.1-8 2022-11-29 [1] CRAN (R 4.3.2) +## profvis 0.3.8 2023-05-02 [1] RSPM (R 4.3.0) +## promises 1.2.1 2023-08-10 [1] RSPM (R 4.3.0) +## purrr 1.0.2 2023-08-10 [1] RSPM (R 4.3.0) +## R6 2.5.1 2021-08-19 [1] RSPM (R 4.3.0) +## Rcpp 1.0.12 2024-01-09 [1] RSPM (R 4.3.0) +## readr 2.1.5 2024-01-10 [1] RSPM (R 4.3.0) +## remotes 2.4.2.1 2023-07-18 [1] RSPM (R 4.3.0) +## rlang 1.1.4 2024-06-04 [1] CRAN (R 4.3.2) +## rmarkdown 2.27.1 2024-06-11 [1] Github (rstudio/rmarkdown@e1c93a9) +## sass 0.4.8 2023-12-06 [1] RSPM (R 4.3.0) +## sessioninfo 1.2.2 2021-12-06 [1] RSPM (R 4.3.0) +## shiny 1.8.0 2023-11-17 [1] RSPM (R 4.3.0) +## stringi 1.8.3 2023-12-11 [1] RSPM (R 4.3.0) +## stringr 1.5.1 2023-11-14 [1] RSPM (R 4.3.0) +## tibble 3.2.1 2023-03-20 [1] CRAN (R 4.3.2) +## tzdb 0.4.0 2023-05-12 [1] RSPM (R 4.3.0) +## urlchecker 1.0.1 2021-11-30 [1] RSPM (R 4.3.0) +## usethis 2.2.3 2024-02-19 [1] RSPM (R 4.3.0) +## utf8 1.2.4 2023-10-22 [1] RSPM (R 4.3.0) +## vctrs 0.6.5 2023-12-01 [1] RSPM (R 4.3.0) +## xfun 0.44.4 2024-06-11 [1] Github (yihui/xfun@9da62cc) +## xml2 1.3.6 2023-12-04 [1] RSPM (R 4.3.0) +## xtable 1.8-4 2019-04-21 [1] RSPM (R 4.3.0) +## yaml 2.3.8 2023-12-11 [1] RSPM (R 4.3.0) +## +## [1] /usr/local/lib/R/site-library +## [2] /usr/local/lib/R/library +## +## ────────────────────────────────────────────────────────────────────────────── +``` + diff --git a/docs/03-AnVIL_modules.md b/docs/03-AnVIL_modules.md new file mode 100644 index 0000000..ef6977e --- /dev/null +++ b/docs/03-AnVIL_modules.md @@ -0,0 +1,64 @@ +# AnVIL Module Library + +There are several pieces of content that are useful across multiple books, such as "How to Create a Workspace". To reduce maintenance burden, the `AnVIL_Template` repository has a collection of `_child` R Markdown documents that can be included in your books. + +You can see all the available AnVIL modules in the [AnVIL_Template book](https://jhudatascience.org/AnVIL_Template/) + +## Include using `cow::borrow_chapter()` + +To add a module to your book, include a code chunk with the `cow::borrow_chapter()` function, specifying the file for the module you want to borrow and the repository you want to borrow it from (the `AnVIL_Template` repository). + +See the OTTR_Template [wiki page](https://github.com/jhudsl/OTTR_Template/wiki/Borrowing-chapters-between-courses) for the most recent instructions and additional details. + +Here is an example of including the `_child_workspace_create.Rmd` with `cow::borrow_chapter()` + + +1. [Launch Terra](https://anvil.terra.bio/#workspaces) + +1. In the drop-down menu on the left, navigate to "Workspaces". Click the triple bar in the top left corner to access the menu. Click "Workspaces". + + Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted. + +1. Click on the **plus icon** near the top of left of the page. + + Screenshot of Terra Workspaces page.  The "+" is highlighted. + +1. Name your Workspace and select the appropriate Billing Project. **All activity in the Workspace will be charged to this Billing Project** (regardless of who conducted it). + + Screenshot of Terra dialog box for creating a new Workspace.  The text box labeled "Workspace name" and the drop-down menu labeled "Billing project" are highlighted. + +1. If you are working with protected data, you can set the **Authorization Domain** to limit who can be added to your Workspace. Note that the Authorization Domain cannot be changed after the Workspace is created (i.e. there is no way to make this Workspace shareable with a larger audience in the future). Workspaces by default are only visible to people you specifically share them with. Authorization domains add an extra layer of enforcement over privacy, but by nature make sharing more complicated. We recommend using Authorization Domains in cases where it is extremely important and/or legally required that the data be kept private (e.g. protected patient data, industry data). For data you would merely prefer not be shared with the world, we recommend relying on standard Workspace sharing permissions rather than Authorization Domains, as Authorization Domains can make future collaborations, publications, or other sharing complicated. + + Screenshot of Terra dialog box for creating a new Workspace.  The drop-down menu labeled "Authorization domain" is highlighted. + +1. Click "CREATE WORKSPACE". The new Workspace should now show up under your Workspaces. + + Screenshot of Terra dialog box for creating a new Workspace.  The "Create Workspace" button is highlighted. + +## Background Highlighting for Borrowed Chapters + +You can use the `borrowed_chunk` [custom div block](https://bookdown.org/yihui/rmarkdown-cookbook/custom-blocks.html) to highlight borrowed content or any other content you choose. + +**Basic format:** + +``` +:::: {.borrowed_chunk} +Code/Content here +:::: +``` + +**Rendered with highlighting:** + +:::: {.borrowed_chunk} + +If you do not already have a Google account that you would like to use for accessing Terra, [create one now](https://accounts.google.com/SignUp). + +If you would like to create a Google account that is associated with your non-Gmail, institutional email address, follow [these instructions](https://support.terra.bio/hc/en-us/articles/360029186611). +:::: + +**Rendered without highlighting:** + + +If you do not already have a Google account that you would like to use for accessing Terra, [create one now](https://accounts.google.com/SignUp). + +If you would like to create a Google account that is associated with your non-Gmail, institutional email address, follow [these instructions](https://support.terra.bio/hc/en-us/articles/360029186611). diff --git a/docs/04-workspace_modules.md b/docs/04-workspace_modules.md new file mode 100644 index 0000000..d1f604a --- /dev/null +++ b/docs/04-workspace_modules.md @@ -0,0 +1,128 @@ +# (PART\*) AnVIL Modules {-} + +# Workspaces + +Modules about Terra Workspaces + +
+ +## Clone a Workspace + + +1. [Launch Terra](https://anvil.terra.bio/#workspaces) + +1. Locate the Workspace you want to clone. If a Workspace has been shared with you ahead of time, it will appear in "MY WORKSPACES". You can clone a Workspace that was shared with you to perform your own analyses. In the screenshot below, no Workspaces have been shared. + + Screenshot of Terra "MY WORKSPACES" menu. The "MY WORKSPACES" tab is highlighted. No Workspaces are visible because none have been shared with the user. There is an option to create a new Workspace. + +1. If a Workspace hasn't been shared with you, navigate to the "FEATURED" or "PUBLIC" Workspace tabs. + + Screenshot of Terra "My Workspaces" menu. The "FEATURED" tab is highlighted. + +1. Use the search box to find the Workspace you want to clone. + + Screenshot of Terra "My Workspaces" menu. The search bar is highlighted and the user has typed in the term "COVID-19". A Workspace related to COVID-19 appears in the results. + +1. Click the teardrop button on the far right next to the Workspace you want to clone. Click "Clone". You can also clone the Workspace from the Workspace Dashboard instead of the search results. + + Screenshot of Terra "My Workspaces" menu with the Workspace that we want to clone. The teardrop button has been clicked to bring up the options. The "Clone" option from the list is highlighted. + Screenshot of the Dashboard for the Workspace that we want to clone. The teardrop button has been clicked to bring up the options. The "Clone" option from the list is highlighted. + +1. You will see a popup box appear. Name your Workspace and select the appropriate Terra Billing Project. **All activity in the Workspace will be charged to this Billing Project** (regardless of who conducted it). Remember that each Workspace should have its own Billing Project. + + Screenshot of the "clone workspace" Terra popup dialog box. The Workspace name and Billing Project dropdown are highlighted. Text has been filled in for the Workspace name as "Lab-member-1-workspace-2". + +1. If you are working with protected data, you can set the **Authorization Domain** to limit who can be added to your Workspace. Note that the Authorization Domain cannot be changed after the Workspace is created (i.e. there is no way to make this Workspace shareable with a larger audience in the future). Workspaces by default are only visible to people you specifically share them with. Authorization domains add an extra layer of enforcement over privacy, but by nature make sharing more complicated. We recommend using Authorization Domains in cases where it is extremely important and/or legally required that the data be kept private (e.g. protected patient data, industry data). For data you would merely prefer not be shared with the world, we recommend relying on standard Workspace sharing permissions rather than Authorization Domains, as Authorization Domains can make future collaborations, publications, or other sharing complicated. + + Screenshot of Terra popup dialog box for creating a new Workspace. The drop-down menu labeled "Authorization domain" is highlighted. + +1. Click "CLONE WORKSPACE". The new Workspace should now show up under your Workspaces. + + Screenshot of Terra popup dialog box for creating a new Workspace. The "Clone Workspace" button is highlighted. + +## Create a Workspace + + +1. [Launch Terra](https://anvil.terra.bio/#workspaces) + +1. In the drop-down menu on the left, navigate to "Workspaces". Click the triple bar in the top left corner to access the menu. Click "Workspaces". + + Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted. + +1. Click on the **plus icon** near the top of left of the page. + + Screenshot of Terra Workspaces page.  The "+" is highlighted. + +1. Name your Workspace and select the appropriate Billing Project. **All activity in the Workspace will be charged to this Billing Project** (regardless of who conducted it). + + Screenshot of Terra dialog box for creating a new Workspace.  The text box labeled "Workspace name" and the drop-down menu labeled "Billing project" are highlighted. + +1. If you are working with protected data, you can set the **Authorization Domain** to limit who can be added to your Workspace. Note that the Authorization Domain cannot be changed after the Workspace is created (i.e. there is no way to make this Workspace shareable with a larger audience in the future). Workspaces by default are only visible to people you specifically share them with. Authorization domains add an extra layer of enforcement over privacy, but by nature make sharing more complicated. We recommend using Authorization Domains in cases where it is extremely important and/or legally required that the data be kept private (e.g. protected patient data, industry data). For data you would merely prefer not be shared with the world, we recommend relying on standard Workspace sharing permissions rather than Authorization Domains, as Authorization Domains can make future collaborations, publications, or other sharing complicated. + + Screenshot of Terra dialog box for creating a new Workspace.  The drop-down menu labeled "Authorization domain" is highlighted. + +1. Click "CREATE WORKSPACE". The new Workspace should now show up under your Workspaces. + + Screenshot of Terra dialog box for creating a new Workspace.  The "Create Workspace" button is highlighted. + +## Open a Workspace + + +1. [Launch Terra](https://anvil.terra.bio/#workspaces) + +1. In the drop-down menu on the left, navigate to "Workspaces". Click the triple bar in the top left corner to access the menu. Click "Workspaces". + + Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted. + +1. You are automatically directed to the "My Workspaces" tab. Here you can see any Workspaces that have been shared with you, along with your permission level. + + Screenshot of Terra Workspaces page with the "My Workspaces" tab selected.  The "My Workspaces" tab and the column showing permission level are highlighted. + + - **Reader** means you can open the Workspace and see everything, but can't do any computations or make any edits. + - **Writer** means you can run computations, which will charge costs to the Workspace's Billing Project. Writers can also make edits to the Workspace. + - **Owner** is similar to Writer, but also allows you to control who can access the Workspace. + +1. Click on the name of a Workspace to open it. Opening and viewing a Workspace does not cost anything. + + Screenshot of Terra Workspaces page with the "My Workspaces" tab selected.  The name of one of the Workspaces is highlighted. + +1. When you open a Workspace, you are directed to the Workspace Dashboard. This generally has a description of the Workspace contents, as well as some useful details about the Workspace itself. + + Screenshot of a Terra Workspace.  The "Dashboard" is highlighted. + +From here you can navigate through the different tabs of the Workspace, and if you have sufficient permission, you can start running analyses. If you are only a Reader, you may need to "clone" (make your own copy) of the Workspace before you can start working. + +## Share a Workspace + + +1. [Launch Terra](https://anvil.terra.bio/#workspaces) + +1. In the drop-down menu on the left, navigate to "Workspaces". Click the triple bar in the top left corner to access the menu. Click "Workspaces". + + Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted. + +1. Click on the name of the Workspace to open the Workspace. Opening a Workspace does not cost anything. Certain activities in the Workspace (such as running an analysis) will charge to the Workspace’s Billing Project. Workspace management (e.g. adding and removing members, editing the description) does not cost money. + + Screenshot of Terra Workspace page.  The name of a Workspace is highlighted. + +1. Click the teardrop button (![teardrop button](https://raw.githubusercontent.com/jhudsl/AnVIL_Template/main/child/child_assets/teardrop_button.png){width=25px}) on the right hand side to open the Workspace management menu. Click "Share" + + Screenshot of an individual Terra Workspace dashboard page.  The button for extending the Workspaces's drop-down menu is highlighted, and the menu item "Share" is highlighted. + +1. Enter the email address of the user or Group you’d like to share the Workspace with. + - If adding an individual, make sure to enter the account that they use to access AnVIL. + - If adding a Terra Group, use the Group email address, which can be found on the Terra Group management page. + + Screenshot of the dialog box for sharing a Terra Workspace.  The text box labeled "User email" is highlighted. + +1. Choose their permission level. + + - Remember that all activity in the Workspace will be charged to the Workspace's Billing Project, regardless of who conducts it, so only add members as "Writers" or "Owners" if they should be charging to the Workspace's Billing Project. + - "Readers" can view all parts of the Workspace but cannot make edits or run analyses (i.e. they cannot spend money). They can also clone their own copy of the Workspace where they can conduct activity on their own Billing Project. + + Screenshot of the dialog box for sharing a Terra Workspace.  The drop-down menu labeled with the email of the user you are sharing with is highlighted and the menu item "Writer" is selected. + +1. Click "Save". The user should now be able to see the Workspace when logged in to Terra. + + Screenshot of the dialog box for sharing a Terra Workspace.  The "Save" button is highlighted. + diff --git a/docs/05-billing_modules.md b/docs/05-billing_modules.md new file mode 100644 index 0000000..7ead06d --- /dev/null +++ b/docs/05-billing_modules.md @@ -0,0 +1,334 @@ + + +# Billing + +Modules about billing and Billing Projects on Google Cloud Platform and Terra. + +
+ +## Create Google Billing Account + +:::: {.borrowed_chunk} + +1. Log in to the [Google Cloud Platform](https://console.cloud.google.com/) console using your Google ID. **Make sure to use the same Google account ID you use to log into Terra.** + +1. If you are a first time user, don’t forget to claim your free credits! If you haven't been to the console before, once you accept the Terms of Service you will be greeted with an invitation to "Try for Free." + + Screenshot of the Google Cloud Console with the "Try for Free" button highlighted. + +1. Follow the instructions to sign up for a Billing Account and get your credits. + +1. Choose “Individual Account”. This “billing account” is just for managing billing, so you don’t need to be able to add your team members. You will need to give either a credit card or bank account for security. Don't worry! **You won't be billed until you explicitly turn on automatic billing**. + + Screenshot of the Google Cloud Billing Account Setup, with "Individual Account" highlighted.  Also highlighted is text stating "You won't be charged unless you manually upgrade to a paid account." + +1. You can view and edit your new Billing Account, by selecting “Billing” from the left-hand menu, or going directly to the billing console [console.cloud.google.com/billing](https://console.cloud.google.com/billing) + + Screenshot of the Google Cloud Console dropdown menu, with "Billing" highlighted. + +1. Clicking on the Billing Account name will allow you to manage the account, including accessing reports, setting alerts, and managing payments and billing. + + Screenshot of the Google Cloud Console Billing Page, with the name of the new billing account highlighted. + +At any point, you can create additional Billing Accounts using the **Create Account** button. We generally recommend creating a new Billing Account for each funding source. +:::: + +## Add Terra to Google Billing Account + +:::: {.borrowed_chunk} + +This gives Terra permission to create projects and send charges to the Google Billing Account, and must be done by an administrator of the Google Billing Account. + +Terra needs to be added as a "Billing Account User": + +1. Log in to the [Google Cloud Platform](https://console.cloud.google.com/) console using your Google ID. +1. Navigate to [Billing](https://console.cloud.google.com/billing) + + Screenshot of the Google Cloud Console drop-down menu, with "Billing" highlighted. + +1. You may be automatically directed to view a specific Billing Account. If you see information about a single account rather than a list of your Billing Accounts, you can get back to the list by clicking "Manage Billing Accounts" from the drop-down menu. + + Screenshot of an individual Google Cloud Billing Account with the drop-down menu item "Manage Billing Accounts" highlighted. + +1. Check the box next to the Billing Account you wish to add Terra to, click "ADD MEMBER". + + Screenshot of Google Cloud Billing Accounts Overview. The checkbox next to the name of a Billing Account is checked and highlighted, and the "Add Member" button is highlighted. + +1. Enter `terra-billing@terra.bio` in the text box. In the drop-down menu, mouse over Billing, then choose "**Billing Account User**". + + Screenshot of the dialogue box for adding a member to a Google Cloud Billing Accounts. The text box is highlighted and has been filled in with "terra-billing@terra.bio".  In the drop-down menu labeled "Select a Role", the item "Billing" and the submenu item "Billing Account User" are highlighted. + +1. Click "SAVE". + + Screenshot of the dialogue box for adding a member to a Google Cloud Billing Accounts. The Save button is highlighted. +:::: + +## Add Members to Google Billing Account + +:::: {.borrowed_chunk} + +Anyone you wish to add to the Billing Account will need their own Google ID. + +To add a member to a Billing Project: + +1. Log in to the [Google Cloud Platform](https://console.cloud.google.com/) console using your Google ID. +1. Navigate to [Billing](https://console.cloud.google.com/billing) + + Screenshot of the Google Cloud Console drop-down menu, with "Billing" highlighted. + +1. You may be automatically directed to view a specific Billing Account. If you see information about a single account rather than a list of your Billing Accounts, you can get back to the list by clicking "Manage Billing Accounts" from the drop-down menu. + + Screenshot of an individual Google Cloud Billing Account with the drop-down menu item "Manage Billing Accounts" highlighted. + +1. Check the box next to the Billing Account you wish to add a member to, click "ADD MEMBER". + + Screenshot of Google Cloud Billing Accounts Overview. The checkbox next to the name of a Billing Account is checked and highlighted, and the "Add Member" button is highlighted. + +1. Enter their Google ID in the text box. In the drop-down menu, mouse over Billing, then choose the appropriate role. + + Screenshot of the dialogue box for adding a member to a Google Cloud Billing Accounts. In the drop-down menu labeled "Select a Role", the item "Billing" and the submenu item "Billing Account Viewer" are highlighted. + +1. Click "SAVE". + + Screenshot of the dialogue box for adding a member to a Google Cloud Billing Accounts. The Save button is highlighted. +:::: + +## Set Alerts for Google Billing + +:::: {.borrowed_chunk} + +1. Log in to the [Google Cloud Platform](https://console.cloud.google.com/) console using the Google ID associated with your Google Cloud projects. + +1. Open the dropdown menu on the top left and click on [Billing](https://console.cloud.google.com/billing). + + Screenshot of the Google Cloud Console drop-down menu, with "Billing" highlighted. + +1. You may be automatically directed to view a specific Billing Account. If you see information about a single account (and it’s not the one you’re interested in), you can get back to the list of all your Billing Accounts by clicking "Manage Billing Accounts" from the drop-down menu. + + Screenshot of an individual Google Cloud Billing Account with the drop-down menu item "Manage Billing Accounts" highlighted. + +1. Click on the name of the Billing Account you want to set alerts for. + + Screenshot of Google Cloud Billing Accounts Overview. A Billing Account name is highlighted. + +1. In the left-hand menu, click "Budgets & alerts". + + Screenshot of an individual Google Cloud Billing Account with the left-hand menu item "Budgets & alerts" highlighted. + +1. Click the "Create Budget" tab. + + Screenshot of the budgets and alerts page for a Google Cloud Billing Account. The "Create Budget" button highlighted. + +1. Enter a name for your budget, and then choose which projects you want to monitor. Then click "Next". + + Screenshot of the form for setting budget scope for a Google Cloud Billing Account. Three things are highlighted:  1) the box for entering a "Name" for the budget, 2) the dropdown menu labeled "Projects" for selecting which Billing Projects are part of the budget, and 3) the "Next" button. + +1. For Budget Type, select "Specified amount". Enter the total budget amount for the month (you will set alerts at different thresholds in the next step). Click "**Next**" (do not click "Finish"). + + Screenshot of the form for setting budget amount for a Google Cloud Billing Account.  The drop-down menu labeled "Budget type" is highlighted and "Specified amount" is selected.  Also highlighted are the text box labeled "Target amount" and the "Next" button. + +1. Enter the threshold amounts where you want to receive an alert. We recommend starting with 50% and 90%. You can set other alerts if you prefer. + + Screenshot of the form for setting budget actions for a Google Cloud Billing Account.  The boxes for entering "Percent of budget" or "Amount" are highlighted.  The drop-down menu labeled "Trigger on" is highlighted and "Actual" is selected. + +1. Check the box for "Email alerts to billing admins and users", then click "**Finish**". Now you (as the owner and admin), along with anyone you added with admin or user privileges (e.g. lab managers) will receive alerts when your lab members reach the specified spending thresholds. These emails will be sent to the Gmail accounts associated with the Billing Account. + + Screenshot of the form for setting budget alerts for a Google Cloud Billing Account.  The checkbox labeled "Email alerts to billing admins and users" is highligheted and checked.  The "Finish" button is highlighted. + +1. You can edit your budgets at any time by going to Billing > Budgets & alerts, and clicking on the name of the budget you want to edit. + + Screenshot of the Google Cloud Billing Account Budgets and alerts overview.  Four items are highlighted illustrating how to view and edit an existing budget: 1) The top-left "hamburger" button for extending the drop-down menu, 2) the drop-down menu item "Billing", 3) the submenu item "Budgets & alerts, 4) the name of a budget. +:::: + +## View Spend for Google Billing + +:::: {.borrowed_chunk} + +You can always check your current spend through the Google Billing console, but remember + +- There is a reporting delay (~1 day), so you cannot immediately see what an analysis cost +- Costs are reported at the level of Workspaces, so if there are multiple people using a Workspace, you will not be able to determine which of them was responsible for the charges. + +The Google Billing console displays information by Billing Account. To view spending: + +1. Log in to the [Google Cloud Platform](https://console.cloud.google.com/) console using the Google ID associated with your Google Cloud projects. + +1. Open the dropdown menu on the top left and click on [Billing](https://console.cloud.google.com/billing). + + Screenshot of the Google Cloud Console drop-down menu, with "Billing" highlighted. + +1. You may be automatically directed to view a specific Billing Account. If you see information about a single account (and it’s not the one you’re interested in), you can get back to the list of all your Billing Accounts by clicking "Manage Billing Accounts" from the drop-down menu. + + Screenshot of an individual Google Cloud Billing Account with the drop-down menu item "Manage Billing Accounts" highlighted. + +1. Click on the name of the Billing Account for the project you want to view. + + Screenshot of Google Cloud Billing Accounts Overview. A Billing Account name is highlighted. + +1. Look at the top of the **Overview** tab to see your month-to-date spending. + + Screenshot of a Google Cloud Billing Account Overview. + +1. Scroll further down the **Overview** tab to show your top projects. + + Screenshot of a Google Cloud Billing Account top projects. + +1. Click on the **Reports** tab to see more detailed information about each of your projects. This is probably the most useful tab for exploring costs of individual projects over time. + + Screenshot of a Google Cloud Billing Account Reports tab. + +1. Click on the **Cost table** tab to obtain a convenient table of spending per project. + + Screenshot of a Google Cloud Billing Account Cost table tab. +:::: + +## Create Terra Billing Project + +:::: {.borrowed_chunk} + +1. [Launch Terra](https://anvil.terra.bio/#workspaces) and sign in with your Google account. If this is your first time logging in to Terra, you will need to accept the Terms of Service. + +1. In the drop-down menu on the left, navigate to "Billing". Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click "Billing". You can also navigate there directly with this link: https://anvil.terra.bio/#billing + + Screenshot of the Terra drop-down menu.  Three items are highlighted: 1) the "hamburger" button for extending the drop-down menu, 2) the arrow next to your username, for extending the drop-down submenu, and 3) the submenu item "Billing". + +1. On the Billing page, click the "+ CREATE" button to create a new Billing Project. If prompted, select the Google account to use. If prompted, give Terra permission to manage Google Cloud Platform billing accounts. + + Screenshot of the Terra Billing Page.  The "plus" button next to "Billing Projects" is highlighted. + +1. Enter a **unique** name for your Terra Billing Project and select the appropriate Google Billing Account. The name of the Terra Billing Project must: + + Only contain lowercase letters, numbers and hyphens + + Start with a lowercase letter + + Not end with a hyphen + + Be between 6 and 30 characters + + Screenshot of the Terra Add Billing Project dialog box. + +1. Select the Google Billing Account to use. All activities conducted under your new Terra Billing Project will charge to this Google Billing Account. If prompted, give Terra permission to manage Google Cloud Platform billing accounts. + + Screenshot of the Terra Add Billing Project dialog box.  The dropdown menu labeled "Select billing account" is highlighted. + +1. Click "CREATE BILLING PROJECT". + + Screenshot of the Terra Add Billing Project dialog box.  The button labeled "CREATE BILLING PROJECT" is highlighted. + + +1. Your new Billing Project should now show up in the list of Billing Projects Owned by You. You can add additional members or can modify or deactivate the Billing Project at any time by clicking on its name in this list. + + Screenshot of the Terra Billing Projects menu.  The submenu "Owned by you" is highlighted and has been expanded, showing a list of Billing Projects below.  One of the Billing Project names is highlighted. + +The page doesn't always update as soon as the Billing Project is created. If it's been a couple of minutes and you don't see a change, try refreshing the page. +:::: + +## Add Member to Terra Billing Project + +:::: {.borrowed_chunk} + +1. [Launch Terra](https://anvil.terra.bio/#workspaces) and sign in with your Google account. + +1. In the drop-down menu on the left, navigate to "Billing". Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click "Billing". You can also navigate there directly with this link: https://anvil.terra.bio/#billing + + Screenshot of the Terra drop-down menu.  Three items are highlighted: 1) the "hamburger" button for extending the drop-down menu, 2) the arrow next to your username, for extending the drop-down submenu, and 3) the submenu item "Billing". + +1. Click “Owned by You” and find the Billing Project. If you do not see the Billing Project in this list, then you are not an Owner and do not have permission to add members. + + Screenshot of the Terra Billing Projects menu.  The submenu "Owned by you" is highlighted and has been expanded, showing a list of Billing Projects below. + +1. Click on the name of the Billing Project. + + Screenshot of the Terra Billing Projects menu.  The submenu has been expanded, and the name of one of the Billing Projects is highlighted. + +1. Click on the “Members” tab to view and manage members. Then click the “Add User” button. + + Screenshot of a Terra Billing Project management page.  The tab labeled "Members" is highlighed and has been selected, and the button labeled "Add User" is highlighted. + +1. Enter the email address of the user or group you’d like to add the the Billing Project. + - If adding an individual, make sure to enter the account that they use to access AnVIL. + - If adding a Terra Group, use the Group email address, which can be found on the Terra Group management page. + + Screenshot of the dialog box for adding users to a Terra Billing Project.  The textbox labeled "User email" is highlighed and has been filled in. + +1. If this user or group will need to add and remove other users of the Billing Project, check the Owner box. Otherwise leave it unchecked. + - It’s often a good idea to have at least one other Owner of a Billing Project in order to avoid getting locked out, in case the original owner leaves or loses access to their account. + + Screenshot of the dialog box for adding users to a Terra Billing Project.  The checkbox labeled "Can manage users (Owner)" is highlighed. + +1. Click “ADD USER”. + + Screenshot of the dialog box for adding users to a Terra Billing Project.  The button labeled "ADD USER" is highlighed. + +1. You should now see the user or group listed in the Billing Project members, along with the appropriate role. They should now be able to use the Billing Project to fund work on AnVIL. + + Screenshot of a Terra Billing Project member management page.  A user email and role are highlighted. + +If you need to remove members or modify their roles, you can do so at any time by clicking the teardrop button next to their name. + +Screenshot of a Terra Billing Project member management page.  The teardrop button for one user is highlighted. +:::: + +## Disable Terra Billing Project + +By default this module includes a warning to make sure people understand they will lose access to their Workspace buckets. You can remove the warning from this module by setting `AnVIL_module_settings$warning` to `FALSE` before running `cow::borrow_chapter`: + +``` +AnVIL_module_settings <- list( + warning = FALSE +) +cow::borrow_chapter( + doc_path = "child/_child_terra_billing_project_disable.Rmd", + repo_name = "jhudsl/AnVIL_Template" +) +``` + +:::: {.borrowed_chunk} + +:::{.warning} +**Disabling a Billing Project makes Workspace contents inaccessible!** + +Disabling a Billing Project disables funding to all Workspaces funded by the Billing Project. You will be unable to compute in these Workspaces, and **you will lose access to any data stored in the Workspace buckets**. It is sometimes possible to restore access by reactivating billing, but Google makes no promises about whether or how long the data will be recoverable. + +**Make sure everyone with Workspaces funded by the Billing Project has saved anything they want to keep in another location** before disabling the Billing Project. +::: + +To disable a Terra Billing Project (i.e. remove the Google Billing Account that funds the Terra Billing Project): + + + +1. [Launch Terra](https://anvil.terra.bio/#workspaces) and sign in with your Google account. + +1. In the drop-down menu on the left, navigate to "Billing". Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click "Billing". You can also navigate there directly with this link: https://anvil.terra.bio/#billing + + Screenshot of the Terra drop-down menu.  Three items are highlighted: 1) the "hamburger" button for extending the drop-down menu, 2) the arrow next to your username, for extending the drop-down submenu, and 3) the submenu item "Billing". + +1. Click "Owned by You" and find the Billing Project. If you do not see the Billing Project in this list, then you are not an Owner and do not have permission to add members. + + Screenshot of the Terra Billing Projects menu.  The submenu "Owned by you" is highlighted and has been expanded, showing a list of Billing Projects below. + +1. Click on the name of the Billing Project. + + Screenshot of the Terra Billing Projects menu.  The submenu has been expanded, and the name of one of the Billing Projects is highlighted. + +1. If you don't see information about the Billing Account, click on “View billing account” to expand the Billing Account information. You may be prompted to enter your login information again. + + Screenshot of a Terra Billing Project management page.  The button labeled "view billing account" is highlighted. + +1. You should see the name of the Google Billing Account that is funding this Terra Billing Project. Click on the teardrop icon next to the name of the Billing Account. + + Screenshot of a Terra Billing Project management page.  The teardrop button next to the name of the Billing Account is highlighted. + +1. Click "Remove Billing Account". + + Screenshot of a Terra Billing Project management page.  The teardrop button next to the name of the Billing Account is highlighted. + +1. Click OK to confirm that you want to disable funding for this Billing Project. + + Screenshot of the dialoge box confirming removal of the Billing Account from a Terra Billing Project.  The button labeled "OK" is highlighted. + +1. The page should now indicate that there is no linked billing account. + + Screenshot of a Terra Billing Project management page.  The Billing Account information which says "No linked billing account" is highlighted. + +If necessary, you can restore funding to the Billing Project and associated Workspaces by clicking the teardrop icon and selecting "Change Billing Account". However, Google makes no promises about how long the Workspace contents will remain available after you disable funding, so it is best not to rely on them. + +Screenshot of a Terra Billing Project management page.  The teardrop button next to the Billing Account information is highlighted. +:::: diff --git a/docs/06-onboarding_modules.md b/docs/06-onboarding_modules.md new file mode 100644 index 0000000..18bf372 --- /dev/null +++ b/docs/06-onboarding_modules.md @@ -0,0 +1,13 @@ +# Onboarding + +Joining a team on AnVIL. + +
+ +## Create Google Account + + +If you do not already have a Google account that you would like to use for accessing Terra, [create one now](https://accounts.google.com/SignUp). + +If you would like to create a Google account that is associated with your non-Gmail, institutional email address, follow [these instructions](https://support.terra.bio/hc/en-us/articles/360029186611). + diff --git a/docs/07-using_platforms_modules.md b/docs/07-using_platforms_modules.md new file mode 100644 index 0000000..08de9f5 --- /dev/null +++ b/docs/07-using_platforms_modules.md @@ -0,0 +1,342 @@ + + +# Using programming platforms on AnVIL + +Modules about opening, touring, and closing AnVIL platforms + +
+ +## Video overview on using Jupyter Notebooks + + +Here is a video tutorial that describes the basics of using Jupyter Notebook on AnVIL. + + + +### Objectives + +- Start compute for your Jupyter environment +- Create notebook to perform analysis +- Stop compute to minimize expenses + +### Slides + +The slides for this tutorial are are located [here](https://docs.google.com/presentation/d/1GYUP874Qd7K3S0Ls6iWY_M4jywpRb53qw0f78OBCFwk). + +## Launching Jupyter + +:::: {.borrowed_chunk} + +:::{.warning} +AnVIL is very versatile and can scale up to use very powerful cloud computers. It's very important that you select a cloud computing environment appropriate to your needs to avoid runaway costs. If you are uncertain, start with the default settings; it is fairly easy to increase your compute resources later, if needed, but harder to scale down. +::: + +Note that, in order to use Jupyter, you must have access to a Terra Workspace with permission to compute (i.e. you must be a "Writer" or "Owner" of the Workspace). + +1. Open Terra - use a web browser to go to [`anvil.terra.bio`](https://anvil.terra.bio/) + +1. In the drop-down menu on the left, navigate to "Workspaces". Click the triple bar in the top left corner to access the menu. Click "Workspaces". + + Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted. + +1. Click on the name of your Workspace. You should be routed to a link that looks like: `https://anvil.terra.bio/#workspaces//`. + +1. Click on the cloud icon on the far right to access your Cloud Environment options. + + Screenshot of a Terra Workspace. The cloud icon to create a new cloud environment is highlighted. + +1. In the dialogue box, click the "Settings" button under Jupyter. + + Screenshot of the Cloud Environment Details dialogue box. The Settings button under Jupyter is highlighted. + +1. You will see some configuration options for the Jupyter cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. + + Screenshot of the Jupyter Cloud Environment dialogue box. The cost to run the environment is highlighted. + + + +1. Configure any settings you need for your cloud environment. If you are uncertain about what you need, the default configuration is a reasonable, cost-conservative choice. It is fairly easy to increase your compute resources later, if needed, but harder to scale down. Scroll down and click the "CREATE" button when you are satisfied with your setup. + + Screenshot of the Jupyter Cloud Environment dialogue box. The "CREATE" button is highlighted. + + + + + + + + + + + + + +1. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the Jupyter icon. It will take a few minutes for Terra to request computers and install software. + + Screenshot of a Terra Workspace. The hovertext for the Jupyter icon is highlighted, and indicates that the status of the environment is "Creating". + +1. When your environment is ready, its status will change to "Running". Click on the "ANALYSES" tab to create or open a Jupyter Notebook. + + Screenshot of a Terra Workspace. The hovertext for the Jupyter icon is highlighted, and indicates that the status of the environment is "Running".  The ANALYSES tab is also highlighted + +1. From the ANALYSES tab, you can click on the name of an existing Jupyter Notebook to view and launch it, or click the "START" button to create a new Notebook. + + Screenshot of Terra Workspace with the "ANALYSES" tab selected and highlighted.  The page shows a list of Jupyter Notebooks.  The Notebook names and the START button are highlighted. + + + +1. Clicking on a Notebook name will open a static preview of the Notebook. To edit and run the Notebook, click the "OPEN" button. + + Screenshot of a preview of a Jupyter Notebook in a Terra Workspace.  The "OPEN" button is highlighted. +:::: + +## Video overview on using Galaxy + + +Here is a video tutorial that describes the basics of using Galaxy on AnVIL. + + + +### Objectives + +- Start compute for your Galaxy on AnVIL +- Run tool to quality control sequencing reads +- Stop compute to minimize expenses + +### Slides + +The slides for this tutorial are are located [here](https://docs.google.com/presentation/d/1yYCg4cPVBMMDghT17B4XzROieqyMH99Ex9nMm_Scm9Q). + +## Starting Galaxy + +:::: {.borrowed_chunk} + +Note that, in order to use Galaxy, you must have access to a Terra Workspace with permission to compute (i.e. you must be a "Writer" or "Owner" of the Workspace). + +Open your Workspace, and click on the “NOTEBOOKS” tab. Next, click on “Create a Cloud Environment for Galaxy”. You should see a popup window on the right side of the screen. Click on “NEXT” and “CREATE” to keep all settings as-is. This will take 8-10 minutes. When it is done, click “LAUNCH GALAXY”. + +Screenshot of the Workspace Notebooks tab. The notebook tab name and the plus button that starts a cloud environment for Galaxy have been highlighted, +:::: + +## Navigating Galaxy + +:::: {.borrowed_chunk} + +Notice the three main sections. + +**Tools** - These are all of the bioinformatics tool packages available for you to use. + +**The Main Dashboard** - This contains flash messages and posts when you first open Galaxy, but when we are using data this is the main interface area. + +**History** - When you start a project you will be able to see all of the documents in the project in the history. Now be aware, this can become very busy. Also the naming that Galaxy uses is not very intuitive, so you must make sure that you label your files with something that makes sense to you. + +Screenshot of the Galaxy landing page. The Tools and History headings have been highlighted. + +On the welcome page, there are links to tutorials. You may try these out on your own. If you want to try a new analysis this is a good place to start. +:::: + +## Deleting Galaxy + +:::: {.borrowed_chunk} + +Once you are done with your activity, you’ll need to shut down your Galaxy cloud environment. This frees up the cloud resources for others and minimizes computing cost. The following steps will delete your work, so make sure you are completely finished at this point. Otherwise, you will have to repeat your work from the previous steps. + +Return to AnVIL, and find the Galaxy logo that shows your cloud environment is running. Click on this logo: + +Screenshot of the Workspace menu. The currently running Galaxy cloud environment logo on the top right of the page is highlighted. + +Next, click on “DELETE ENVIRONMENT OPTIONS”: + +Screenshot of the cloud environment pop out menu. The “DELETE ENVIRONMENT OPTIONS” link is highlighted. + +Finally, select “Delete everything, including persistent disk”. Make sure you are done with the activity and then click “DELETE”. + +Screenshot of the cloud environment pop out menu. The “Delete everything, including persistent disk” radio button has been checked and is highlighted. The “DELETE” button is highlighted. +:::: + +## Video overview on using RStudio + + +Here is a video tutorial that describes the basics of using RStudio on AnVIL. + + + +### Objectives + +- Start compute for your RStudio environment +- Tour RStudio on AnVIL +- Stop compute to minimize expenses + +### Slides + +The slides for this tutorial are are located [here](https://docs.google.com/presentation/d/1eypYLLqD11-NwHLs4adGpcuSB07dYEJfAaALSMvgzqw). + +## Launching RStudio + +:::: {.borrowed_chunk} + +:::{.warning} +AnVIL is very versatile and can scale up to use very powerful cloud computers. It's very important that you select a cloud computing environment appropriate to your needs to avoid runaway costs. If you are uncertain, start with the default settings; it is fairly easy to increase your compute resources later, if needed, but harder to scale down. +::: + +Note that, in order to use RStudio, you must have access to a Terra Workspace with permission to compute (i.e. you must be a "Writer" or "Owner" of the Workspace). + +1. Open Terra - use a web browser to go to [`anvil.terra.bio`](https://anvil.terra.bio/) + +1. In the drop-down menu on the left, navigate to "Workspaces". Click the triple bar in the top left corner to access the menu. Click "Workspaces". + + Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted. + +1. Click on the name of your Workspace. You should be routed to a link that looks like: `https://anvil.terra.bio/#workspaces//`. + +1. Click on the cloud icon on the far right to access your Cloud Environment options. + + Screenshot of a Terra Workspace. The cloud icon to create a new cloud environment is highlighted. + +1. In the dialogue box, click the "Settings" button under RStudio. + + Screenshot of the Cloud Environment Details dialogue box. The Settings button under RStudio is highlighted. + +1. You will see some details about the default RStudio cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. + + Screenshot of the RStudio Cloud Environment dialogue box. The cost to run the environment is highlighted. + + + +1. If you are uncertain about what you need, the default configuration is a reasonable, cost-conservative choice. It is fairly easy to increase your compute resources later, if needed, but harder to scale down. Click the “Create” button. + + Screenshot of the RStudio Cloud Environment dialogue box. The "CREATE" button is highlighted. + + + +1. Otherwise, click “CUSTOMIZE” to modify the environment for your needs. + + Screenshot of the RStudio Cloud Environment dialogue box. The "CUSTOMIZE" button is highlighted. + + + + + + + + + + + +1. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the RStudio logo. It will take a few minutes for Terra to request computers and install software. + + Screenshot of a Terra Workspace. The hovertext for the RStudio icon is highlighted, and indicates that the status of the environment is "Creating". + +1. When your environment is ready, its status will change to “Running”. Click on the RStudio logo to open a new dialogue box that will let you launch RStudio. + + Screenshot of a Terra Workspace. The hovertext for the RStudio icon is highlighted, and indicates that the status of the environment is "Running". + +1. Click the launch icon to open RStudio. This is also where you can pause, modify, or delete your environment when needed. + + Screenshot of the RStudio Environment Details dialogue box. The "Open" button is highlighted. + +1. You should now see the RStudio interface with information about the version printed to the console. + + Screenshot of the RStudio environment interface. +:::: + +## Touring RStudio + +:::: {.borrowed_chunk} + +Next, we will be using RStudio and the package `Glimma` to create interactive plots. See [this vignette](https://bioconductor.org/packages/release/bioc/vignettes/Glimma/inst/doc/limma_edger.html) for more information. + +1. The Bioconductor team has created a very useful package to programmatically interact with Terra and Google Cloud. Install the `AnVIL` package. It will make some steps easier as we go along. + + + + Screenshot of the RStudio environment interface. Code has been typed in the console and is highlighted. + +1. You can now quickly install precompiled binaries using the AnVIL package’s `install()` function. We will use it to install the `Glimma` package and the `airway` package. The `airway` package contains a `SummarizedExperiment` data class. This data describes an RNA-Seq experiment on four human airway smooth muscle cell lines treated with dexamethasone. + +{Note: for some of the packages, you will have to install packaged from the CRAN repository, using the install.packages() function. The examples will show you which install method to use.} + + + + Screenshot of the RStudio environment interface. Code has been typed in the console and is highlighted. + +1. Load the example data. + + + + Screenshot of the RStudio environment interface. Code has been typed in the console and is highlighted. + +1. The multidimensional scaling (MDS) plot is frequently used to explore differences in samples. When this data is MDS transformed, the first two dimensions explain the greatest variance between samples, and the amount of variance decreases monotonically with increasing dimension. The following code will launch a new window where you can interact with the MDS plot. + + + + Screenshot of the Glimma popout showing the data in an MDS plot. All data points are blue. + +1. Change the `colour_by` setting to "groups" so you can easily distinguish between groups. In this data, the "group" is the treatment. + + Screenshot of the Glimma popout showing the data in an MDS plot. Data points are colored blue and orange by group. The colour by dropdown menu on the interactive plot is hightlighted. + +1. You can download the interactive html file by clicking on "Save As". + + Screenshot of the Glimma popout showing the data in an MDS plot. The Save As menu is highlighted. + +1. You can also download plots and other files created directly in RStudio. To download the following plot, click on "Export" and save in your preferred format to the default directory. This saves the file in your cloud environment. + + + + Screenshot of the RStudio interface. A plot has been created. The Export menu has been highlighted. + +1. You should see the plot in the "Files" pane. + + Screenshot of the RStudio interface. A plot has been created. The saved pdf file is now visible under the "Files" pane. + +1. Select this file and click "More" > "Export" + + Screenshot of the RStudio interface. A plot has been created. The saved pdf file is now visible under the "Files" pane. The "More" and "Export" menus have been highlighted. + +1. Select "Download" to save the file to your local machine. + + Screenshot of the RStudio interface. The popup to download the selected file has been highlighted, +:::: + +## Pausing RStudio + +:::: {.borrowed_chunk} + +1. The right-hand side icon reminds you that you are accruing cloud computing costs. If you don’t see this icon, you may need to scroll to the right. + + Screenshot of the RStudio interface. The icon on the right showing that the cloud environment is running is highlighted. + +1. You should minimize charges when you are not performing an analysis. You can do this by clicking on the RStudio icon and selecting “Pause”. This will release the CPU and memory resources for other people to use. Note that your work will be saved in the environment and continue to accrue a very small cost. This work will be lost if the cloud environment gets deleted. If there is anything you would like to save permanently, it's a good idea to copy it from your compute environment to another location, such as the Workspace bucket, GitHub, or your local machine, depending on your needs. + + Screenshot of the RStudio menu. The pause button which stops the cloud environment is highlighted. + +:::{.notice} +You can also pause your cloud environment(s) at https://anvil.terra.bio/#clusters. +::: +:::: + +## Deleting RStudio + +:::: {.borrowed_chunk} + +1. Pausing your cloud environment only temporarily stops your work. When you are ready to delete the cloud environment, click on the RStudio icon on the right-hand side and select “Settings”. If you don’t see this icon, you may need to scroll to the right. + + Screenshot of the Workspace page. The RStudio icon associated with the cloud environment is highlighted. The Settings button is also highlighted + +1. Click on “Delete Environment”. + + Screenshot of the cloud environment popout. "Delete environment" is highlighted. + +1. If you are certain that you do not need the data and configuration on your disk, you should select "Delete everything, including persistent disk". If there is anything you would like to save, open the compute environment and copy the file(s) from your compute environment to another location, such as the Workspace bucket, GitHub, or your local machine, depending on your needs. + + Screenshot of the cloud environment popout. "Delete everything, including persistent disk" is highlighted. + +1. Select "DELETE". + + Screenshot of the cloud environment popout. "Delete" is highlighted. + +:::{.notice} +You can also delete your cloud environment(s) and disk storage at https://anvil.terra.bio/#clusters. +::: +:::: diff --git a/docs/08-student_modules.md b/docs/08-student_modules.md new file mode 100644 index 0000000..ff648d4 --- /dev/null +++ b/docs/08-student_modules.md @@ -0,0 +1,461 @@ + + +# Student instructions + +Modules aimed at students in a course or workshop. + +
+ +## Student Account Setup + +:::: {.borrowed_chunk} + +In order to run your analyses, you will use the [AnVIL cloud computing platform](https://anvilproject.org/), so that you do not need to install everything on your own computer. The AnVIL (Analysis Visualization and Informatics Lab-space) platform is specially designed for analyzing biological data, and is used by scientists doing all sorts of biological research. + +:::{.notice} +**AnVIL in a nutshell** + +- Behind the scenes, AnVIL relies on Google Cloud Platform to provide computing infrastructure. Basically, AnVIL lets you "rent" computers from Google (remotely). Whenever you run an analyses on AnVIL, it actually runs on one of Google's computers, and AnVIL lets you see the results in your browser. +- AnVIL uses [Terra](https://anvil.terra.bio/) to provide many computational tools useful for biological data analysis, such as [RStudio](https://www.rstudio.com/products/rstudio/), [Galaxy](https://usegalaxy.org/), and [Jupyter Notebooks](https://jupyter.org/). Terra takes care of installing these tools on Google's computers, so that you can just start using them. +::: + +### Create Google Account + +First, you will need to set up a (free) Google account. + +If you do not already have a Google account that you would like to use for accessing AnVIL, [create one now](https://accounts.google.com/SignUp). + +- Alternatively, if you would like to create a Google account that is associated with an existing non-Gmail email address, you can follow [these instructions](https://support.terra.bio/hc/en-us/articles/360029186611). + +### Log In to Terra + +Next, make sure you can log in to Terra -- you will use Terra to perform computations on AnVIL. + +You can access Terra by going to [`anvil.terra.bio`](https://anvil.terra.bio/), or by clicking the link on the [AnVIL home page](https://anvilproject.org/). + + +Screenshot of the AnVIL home page. The section descring Terra is highlighted. + +Open Terra, and you should be prompted to sign in with your Google account. + +### Share Username + +Finally, make sure your instructor has your Google account username (e.g. `myname@gmail.com`), so they can give you access to everything you need. + +- Make sure there are no typos! +- If you have multiple Google accounts, make sure you give them the username that you will be using to access AnVIL + +:::{.warning} +It is *very important* that you share the Google account you will be using to access AnVIL with with your instructor! Otherwise, the instructor cannot add you to Billing Projects or Workspaces, and you will be unable to proceed with your assignments. +::: +:::: + +## Student instructions for cloning a Workspace + +These instructions can be customized to a specific workspace by setting certain variables before running `cow::borrow_chapter()`. If these variables have not been set, reasonable defaults are provided (e.g. "ask your instructor"). + +### With no variables set: + +:::: {.borrowed_chunk} + +:::{.warning} +This **will not work** until your instructor has given you permission to spend money to "rent" the computers that will power your analyses (by adding you to a "Billing Project"). +::: + +On AnVIL, you access files and computers through **Workspaces**. Each Workspace functions almost like a mini code laboratory - it is a place where data can be examined, stored, and analyzed. The first thing we want to do is to copy or “clone” a Workspace to create a space for you to experiment. This will give you access to + +- the files you will need (data, code) +- the computing environment you will use + +:::{.notice} +**Tip** +At this point, it might make things easier to open up a new window in your browser and split your screen. That way, you can follow along with this guide on one side and execute the steps on the other. +::: + +To clone an AnVIL Workspace: + +1. Open Terra - use a web browser to go to [`anvil.terra.bio`](https://anvil.terra.bio/) + +1. In the drop-down menu on the left, navigate to "Workspaces". Click the triple bar in the top left corner to access the menu. Click "Workspaces". + + Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted. + +1. You are automatically directed to the "MY WORKSPACES" tab. Here you can see any Workspaces that have been shared with you, along with your permission level. Depending on how your instructor has set things up, you may or may not see any Workspaces in this tab. + + Screenshot of Terra Workspaces page with the "MY WORKSPACES" tab selected.  The "MY WORKSPACES" tab and the column showing permission level are highlighted. + +1. Locate the Workspace **specified by your instructor**. (The images below show the SARS-CoV-2-Genome Workspace as an example, but you should look for the Workspace **specified by your instructor**.) + a. If it has been shared with you ahead of time, it will appear in "MY WORKSPACES". + + Screenshot of Terra Workspaces page with the "MY WORKSPACES" tab selected. The "MY WORKSPACES" tab and a Workspace name are highlighted. + b. Otherwise, select the "PUBLIC" tab. In the top search bar, type the Workspace name **specified by your instructor**. + + Screenshot of Terra Workspaces page with the "PUBLIC" tab selected. The "PUBLIC" tab and search box are highlighted.  The the user has typed in the term "sars". A Workspace related to SARS appears in the results. + c. You can also go directly to the Workspace by clicking this link: ask your instructor. + +1. Clone the workspace by clicking the teardrop button (![teardrop button](https://raw.githubusercontent.com/jhudsl/AnVIL_Template/main/child/child_assets/teardrop_button.png){width=25px}). Select "Clone". Or, if you have opened the Workspace, you can find the teardrop button on the top right of the Workspace. + + Screenshot showing the teardrop button. The button has been clicked revealing the "clone" option. The Clone option and the teardrop button are highlighted. + Screenshot of the Dashboard for the Workspace that we want to clone. The teardrop button has been clicked to bring up the options. The "Clone" option from the list is highlighted. + +1. You will see a popup box appear, asking you to configure your Workspace + a. Give your Workspace clone a name by adding an underscore ("_") and your name. For example, \"ExampleWorkspace_Firstname_Lastname\". + a. Select the Billing Project provided by your instructor. + a. Leave the bottom two boxes as-is. + a. Click “CLONE WORKSPACE”. + + Screenshot showing the "clone a workspace" popout. The Workspace name, Billing Project, and Clone Workspace button have been filled in and highlighted. + +1. The new Workspace should now show up under "MY WORKSPACES". You now have your own copy of the Workspace to work in. +:::: + +### With variables set: + +:::: {.borrowed_chunk} + +:::{.warning} +This **will not work** until your instructor has given you permission to spend money to "rent" the computers that will power your analyses (by adding you to a "Billing Project"). +::: + +On AnVIL, you access files and computers through **Workspaces**. Each Workspace functions almost like a mini code laboratory - it is a place where data can be examined, stored, and analyzed. The first thing we want to do is to copy or “clone” a Workspace to create a space for you to experiment. This will give you access to + +- the files you will need (data, code) +- the computing environment you will use + +:::{.notice} +**Tip** +At this point, it might make things easier to open up a new window in your browser and split your screen. That way, you can follow along with this guide on one side and execute the steps on the other. +::: + +To clone an AnVIL Workspace: + +1. Open Terra - use a web browser to go to [`anvil.terra.bio`](https://anvil.terra.bio/) + +1. In the drop-down menu on the left, navigate to "Workspaces". Click the triple bar in the top left corner to access the menu. Click "Workspaces". + + Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted. + +1. You are automatically directed to the "MY WORKSPACES" tab. Here you can see any Workspaces that have been shared with you, along with your permission level. Depending on how your instructor has set things up, you may or may not see any Workspaces in this tab. + + Screenshot of Terra Workspaces page with the "MY WORKSPACES" tab selected.  The "MY WORKSPACES" tab and the column showing permission level are highlighted. + +1. Locate the Workspace **Example_Workspace**. (The images below show the SARS-CoV-2-Genome Workspace as an example, but you should look for the Workspace **Example_Workspace**.) + a. If it has been shared with you ahead of time, it will appear in "MY WORKSPACES". + + Screenshot of Terra Workspaces page with the "MY WORKSPACES" tab selected. The "MY WORKSPACES" tab and a Workspace name are highlighted. + b. Otherwise, select the "PUBLIC" tab. In the top search bar, type the Workspace name **Example_Workspace**. + + Screenshot of Terra Workspaces page with the "PUBLIC" tab selected. The "PUBLIC" tab and search box are highlighted.  The the user has typed in the term "sars". A Workspace related to SARS appears in the results. + c. You can also go directly to the Workspace by clicking this link: http://example.com/. + +1. Clone the workspace by clicking the teardrop button (![teardrop button](https://raw.githubusercontent.com/jhudsl/AnVIL_Template/main/child/child_assets/teardrop_button.png){width=25px}). Select "Clone". Or, if you have opened the Workspace, you can find the teardrop button on the top right of the Workspace. + + Screenshot showing the teardrop button. The button has been clicked revealing the "clone" option. The Clone option and the teardrop button are highlighted. + Screenshot of the Dashboard for the Workspace that we want to clone. The teardrop button has been clicked to bring up the options. The "Clone" option from the list is highlighted. + +1. You will see a popup box appear, asking you to configure your Workspace + a. Give your Workspace clone a name by adding an underscore ("_") and your name. For example, \"Example_Workspace_Firstname_Lastname\". + a. Select the Billing Project Example Billing Project. + a. Leave the bottom two boxes as-is. + a. Click “CLONE WORKSPACE”. + + Screenshot showing the "clone a workspace" popout. The Workspace name, Billing Project, and Clone Workspace button have been filled in and highlighted. + +1. The new Workspace should now show up under "MY WORKSPACES". You now have your own copy of the Workspace to work in. +:::: + +## Student instructions for launching Jupyter + +The module below is specially customized for students, allowing you to give more specific instructions on the settings for their Jupyter environment. There are several other general purpose modules that may also be useful for students (e.g. Pausing Jupyter, Deleting Jupyter) that can be found in other chapters of this book. + +The following instructions can be customized by setting certain variables before running `cow::borrow_chapter()`. Developers should create these variables as a list `AnVIL_module_settings`. The following variables can be provided: + +- `audience` = Defaults to `general`, telling them to use the default Jupyter settings. If `audience` is set to `student`, it gives more specific instructions. +- `docker_image` = Optional, it will tell them how to set the image. +- `startup_script` = Optional, it will tell them how to set the script. + +### Using default Jupyter environment: + +:::: {.borrowed_chunk} + +:::{.warning} +AnVIL is very versatile and can scale up to use very powerful cloud computers. It's very important that you select the cloud computing environment described here to avoid runaway costs. +::: + + + +1. Open Terra - use a web browser to go to [`anvil.terra.bio`](https://anvil.terra.bio/) + +1. In the drop-down menu on the left, navigate to "Workspaces". Click the triple bar in the top left corner to access the menu. Click "Workspaces". + + Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted. + +1. Click on the name of your Workspace. You should be routed to a link that looks like: `https://anvil.terra.bio/#workspaces//`. + +1. Click on the cloud icon on the far right to access your Cloud Environment options. + + Screenshot of a Terra Workspace. The cloud icon to create a new cloud environment is highlighted. + +1. In the dialogue box, click the "Settings" button under Jupyter. + + Screenshot of the Cloud Environment Details dialogue box. The Settings button under Jupyter is highlighted. + +1. You will see some configuration options for the Jupyter cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. + + Screenshot of the Jupyter Cloud Environment dialogue box. The cost to run the environment is highlighted. + + + + + + + + + + + + + + + +1. Leave everything else as-is. To create your Jupyter Cloud Environment, scroll down and click the "CREATE" button. + + Screenshot of the Jupyter Cloud Environment dialogue box. The "CREATE" button is highlighted. + +1. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the Jupyter icon. It will take a few minutes for Terra to request computers and install software. + + Screenshot of a Terra Workspace. The hovertext for the Jupyter icon is highlighted, and indicates that the status of the environment is "Creating". + +1. When your environment is ready, its status will change to "Running". Click on the "ANALYSES" tab to create or open a Jupyter Notebook. + + Screenshot of a Terra Workspace. The hovertext for the Jupyter icon is highlighted, and indicates that the status of the environment is "Running".  The ANALYSES tab is also highlighted + +1. From the ANALYSES tab, you can click on the name of an existing Jupyter Notebook to view and launch it, or click the "START" button to create a new Notebook. + + Screenshot of Terra Workspace with the "ANALYSES" tab selected and highlighted.  The page shows a list of Jupyter Notebooks.  The Notebook names and the START button are highlighted. + + +:::: + +### Using custom Jupyter environment: + +:::: {.borrowed_chunk} + +:::{.warning} +AnVIL is very versatile and can scale up to use very powerful cloud computers. It's very important that you select the cloud computing environment described here to avoid runaway costs. +::: + + + +1. Open Terra - use a web browser to go to [`anvil.terra.bio`](https://anvil.terra.bio/) + +1. In the drop-down menu on the left, navigate to "Workspaces". Click the triple bar in the top left corner to access the menu. Click "Workspaces". + + Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted. + +1. Click on the name of your Workspace. You should be routed to a link that looks like: `https://anvil.terra.bio/#workspaces//`. + +1. Click on the cloud icon on the far right to access your Cloud Environment options. + + Screenshot of a Terra Workspace. The cloud icon to create a new cloud environment is highlighted. + +1. In the dialogue box, click the "Settings" button under Jupyter. + + Screenshot of the Cloud Environment Details dialogue box. The Settings button under Jupyter is highlighted. + +1. You will see some configuration options for the Jupyter cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. + + Screenshot of the Jupyter Cloud Environment dialogue box. The cost to run the environment is highlighted. + + + + + +1. Under "Application configuration" you will see a dropdown menu. Choose "Custom Environment". Then copy the following link into "Container image" textbox: + + ` example docker ` + + Screenshot of the Jupyter Cloud Environment "Application configuration" dropdown. The option "Custom Environment" is highlighted. + + Screenshot of the Jupyter Cloud Environment dialog box. "Custom Environment" has been selected in the "Application configuration" dropdown menu, and the "Container image" textbox is highlighted. + + + +1. Under "Startup script" you will see textbox. Copy the following link into the box: + + ` example startup script ` + + Screenshot of the Jupyter Cloud Environment customization dialogue box. The textbox labeled "Startup script" is highlighted. + + + +1. Leave everything else as-is. To create your Jupyter Cloud Environment, scroll down and click the "CREATE" button. + + Screenshot of the Jupyter Cloud Environment dialogue box. The "CREATE" button is highlighted. + +1. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the Jupyter icon. It will take a few minutes for Terra to request computers and install software. + + Screenshot of a Terra Workspace. The hovertext for the Jupyter icon is highlighted, and indicates that the status of the environment is "Creating". + +1. When your environment is ready, its status will change to "Running". Click on the "ANALYSES" tab to create or open a Jupyter Notebook. + + Screenshot of a Terra Workspace. The hovertext for the Jupyter icon is highlighted, and indicates that the status of the environment is "Running".  The ANALYSES tab is also highlighted + +1. From the ANALYSES tab, you can click on the name of an existing Jupyter Notebook to view and launch it, or click the "START" button to create a new Notebook. + + Screenshot of Terra Workspace with the "ANALYSES" tab selected and highlighted.  The page shows a list of Jupyter Notebooks.  The Notebook names and the START button are highlighted. + + +:::: + +## Student instructions for launching RStudio + +The module below is specially customized for students, allowing you to give more specific instructions on the settings for their RStudio environment. There are several other general purpose modules that may also be useful for students (e.g. Pausing RStudio, Deleting RStudio) that can be found in other chapters of this book. + +The following instructions can be customized by setting certain variables before running `cow::borrow_chapter()`. Developers should create these variables as a list `AnVIL_module_settings`. The following variables can be provided: + +- `audience` = Defaults to `general`, telling them to use the default RStudio settings. If `audience` is set to `student`, it gives more specific instructions. +- `docker_image` = Optional, it will tell them to open the customization dialogue and direct them on how to set the image. +- `startup_script` = Optional, it will tell them to open the customization dialogue and direct them on how to set the script. + +### Using default RStudio environment: + +:::: {.borrowed_chunk} + +:::{.warning} +AnVIL is very versatile and can scale up to use very powerful cloud computers. It's very important that you select the cloud computing environment described here to avoid runaway costs. +::: + + + +1. Open Terra - use a web browser to go to [`anvil.terra.bio`](https://anvil.terra.bio/) + +1. In the drop-down menu on the left, navigate to "Workspaces". Click the triple bar in the top left corner to access the menu. Click "Workspaces". + + Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted. + +1. Click on the name of your Workspace. You should be routed to a link that looks like: `https://anvil.terra.bio/#workspaces//`. + +1. Click on the cloud icon on the far right to access your Cloud Environment options. + + Screenshot of a Terra Workspace. The cloud icon to create a new cloud environment is highlighted. + +1. In the dialogue box, click the "Settings" button under RStudio. + + Screenshot of the Cloud Environment Details dialogue box. The Settings button under RStudio is highlighted. + +1. You will see some details about the default RStudio cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. + + Screenshot of the RStudio Cloud Environment dialogue box. The cost to run the environment is highlighted. + + + +1. Click the "CREATE" button. + + Screenshot of the RStudio Cloud Environment dialogue box. The "CREATE" button is highlighted. + + + + + + + + + + + + + +1. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the RStudio logo. It will take a few minutes for Terra to request computers and install software. + + Screenshot of a Terra Workspace. The hovertext for the RStudio icon is highlighted, and indicates that the status of the environment is "Creating". + +1. When your environment is ready, its status will change to “Running”. Click on the RStudio logo to open a new dialogue box that will let you launch RStudio. + + Screenshot of a Terra Workspace. The hovertext for the RStudio icon is highlighted, and indicates that the status of the environment is "Running". + +1. Click the launch icon to open RStudio. This is also where you can pause, modify, or delete your environment when needed. + + Screenshot of the RStudio Environment Details dialogue box. The "Open" button is highlighted. + +1. You should now see the RStudio interface with information about the version printed to the console. + + Screenshot of the RStudio environment interface. +:::: + +### Using custom RStudio environment: + +:::: {.borrowed_chunk} + +:::{.warning} +AnVIL is very versatile and can scale up to use very powerful cloud computers. It's very important that you select the cloud computing environment described here to avoid runaway costs. +::: + + + +1. Open Terra - use a web browser to go to [`anvil.terra.bio`](https://anvil.terra.bio/) + +1. In the drop-down menu on the left, navigate to "Workspaces". Click the triple bar in the top left corner to access the menu. Click "Workspaces". + + Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted. + +1. Click on the name of your Workspace. You should be routed to a link that looks like: `https://anvil.terra.bio/#workspaces//`. + +1. Click on the cloud icon on the far right to access your Cloud Environment options. + + Screenshot of a Terra Workspace. The cloud icon to create a new cloud environment is highlighted. + +1. In the dialogue box, click the "Settings" button under RStudio. + + Screenshot of the Cloud Environment Details dialogue box. The Settings button under RStudio is highlighted. + +1. You will see some details about the default RStudio cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. + + Screenshot of the RStudio Cloud Environment dialogue box. The cost to run the environment is highlighted. + + + + + +1. Click "CUSTOMIZE" to adjust the settings for your environment. + + Screenshot of the RStudio Cloud Environment dialogue box. The "CUSTOMIZE" button is highlighted. + + + +1. Under "Application configuration" you will see a dropdown menu. You can also enter text here. Copy the following link into the box: + + ` example docker ` + + Screenshot of the RStudio Cloud Environment customization dialogue box. The dropdown menu labeled "Application configuration" is highlighted. + + + +1. Under "Startup script" you will see textbox. Copy the following link into the box: + + ` example startup script ` + + Screenshot of the RStudio Cloud Environment customization dialogue box. The textbox labeled "Startup script" is highlighted. + + + +1. Leave everything else as-is. To create your RStudio Cloud Environment, click on the “CREATE” button. + + Screenshot of the RStudio Cloud Environment customization dialogue box. The "CREATE" button is highlighted. + +1. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the RStudio logo. It will take a few minutes for Terra to request computers and install software. + + Screenshot of a Terra Workspace. The hovertext for the RStudio icon is highlighted, and indicates that the status of the environment is "Creating". + +1. When your environment is ready, its status will change to “Running”. Click on the RStudio logo to open a new dialogue box that will let you launch RStudio. + + Screenshot of a Terra Workspace. The hovertext for the RStudio icon is highlighted, and indicates that the status of the environment is "Running". + +1. Click the launch icon to open RStudio. This is also where you can pause, modify, or delete your environment when needed. + + Screenshot of the RStudio Environment Details dialogue box. The "Open" button is highlighted. + +1. You should now see the RStudio interface with information about the version printed to the console. + + Screenshot of the RStudio environment interface. +:::: diff --git a/docs/10-user_management_modules.md b/docs/10-user_management_modules.md new file mode 100644 index 0000000..3d34dc4 --- /dev/null +++ b/docs/10-user_management_modules.md @@ -0,0 +1,88 @@ +# User Management + +Modules about Groups and user management + +
+ +## Create Terra Group + +:::: {.borrowed_chunk} + +1. [Launch Terra](https://anvil.terra.bio/#workspaces) and sign in with your Google account. + +1. In the drop-down menu on the left, navigate to "Groups". Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click "Groups". You can also navigate there directly with this link: https://anvil.terra.bio/#groups + + Screenshot of the Terra drop-down menu.  Three items are highlighted: 1) the "hamburger" button for extending the drop-down menu, 2) the arrow next to your username, for extending the drop-down submenu, and 3) the submenu item "Groups". + +1. Click "+ Create a New Group" + + Screenshot of the Terra Group page. The "Create a New Group" button is highlighted. + +1. Enter a name for your group. Names must be unique, so it’s often helpful to include your team’s name, the purpose of the group, and optionally the timeframe, if you will have similar groups in the future. + + Screenshot of the Terra Group page with Create New Group pop out box. The textbox is highlighted and has been filled in with the Group name. + +1. Click "CREATE GROUP" + + Screenshot of the Terra Group page with Create New Group pop out box. The "CREATE GROUP" button is highlighted. + +1. Your new Group should now show up on the Group Management screen. Take note of the email address associated with your group. You will use this email to grant the group access to Billing Projects and Workspaces. + + Screenshot of the Terra Groups page.  The Group email address is highlighted. +:::: + +## Add Member to Terra Group + +:::: {.borrowed_chunk} + +1. [Launch Terra](https://anvil.terra.bio/#workspaces) and sign in with your Google account. + +1. In the drop-down menu on the left, navigate to "Groups". Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click "Groups". You can also navigate there directly with this link: https://anvil.terra.bio/#groups + + Screenshot of the Terra drop-down menu.  Three items are highlighted: 1) the "hamburger" button for extending the drop-down menu, 2) the arrow next to your username, for extending the drop-down submenu, and 3) the submenu item "Groups". + +1. Find the name of the Group you want to add someone to, and confirm that you have Admin privileges for the Group (you can only add and remove members to a Group if you are an Admin). Click on the name of the Group to view and manage members. + + Screenshot of the Terra Groups page.  The Group Name and Role are highlighted. + +1. Click on "+ Add User". You will be prompted to enter the user’s AnVIL ID. + + Screenshot of a Terra Group management page. The "+ Add User" button is highlighted. + +1. Type in the user’s email address. Make sure this is the account that they will be using to access AnVIL. + + Screenshot of the dialog box for adding Terra Group members. The textbox labeled "User email" is highlighted and an email address has been entered. + +1. If this member will need to add and remove other members of the Group, check the box for "Can manage members (admin)". This will add them as an "Admin" for the Group. Otherwise leave it unchecked, and they will be added as a "Member". + - Admins and Members have equal access to any resources shared with the Group. + - Admins can manage Group membership - they can add, remove, or change the role of other Group members. + + Screenshot of the dialog box for adding Terra Group members. The checkbox labeled "Can manage members (admin)" is highlighted. + +1. Click ADD USER. This will take you back to the Group administration page. + + Screenshot of the dialog box for adding Terra Group members. The button labeled "ADD USER" is highlighted. + +1. The new Group member will now be shown in the list of group members, along with their role. They should now have access to anything that the Group has been given access to. + + Screenshot of a Terra Group management page. The name and role of the new member is highlighted. + +If you need to remove members or modify their roles, you can do so at any time by clicking the teardrop button next to their name. + +Screenshot of a Terra Group management page. The teardrop button next to one of the members is highlighted. +:::: + +## Find Group Email + +:::: {.borrowed_chunk} + +1. [Launch Terra](https://anvil.terra.bio/#workspaces) and sign in with your Google account. + +1. In the drop-down menu on the left, navigate to "Groups". Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click "Groups". You can also navigate there directly with this link: https://anvil.terra.bio/#groups + + Screenshot of the Terra drop-down menu.  Three items are highlighted: 1) the "hamburger" button for extending the drop-down menu, 2) the arrow next to your username, for extending the drop-down submenu, and 3) the submenu item "Groups". + +1. Find the name of the Group, then look in the "Group Email" column to find the email address associated with the Group. Copy this email address and paste it in as the username when adding people to Billing Projects and Workspaces. This will grant everyone in the Group access to the Billing Project or Workspace. + + Screenshot of the Terra Groups page.  A Group email address is highlighted. +:::: diff --git a/docs/11-why-anvil.md b/docs/11-why-anvil.md new file mode 100644 index 0000000..b56e844 --- /dev/null +++ b/docs/11-why-anvil.md @@ -0,0 +1,24 @@ +# Why AnVIL + +Modules describing why AnVIL is useful for different personas. + +
+ +## Why AnVIL for Instructors? + +:::: {.borrowed_chunk} + +You may be wondering if AnVIL is a good choice for your class. We feel the answer is an unequivocal YES! + +AnVIL provides all the advantages of a cloud computing environment: + +- **Version control**: All students will be using the exact same versions of programs, running on the exact same operating system, and the majority of setup can be handled for the students ahead of time. This greatly reduces time spent on setup and prevents unexpected run errors during the activities, limiting the amount of troubleshooting you have to do. As a result, classes and activities will run more smoothly and predictably. +- **Inclusivity**: Cloud-computing enables all students to participate in the activity without needing to provide computers with certain specifications. +- **Experience**: Cloud-computing is becoming common in today’s bioinformatics workplaces, and the classroom is a low-stress and low-stakes opportunity for students to gain experience. + +AnVIL is purpose-built for genomic data science: + +- **Tools**: Through AnVIL, students can access a wide range of tools (Galaxy, RStudio/Bioconductor, Jupyter, as well as scripted workflows) all in one place, and can easily transition between them. +- **Datasets**: AnVIL provides a large and growing collection of relevant datasets with standardized organization, for easier importing and processing. +- **Authenticity**: On AnVIL, students will be working in the same environment as scientists carrying out cutting edge research. +:::: diff --git a/docs/12-instructor_modules.md b/docs/12-instructor_modules.md new file mode 100644 index 0000000..c6ebe4a --- /dev/null +++ b/docs/12-instructor_modules.md @@ -0,0 +1,71 @@ +# Instructor modules + +Modules aimed at instructors. + +
+ +## Why AnVIL for Instructors? + +:::: {.borrowed_chunk} + +You may be wondering if AnVIL is a good choice for your class. We feel the answer is an unequivocal YES! + +AnVIL provides all the advantages of a cloud computing environment: + +- **Version control**: All students will be using the exact same versions of programs, running on the exact same operating system, and the majority of setup can be handled for the students ahead of time. This greatly reduces time spent on setup and prevents unexpected run errors during the activities, limiting the amount of troubleshooting you have to do. As a result, classes and activities will run more smoothly and predictably. +- **Inclusivity**: Cloud-computing enables all students to participate in the activity without needing to provide computers with certain specifications. +- **Experience**: Cloud-computing is becoming common in today’s bioinformatics workplaces, and the classroom is a low-stress and low-stakes opportunity for students to gain experience. + +AnVIL is purpose-built for genomic data science: + +- **Tools**: Through AnVIL, students can access a wide range of tools (Galaxy, RStudio/Bioconductor, Jupyter, as well as scripted workflows) all in one place, and can easily transition between them. +- **Datasets**: AnVIL provides a large and growing collection of relevant datasets with standardized organization, for easier importing and processing. +- **Authenticity**: On AnVIL, students will be working in the same environment as scientists carrying out cutting edge research. +:::: + +## Checklist Link + +:::: {.borrowed_chunk} + +Here is a [checklist](https://docs.google.com/document/d/1-HqQqH_qlkHwRua8-b92MyKQcEmcl0Nk37rSYqP49aw/edit) to help you keep track of the steps for setting up and teaching on AnVIL. Details about each of these steps can be found in the [AnVIL Instructor Guide](https://jhudatascience.org/AnVIL_Book_Instructor_Guide). *Note that this checklist is written for workshop instructors as well as classroom instructors, so some of the "Event Setup" steps may not be applicable to you, depending on your teaching context.* +:::: + +## Checklist Timeline (premade content) + +:::: {.borrowed_chunk} + +**1+ month before:** + +- Figure out how you will fund the class/workshop. +- Start working through INSTRUCTOR SETUP. + - It's a good idea to get billing figured out with plenty of time to spare. + - Take some time to familiarize yourself with the content and make any desired updates or customizations. +- Do any necessary EVENT SETUP steps. + +**~1 week before:** + +- Start working through RUNNING THE CLASS. +- If possible, have students log in to AnVIL and send you their usernames, so you can add them to the Student Group ahead of time. This saves time on the day of the class. +- **Do not add students to your Billing Project** ahead of time. This prevents them from accruing costs. + +**Day of (or shortly before):** + +- Add students to Billing Project. +- Have students clone the Workspace (They cannot do this until you have added them to the Billing Project. As soon as they do this, they can start computing.). + +**After:** + +- Collect feedback, if you didn't do it during the class/workshop. +- Work though EVENT WRAP-UP - **until you shut things down, you will continue to accrue costs**. +:::: + +## Recommendation to use STRIDES + +:::: {.borrowed_chunk} + +If you are new to AnVIL, **we strongly recommend seeking funding through NHGRI / STRIDES for teaching your course**. In order to prevent abuse, Google sets certain limits on cloud resources available to new users that can complicate teaching (e.g. [project quotas](https://support.terra.bio/hc/en-us/articles/6101030164507-When-workspace-creation-fails-Google-project-quotas)). As you or your institution builds a payment history with Google, the limits on your accounts will be relaxed. In the meantime, STRIDES funding can help ensure your initial classes run smoothly. + +**What is STRIDES?** NHGRI's [strategic vision](https://pubmed.ncbi.nlm.nih.gov/33116284/) highlights the importance of training the next generation of genomic scientists. In collaboration with the NIH Office of Data Science Strategy, NHGRI makes funding available to AnVIL users through the [STRIDES](https://datascience.nih.gov/strides) program, which aims to promote biological research in cloud environments. + +**To inquire about funding your class on AnVIL, please contact help@lists.anvilproject.org.** +:::: diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 0000000..c854221 --- /dev/null +++ b/docs/404.html @@ -0,0 +1,407 @@ + + + + + + + Page not found | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

Page not found

+

The page you requested cannot be found (perhaps it was moved or renamed).

+

You may want to try searching to find the page's new location, or use +the table of contents to find the page you are looking for.

+
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/About.md b/docs/About.md new file mode 100644 index 0000000..d1a4fb1 --- /dev/null +++ b/docs/About.md @@ -0,0 +1,134 @@ + +# About the Authors {-} + +These credits are based on our [course contributors table guidelines](https://github.com/jhudsl/OTTR_Template/wiki/How-to-give-credits). + +  +  + + + +|Credits|Names| +|-------|-----| +|**Pedagogy**|| +|Lead Content Instructor(s)|[FirstName LastName]| +|Lecturer(s) (include chapter name/link in parentheses if only for specific chapters) - make new line if more than one chapter involved| Delivered the course in some way - video or audio| +|Content Author(s) (include chapter name/link in parentheses if only for specific chapters) - make new line if more than one chapter involved | If any other authors besides lead instructor| +|Content Contributor(s) (include section name/link in parentheses) - make new line if more than one section involved| Wrote less than a chapter

AnVIL instructions: [Katherine Cox], [Ava Hoffman], [Elizabeth Humphries]| +|Content Editor(s)/Reviewer(s) | Checked your content| +|Content Director(s) | Helped guide the content direction| +|Content Consultants (include chapter name/link in parentheses or word "General") - make new line if more than one chapter involved | Gave high level advice on content

AnVIL instructions: [Allie Cliffe]| +|Acknowledgments| Gave small assistance to content but not to the level of consulting | +|**Production**|| +|Content Publisher(s)| Helped with publishing platform| +|Content Publishing Reviewer(s)| Reviewed overall content and aesthetics on publishing platform| +|**Technical**|| +|Course Publishing Engineer(s)| Helped with the code for the technical aspects related to the specific course generation| +|Template Publishing Engineers|[Candace Savonen], [Carrie Wright]| +|Publishing Maintenance Engineer|[Candace Savonen]| +|Technical Publishing Stylists|[Carrie Wright], [Candace Savonen]| +|Package Developers ([ottrpal])|[John Muschelli], [Candace Savonen], [Carrie Wright]| +|**Art and Design**|| +|Illustrator(s)| Created graphics for the course| +|Figure Artist(s)| Created figures/plots for course| +|Videographer(s)| Filmed videos| +|Videography Editor(s)| Edited film| +|Audiographer(s)| Recorded audio| +|Audiography Editor(s)| Edited audio recordings| +|**Funding**|| +|Funder(s)| Institution/individual who funded course including grant number| +|Funding Staff| Staff members who help with funding| + +  + + +``` +## ─ Session info ─────────────────────────────────────────────────────────────── +## setting value +## version R version 4.3.2 (2023-10-31) +## os Ubuntu 22.04.4 LTS +## system x86_64, linux-gnu +## ui X11 +## language (EN) +## collate en_US.UTF-8 +## ctype en_US.UTF-8 +## tz Etc/UTC +## date 2024-08-07 +## pandoc 3.1.1 @ /usr/local/bin/ (via rmarkdown) +## +## ─ Packages ─────────────────────────────────────────────────────────────────── +## package * version date (UTC) lib source +## bookdown 0.39.1 2024-06-11 [1] Github (rstudio/bookdown@f244cf1) +## bslib 0.6.1 2023-11-28 [1] RSPM (R 4.3.0) +## cachem 1.0.8 2023-05-01 [1] RSPM (R 4.3.0) +## cli 3.6.2 2023-12-11 [1] RSPM (R 4.3.0) +## devtools 2.4.5 2022-10-11 [1] RSPM (R 4.3.0) +## digest 0.6.34 2024-01-11 [1] RSPM (R 4.3.0) +## ellipsis 0.3.2 2021-04-29 [1] RSPM (R 4.3.0) +## evaluate 0.23 2023-11-01 [1] RSPM (R 4.3.0) +## fastmap 1.1.1 2023-02-24 [1] RSPM (R 4.3.0) +## fs 1.6.3 2023-07-20 [1] RSPM (R 4.3.0) +## glue 1.7.0 2024-01-09 [1] RSPM (R 4.3.0) +## htmltools 0.5.7 2023-11-03 [1] RSPM (R 4.3.0) +## htmlwidgets 1.6.4 2023-12-06 [1] RSPM (R 4.3.0) +## httpuv 1.6.14 2024-01-26 [1] RSPM (R 4.3.0) +## jquerylib 0.1.4 2021-04-26 [1] RSPM (R 4.3.0) +## jsonlite 1.8.8 2023-12-04 [1] RSPM (R 4.3.0) +## knitr 1.47.3 2024-06-11 [1] Github (yihui/knitr@e1edd34) +## later 1.3.2 2023-12-06 [1] RSPM (R 4.3.0) +## lifecycle 1.0.4 2023-11-07 [1] RSPM (R 4.3.0) +## magrittr 2.0.3 2022-03-30 [1] RSPM (R 4.3.0) +## memoise 2.0.1 2021-11-26 [1] RSPM (R 4.3.0) +## mime 0.12 2021-09-28 [1] RSPM (R 4.3.0) +## miniUI 0.1.1.1 2018-05-18 [1] RSPM (R 4.3.0) +## pkgbuild 1.4.3 2023-12-10 [1] RSPM (R 4.3.0) +## pkgload 1.3.4 2024-01-16 [1] RSPM (R 4.3.0) +## profvis 0.3.8 2023-05-02 [1] RSPM (R 4.3.0) +## promises 1.2.1 2023-08-10 [1] RSPM (R 4.3.0) +## purrr 1.0.2 2023-08-10 [1] RSPM (R 4.3.0) +## R6 2.5.1 2021-08-19 [1] RSPM (R 4.3.0) +## Rcpp 1.0.12 2024-01-09 [1] RSPM (R 4.3.0) +## remotes 2.4.2.1 2023-07-18 [1] RSPM (R 4.3.0) +## rlang 1.1.4 2024-06-04 [1] CRAN (R 4.3.2) +## rmarkdown 2.27.1 2024-06-11 [1] Github (rstudio/rmarkdown@e1c93a9) +## sass 0.4.8 2023-12-06 [1] RSPM (R 4.3.0) +## sessioninfo 1.2.2 2021-12-06 [1] RSPM (R 4.3.0) +## shiny 1.8.0 2023-11-17 [1] RSPM (R 4.3.0) +## stringi 1.8.3 2023-12-11 [1] RSPM (R 4.3.0) +## stringr 1.5.1 2023-11-14 [1] RSPM (R 4.3.0) +## urlchecker 1.0.1 2021-11-30 [1] RSPM (R 4.3.0) +## usethis 2.2.3 2024-02-19 [1] RSPM (R 4.3.0) +## vctrs 0.6.5 2023-12-01 [1] RSPM (R 4.3.0) +## xfun 0.44.4 2024-06-11 [1] Github (yihui/xfun@9da62cc) +## xtable 1.8-4 2019-04-21 [1] RSPM (R 4.3.0) +## yaml 2.3.8 2023-12-11 [1] RSPM (R 4.3.0) +## +## [1] /usr/local/lib/R/site-library +## [2] /usr/local/lib/R/library +## +## ────────────────────────────────────────────────────────────────────────────── +``` + + + +[FirstName LastName]: link to personal website +[Allie Cliffe]: https://alliecliffe.com/ +[Katherine Cox]: https://katherinecox.github.io/ +[Ava Hoffman]: https://www.avahoffman.com/ +[Elizabeth Humphries]: https://www.linkedin.com/in/elizabeth-humphries-61202a103/ +[John Muschelli]: https://johnmuschelli.com/ +[Candace Savonen]: https://www.cansavvy.com/ +[Carrie Wright]: https://carriewright11.github.io/ + + + +[ottrpal]: https://github.com/jhudsl/ottrpal + + diff --git a/docs/References.md b/docs/References.md new file mode 100644 index 0000000..98d65dc --- /dev/null +++ b/docs/References.md @@ -0,0 +1,2 @@ + +# References diff --git a/docs/a-new-chapter.html b/docs/a-new-chapter.html new file mode 100644 index 0000000..f972971 --- /dev/null +++ b/docs/a-new-chapter.html @@ -0,0 +1,648 @@ + + + + + + + Chapter 2 A new chapter | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

Chapter 2 A new chapter

+

*If you haven’t yet read the getting started Wiki pages; start there

+

Every chapter needs to start out with this chunk of code:

+
+

2.1 Learning Objectives

+

*Every chapter also needs Learning objectives that will look like this:

+

This chapter will cover:

+ +
+
+

2.2 Libraries

+

For this chapter, we’ll need the following packages attached:

+

*Remember to add any additional packages you need to your course’s own docker image.

+
library(magrittr)
+
+
+

2.3 Subtopic

+

Here’s a subheading and some text in this subsection!

+
+

2.3.1 Code examples

+

You can demonstrate code like this:

+
output_dir <- file.path("resources", "code_output")
+if (!dir.exists(output_dir)) {
+  dir.create(output_dir)
+}
+

And make plots too:

+
hist_plot <- hist(iris$Sepal.Length)
+

+

You can also save these plots to file:

+
png(file.path(output_dir, "test_plot.png"))
+hist_plot
+
## $breaks
+## [1] 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0
+## 
+## $counts
+## [1]  5 27 27 30 31 18  6  6
+## 
+## $density
+## [1] 0.06666667 0.36000000 0.36000000 0.40000000 0.41333333 0.24000000 0.08000000
+## [8] 0.08000000
+## 
+## $mids
+## [1] 4.25 4.75 5.25 5.75 6.25 6.75 7.25 7.75
+## 
+## $xname
+## [1] "iris$Sepal.Length"
+## 
+## $equidist
+## [1] TRUE
+## 
+## attr(,"class")
+## [1] "histogram"
+
dev.off()
+
## png 
+##   2
+
+
+

2.3.2 Image example

+

How to include a Google slide. It’s simplest to use the ottrpal package:

+

Major point!! example image

+

But if you have the slide or some other image locally downloaded you can also use html like this:

+

Major point!! example image

+
+
+

2.3.3 Video examples

+

To show videos in your course, you can use markdown syntax like this:

+

A video we want to show

+

Alternatively, you can use knitr::include_url() like this: +Note that we are using echo=FALSE in the code chunk because we don’t want the code part of this to show up. +If you are unfamiliar with how R Markdown code chunks work, read this.

+ +

OR this works:

+ +
+ + +
+

2.3.6 Citation examples

+

We can put citations at the end of a sentence like this (Allaire et al. 2021). +Or multiple citations Xie, Allaire, and Grolemund (2018).

+

but they need a ; separator (Allaire et al. 2021; Xie, Allaire, and Grolemund 2018).

+

In text, we can put citations like this Allaire et al. (2021).

+
+
+

2.3.7 Callout boxes

+

There are some preset callout boxes available, which can be used like so:

+

notice:

+
+

Here’s something interesting.

+
+

warning:

+
+

Look out!

+
+

dictionary:

+
+

Here’s a definition.

+
+

reflection:

+
+

Consider this!

+
+

github:

+
+

Here’s how you use GitHub.

+
+

wip:

+
+

This section is a Work in Progress.

+
+
+ +
+ +
+

References

+
+
+Allaire, JJ, Yihui Xie, Jonathan McPherson, Javier Luraschi, Kevin Ushey, Aron Atkins, Hadley Wickham, Joe Cheng, Winston Chang, and Richard Iannone. 2021. Rmarkdown: Dynamic Documents for r. https://github.com/rstudio/rmarkdown. +
+
+Xie, Yihui, J. J. Allaire, and Garrett Grolemund. 2018. R Markdown: The Definitive Guide. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown. +
+
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/about-the-authors.html b/docs/about-the-authors.html new file mode 100644 index 0000000..0e6cd12 --- /dev/null +++ b/docs/about-the-authors.html @@ -0,0 +1,610 @@ + + + + + + + About the Authors | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

About the Authors

+

These credits are based on our course contributors table guidelines.

+

  + 

+ + ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CreditsNames
Pedagogy
Lead Content Instructor(s)FirstName LastName
Lecturer(s) (include chapter name/link in parentheses if only for specific chapters) - make new line if more than one chapter involvedDelivered the course in some way - video or audio
Content Author(s) (include chapter name/link in parentheses if only for specific chapters) - make new line if more than one chapter involvedIf any other authors besides lead instructor
Content Contributor(s) (include section name/link in parentheses) - make new line if more than one section involvedWrote less than a chapter

AnVIL instructions: Katherine Cox, Ava Hoffman, Elizabeth Humphries
Content Editor(s)/Reviewer(s)Checked your content
Content Director(s)Helped guide the content direction
Content Consultants (include chapter name/link in parentheses or word “General”) - make new line if more than one chapter involvedGave high level advice on content

AnVIL instructions: Allie Cliffe
AcknowledgmentsGave small assistance to content but not to the level of consulting
Production
Content Publisher(s)Helped with publishing platform
Content Publishing Reviewer(s)Reviewed overall content and aesthetics on publishing platform
Technical
Course Publishing Engineer(s)Helped with the code for the technical aspects related to the specific course generation
Template Publishing EngineersCandace Savonen, Carrie Wright
Publishing Maintenance EngineerCandace Savonen
Technical Publishing StylistsCarrie Wright, Candace Savonen
Package Developers (ottrpal)John Muschelli, Candace Savonen, Carrie Wright
Art and Design
Illustrator(s)Created graphics for the course
Figure Artist(s)Created figures/plots for course
Videographer(s)Filmed videos
Videography Editor(s)Edited film
Audiographer(s)Recorded audio
Audiography Editor(s)Edited audio recordings
Funding
Funder(s)Institution/individual who funded course including grant number
Funding StaffStaff members who help with funding
+

 

+
## ─ Session info ───────────────────────────────────────────────────────────────
+##  setting  value
+##  version  R version 4.3.2 (2023-10-31)
+##  os       Ubuntu 22.04.4 LTS
+##  system   x86_64, linux-gnu
+##  ui       X11
+##  language (EN)
+##  collate  en_US.UTF-8
+##  ctype    en_US.UTF-8
+##  tz       Etc/UTC
+##  date     2024-08-07
+##  pandoc   3.1.1 @ /usr/local/bin/ (via rmarkdown)
+## 
+## ─ Packages ───────────────────────────────────────────────────────────────────
+##  package     * version date (UTC) lib source
+##  bookdown      0.39.1  2024-06-11 [1] Github (rstudio/bookdown@f244cf1)
+##  bslib         0.6.1   2023-11-28 [1] RSPM (R 4.3.0)
+##  cachem        1.0.8   2023-05-01 [1] RSPM (R 4.3.0)
+##  cli           3.6.2   2023-12-11 [1] RSPM (R 4.3.0)
+##  devtools      2.4.5   2022-10-11 [1] RSPM (R 4.3.0)
+##  digest        0.6.34  2024-01-11 [1] RSPM (R 4.3.0)
+##  ellipsis      0.3.2   2021-04-29 [1] RSPM (R 4.3.0)
+##  evaluate      0.23    2023-11-01 [1] RSPM (R 4.3.0)
+##  fastmap       1.1.1   2023-02-24 [1] RSPM (R 4.3.0)
+##  fs            1.6.3   2023-07-20 [1] RSPM (R 4.3.0)
+##  glue          1.7.0   2024-01-09 [1] RSPM (R 4.3.0)
+##  htmltools     0.5.7   2023-11-03 [1] RSPM (R 4.3.0)
+##  htmlwidgets   1.6.4   2023-12-06 [1] RSPM (R 4.3.0)
+##  httpuv        1.6.14  2024-01-26 [1] RSPM (R 4.3.0)
+##  jquerylib     0.1.4   2021-04-26 [1] RSPM (R 4.3.0)
+##  jsonlite      1.8.8   2023-12-04 [1] RSPM (R 4.3.0)
+##  knitr         1.47.3  2024-06-11 [1] Github (yihui/knitr@e1edd34)
+##  later         1.3.2   2023-12-06 [1] RSPM (R 4.3.0)
+##  lifecycle     1.0.4   2023-11-07 [1] RSPM (R 4.3.0)
+##  magrittr      2.0.3   2022-03-30 [1] RSPM (R 4.3.0)
+##  memoise       2.0.1   2021-11-26 [1] RSPM (R 4.3.0)
+##  mime          0.12    2021-09-28 [1] RSPM (R 4.3.0)
+##  miniUI        0.1.1.1 2018-05-18 [1] RSPM (R 4.3.0)
+##  pkgbuild      1.4.3   2023-12-10 [1] RSPM (R 4.3.0)
+##  pkgload       1.3.4   2024-01-16 [1] RSPM (R 4.3.0)
+##  profvis       0.3.8   2023-05-02 [1] RSPM (R 4.3.0)
+##  promises      1.2.1   2023-08-10 [1] RSPM (R 4.3.0)
+##  purrr         1.0.2   2023-08-10 [1] RSPM (R 4.3.0)
+##  R6            2.5.1   2021-08-19 [1] RSPM (R 4.3.0)
+##  Rcpp          1.0.12  2024-01-09 [1] RSPM (R 4.3.0)
+##  remotes       2.4.2.1 2023-07-18 [1] RSPM (R 4.3.0)
+##  rlang         1.1.4   2024-06-04 [1] CRAN (R 4.3.2)
+##  rmarkdown     2.27.1  2024-06-11 [1] Github (rstudio/rmarkdown@e1c93a9)
+##  sass          0.4.8   2023-12-06 [1] RSPM (R 4.3.0)
+##  sessioninfo   1.2.2   2021-12-06 [1] RSPM (R 4.3.0)
+##  shiny         1.8.0   2023-11-17 [1] RSPM (R 4.3.0)
+##  stringi       1.8.3   2023-12-11 [1] RSPM (R 4.3.0)
+##  stringr       1.5.1   2023-11-14 [1] RSPM (R 4.3.0)
+##  urlchecker    1.0.1   2021-11-30 [1] RSPM (R 4.3.0)
+##  usethis       2.2.3   2024-02-19 [1] RSPM (R 4.3.0)
+##  vctrs         0.6.5   2023-12-01 [1] RSPM (R 4.3.0)
+##  xfun          0.44.4  2024-06-11 [1] Github (yihui/xfun@9da62cc)
+##  xtable        1.8-4   2019-04-21 [1] RSPM (R 4.3.0)
+##  yaml          2.3.8   2023-12-11 [1] RSPM (R 4.3.0)
+## 
+##  [1] /usr/local/lib/R/site-library
+##  [2] /usr/local/lib/R/library
+## 
+## ──────────────────────────────────────────────────────────────────────────────
+ + + + +
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/anvil-module-library.html b/docs/anvil-module-library.html new file mode 100644 index 0000000..cc2f871 --- /dev/null +++ b/docs/anvil-module-library.html @@ -0,0 +1,445 @@ + + + + + + + Chapter 3 AnVIL Module Library | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

Chapter 3 AnVIL Module Library

+

There are several pieces of content that are useful across multiple books, such as “How to Create a Workspace”. To reduce maintenance burden, the AnVIL_Template repository has a collection of _child R Markdown documents that can be included in your books.

+

You can see all the available AnVIL modules in the AnVIL_Template book

+
+

3.1 Include using cow::borrow_chapter()

+

To add a module to your book, include a code chunk with the cow::borrow_chapter() function, specifying the file for the module you want to borrow and the repository you want to borrow it from (the AnVIL_Template repository).

+

See the OTTR_Template wiki page for the most recent instructions and additional details.

+

Here is an example of including the _child_workspace_create.Rmd with cow::borrow_chapter()

+
    +
  1. Launch Terra

  2. +
  3. In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”.

    +

    Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted.

  4. +
  5. Click on the plus icon near the top of left of the page.

    +

    Screenshot of Terra Workspaces page.  The "+" is highlighted.

  6. +
  7. Name your Workspace and select the appropriate Billing Project. All activity in the Workspace will be charged to this Billing Project (regardless of who conducted it).

    +

    Screenshot of Terra dialog box for creating a new Workspace.  The text box labeled "Workspace name" and the drop-down menu labeled "Billing project" are highlighted.

  8. +
  9. If you are working with protected data, you can set the Authorization Domain to limit who can be added to your Workspace. Note that the Authorization Domain cannot be changed after the Workspace is created (i.e. there is no way to make this Workspace shareable with a larger audience in the future). Workspaces by default are only visible to people you specifically share them with. Authorization domains add an extra layer of enforcement over privacy, but by nature make sharing more complicated. We recommend using Authorization Domains in cases where it is extremely important and/or legally required that the data be kept private (e.g. protected patient data, industry data). For data you would merely prefer not be shared with the world, we recommend relying on standard Workspace sharing permissions rather than Authorization Domains, as Authorization Domains can make future collaborations, publications, or other sharing complicated.

    +

    Screenshot of Terra dialog box for creating a new Workspace.  The drop-down menu labeled "Authorization domain" is highlighted.

  10. +
  11. Click “CREATE WORKSPACE”. The new Workspace should now show up under your Workspaces.

    +

    Screenshot of Terra dialog box for creating a new Workspace.  The "Create Workspace" button is highlighted.

  12. +
+
+
+

3.2 Background Highlighting for Borrowed Chapters

+

You can use the borrowed_chunk custom div block to highlight borrowed content or any other content you choose.

+

Basic format:

+
:::: {.borrowed_chunk}
+Code/Content here
+::::
+

Rendered with highlighting:

+
+

If you do not already have a Google account that you would like to use for accessing Terra, create one now.

+

If you would like to create a Google account that is associated with your non-Gmail, institutional email address, follow these instructions.

+
+

Rendered without highlighting:

+

If you do not already have a Google account that you would like to use for accessing Terra, create one now.

+

If you would like to create a Google account that is associated with your non-Gmail, institutional email address, follow these instructions.

+ +
+
+ + + +
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/billing.html b/docs/billing.html new file mode 100644 index 0000000..aabd33a --- /dev/null +++ b/docs/billing.html @@ -0,0 +1,621 @@ + + + + + + + Chapter 5 Billing | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

Chapter 5 Billing

+

Modules about billing and Billing Projects on Google Cloud Platform and Terra.

+


+
+

5.1 Create Google Billing Account

+
+
    +
  1. Log in to the Google Cloud Platform console using your Google ID. Make sure to use the same Google account ID you use to log into Terra.

  2. +
  3. If you are a first time user, don’t forget to claim your free credits! If you haven’t been to the console before, once you accept the Terms of Service you will be greeted with an invitation to “Try for Free.”

    +

    Screenshot of the Google Cloud Console with the "Try for Free" button highlighted.

  4. +
  5. Follow the instructions to sign up for a Billing Account and get your credits.

  6. +
  7. Choose “Individual Account”. This “billing account” is just for managing billing, so you don’t need to be able to add your team members. You will need to give either a credit card or bank account for security. Don’t worry! You won’t be billed until you explicitly turn on automatic billing.

    +

    Screenshot of the Google Cloud Billing Account Setup, with "Individual Account" highlighted.  Also highlighted is text stating "You won't be charged unless you manually upgrade to a paid account."

  8. +
  9. You can view and edit your new Billing Account, by selecting “Billing” from the left-hand menu, or going directly to the billing console console.cloud.google.com/billing

    +

    Screenshot of the Google Cloud Console dropdown menu, with "Billing" highlighted.

  10. +
  11. Clicking on the Billing Account name will allow you to manage the account, including accessing reports, setting alerts, and managing payments and billing.

    +

    Screenshot of the Google Cloud Console Billing Page, with the name of the new billing account highlighted.

  12. +
+

At any point, you can create additional Billing Accounts using the Create Account button. We generally recommend creating a new Billing Account for each funding source.

+
+
+
+

5.2 Add Terra to Google Billing Account

+
+

This gives Terra permission to create projects and send charges to the Google Billing Account, and must be done by an administrator of the Google Billing Account.

+

Terra needs to be added as a “Billing Account User”:

+
    +
  1. Log in to the Google Cloud Platform console using your Google ID.

  2. +
  3. Navigate to Billing

    +

    Screenshot of the Google Cloud Console drop-down menu, with "Billing" highlighted.

  4. +
  5. You may be automatically directed to view a specific Billing Account. If you see information about a single account rather than a list of your Billing Accounts, you can get back to the list by clicking “Manage Billing Accounts” from the drop-down menu.

    +

    Screenshot of an individual Google Cloud Billing Account with the drop-down menu item "Manage Billing Accounts" highlighted.

  6. +
  7. Check the box next to the Billing Account you wish to add Terra to, click “ADD MEMBER”.

    +

    Screenshot of Google Cloud Billing Accounts Overview. The checkbox next to the name of a Billing Account is checked and highlighted, and the "Add Member" button is highlighted.

  8. +
  9. Enter terra-billing@terra.bio in the text box. In the drop-down menu, mouse over Billing, then choose “Billing Account User”.

    +

    Screenshot of the dialogue box for adding a member to a Google Cloud Billing Accounts. The text box is highlighted and has been filled in with "terra-billing@terra.bio".  In the drop-down menu labeled "Select a Role", the item "Billing" and the submenu item "Billing Account User" are highlighted.

  10. +
  11. Click “SAVE”.

    +

    Screenshot of the dialogue box for adding a member to a Google Cloud Billing Accounts. The Save button is highlighted.

  12. +
+
+
+
+

5.3 Add Members to Google Billing Account

+
+

Anyone you wish to add to the Billing Account will need their own Google ID.

+

To add a member to a Billing Project:

+
    +
  1. Log in to the Google Cloud Platform console using your Google ID.

  2. +
  3. Navigate to Billing

    +

    Screenshot of the Google Cloud Console drop-down menu, with "Billing" highlighted.

  4. +
  5. You may be automatically directed to view a specific Billing Account. If you see information about a single account rather than a list of your Billing Accounts, you can get back to the list by clicking “Manage Billing Accounts” from the drop-down menu.

    +

    Screenshot of an individual Google Cloud Billing Account with the drop-down menu item "Manage Billing Accounts" highlighted.

  6. +
  7. Check the box next to the Billing Account you wish to add a member to, click “ADD MEMBER”.

    +

    Screenshot of Google Cloud Billing Accounts Overview. The checkbox next to the name of a Billing Account is checked and highlighted, and the "Add Member" button is highlighted.

  8. +
  9. Enter their Google ID in the text box. In the drop-down menu, mouse over Billing, then choose the appropriate role.

    +

    Screenshot of the dialogue box for adding a member to a Google Cloud Billing Accounts. In the drop-down menu labeled "Select a Role", the item "Billing" and the submenu item "Billing Account Viewer" are highlighted.

  10. +
  11. Click “SAVE”.

    +

    Screenshot of the dialogue box for adding a member to a Google Cloud Billing Accounts. The Save button is highlighted.

  12. +
+
+
+
+

5.4 Set Alerts for Google Billing

+
+
    +
  1. Log in to the Google Cloud Platform console using the Google ID associated with your Google Cloud projects.

  2. +
  3. Open the dropdown menu on the top left and click on Billing.

    +

    Screenshot of the Google Cloud Console drop-down menu, with "Billing" highlighted.

  4. +
  5. You may be automatically directed to view a specific Billing Account. If you see information about a single account (and it’s not the one you’re interested in), you can get back to the list of all your Billing Accounts by clicking “Manage Billing Accounts” from the drop-down menu.

    +

    Screenshot of an individual Google Cloud Billing Account with the drop-down menu item "Manage Billing Accounts" highlighted.

  6. +
  7. Click on the name of the Billing Account you want to set alerts for.

    +

    Screenshot of Google Cloud Billing Accounts Overview. A Billing Account name is highlighted.

  8. +
  9. In the left-hand menu, click “Budgets & alerts”.

    +

    Screenshot of an individual Google Cloud Billing Account with the left-hand menu item "Budgets & alerts" highlighted.

  10. +
  11. Click the “Create Budget” tab.

    +

    Screenshot of the budgets and alerts page for a Google Cloud Billing Account. The "Create Budget" button highlighted.

  12. +
  13. Enter a name for your budget, and then choose which projects you want to monitor. Then click “Next”.

    +

    Screenshot of the form for setting budget scope for a Google Cloud Billing Account. Three things are highlighted:  1) the box for entering a "Name" for the budget, 2) the dropdown menu labeled "Projects" for selecting which Billing Projects are part of the budget, and 3) the "Next" button.

  14. +
  15. For Budget Type, select “Specified amount”. Enter the total budget amount for the month (you will set alerts at different thresholds in the next step). Click “Next” (do not click “Finish”).

    +

    Screenshot of the form for setting budget amount for a Google Cloud Billing Account.  The drop-down menu labeled "Budget type" is highlighted and "Specified amount" is selected.  Also highlighted are the text box labeled "Target amount" and the "Next" button.

  16. +
  17. Enter the threshold amounts where you want to receive an alert. We recommend starting with 50% and 90%. You can set other alerts if you prefer.

    +

    Screenshot of the form for setting budget actions for a Google Cloud Billing Account.  The boxes for entering "Percent of budget" or "Amount" are highlighted.  The drop-down menu labeled "Trigger on" is highlighted and "Actual" is selected.

  18. +
  19. Check the box for “Email alerts to billing admins and users”, then click “Finish”. Now you (as the owner and admin), along with anyone you added with admin or user privileges (e.g. lab managers) will receive alerts when your lab members reach the specified spending thresholds. These emails will be sent to the Gmail accounts associated with the Billing Account.

    +

    Screenshot of the form for setting budget alerts for a Google Cloud Billing Account.  The checkbox labeled "Email alerts to billing admins and users" is highligheted and checked.  The "Finish" button is highlighted.

  20. +
  21. You can edit your budgets at any time by going to Billing > Budgets & alerts, and clicking on the name of the budget you want to edit.

    +

    Screenshot of the Google Cloud Billing Account Budgets and alerts overview.  Four items are highlighted illustrating how to view and edit an existing budget: 1) The top-left "hamburger" button for extending the drop-down menu, 2) the drop-down menu item "Billing", 3) the submenu item "Budgets & alerts, 4) the name of a budget.

  22. +
+
+
+
+

5.5 View Spend for Google Billing

+
+

You can always check your current spend through the Google Billing console, but remember

+
    +
  • There is a reporting delay (~1 day), so you cannot immediately see what an analysis cost
  • +
  • Costs are reported at the level of Workspaces, so if there are multiple people using a Workspace, you will not be able to determine which of them was responsible for the charges.
  • +
+

The Google Billing console displays information by Billing Account. To view spending:

+
    +
  1. Log in to the Google Cloud Platform console using the Google ID associated with your Google Cloud projects.

  2. +
  3. Open the dropdown menu on the top left and click on Billing.

    +

    Screenshot of the Google Cloud Console drop-down menu, with "Billing" highlighted.

  4. +
  5. You may be automatically directed to view a specific Billing Account. If you see information about a single account (and it’s not the one you’re interested in), you can get back to the list of all your Billing Accounts by clicking “Manage Billing Accounts” from the drop-down menu.

    +

    Screenshot of an individual Google Cloud Billing Account with the drop-down menu item "Manage Billing Accounts" highlighted.

  6. +
  7. Click on the name of the Billing Account for the project you want to view.

    +

    Screenshot of Google Cloud Billing Accounts Overview. A Billing Account name is highlighted.

  8. +
  9. Look at the top of the Overview tab to see your month-to-date spending.

    +

    Screenshot of a Google Cloud Billing Account Overview.

  10. +
  11. Scroll further down the Overview tab to show your top projects.

    +

    Screenshot of a Google Cloud Billing Account top projects.

  12. +
  13. Click on the Reports tab to see more detailed information about each of your projects. This is probably the most useful tab for exploring costs of individual projects over time.

    +

    Screenshot of a Google Cloud Billing Account Reports tab.

  14. +
  15. Click on the Cost table tab to obtain a convenient table of spending per project.

    +

    Screenshot of a Google Cloud Billing Account Cost table tab.

  16. +
+
+
+
+

5.6 Create Terra Billing Project

+
+
    +
  1. Launch Terra and sign in with your Google account. If this is your first time logging in to Terra, you will need to accept the Terms of Service.

  2. +
  3. In the drop-down menu on the left, navigate to “Billing”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Billing”. You can also navigate there directly with this link: https://anvil.terra.bio/#billing

    +

    Screenshot of the Terra drop-down menu.  Three items are highlighted: 1) the "hamburger" button for extending the drop-down menu, 2) the arrow next to your username, for extending the drop-down submenu, and 3) the submenu item "Billing".

  4. +
  5. On the Billing page, click the “+ CREATE” button to create a new Billing Project. If prompted, select the Google account to use. If prompted, give Terra permission to manage Google Cloud Platform billing accounts.

    +

    Screenshot of the Terra Billing Page.  The "plus" button next to "Billing Projects" is highlighted.

  6. +
  7. Enter a unique name for your Terra Billing Project and select the appropriate Google Billing Account. The name of the Terra Billing Project must:

    +
      +
    • Only contain lowercase letters, numbers and hyphens
    • +
    • Start with a lowercase letter
    • +
    • Not end with a hyphen
    • +
    • Be between 6 and 30 characters
    • +
    +

    Screenshot of the Terra Add Billing Project dialog box.

  8. +
  9. Select the Google Billing Account to use. All activities conducted under your new Terra Billing Project will charge to this Google Billing Account. If prompted, give Terra permission to manage Google Cloud Platform billing accounts.

    +

    Screenshot of the Terra Add Billing Project dialog box.  The dropdown menu labeled "Select billing account" is highlighted.

  10. +
  11. Click “CREATE BILLING PROJECT”.

    +

    Screenshot of the Terra Add Billing Project dialog box.  The button labeled "CREATE BILLING PROJECT" is highlighted.

  12. +
  13. Your new Billing Project should now show up in the list of Billing Projects Owned by You. You can add additional members or can modify or deactivate the Billing Project at any time by clicking on its name in this list.

    +

    Screenshot of the Terra Billing Projects menu.  The submenu "Owned by you" is highlighted and has been expanded, showing a list of Billing Projects below.  One of the Billing Project names is highlighted.

  14. +
+

The page doesn’t always update as soon as the Billing Project is created. If it’s been a couple of minutes and you don’t see a change, try refreshing the page.

+
+
+
+

5.7 Add Member to Terra Billing Project

+
+
    +
  1. Launch Terra and sign in with your Google account.

  2. +
  3. In the drop-down menu on the left, navigate to “Billing”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Billing”. You can also navigate there directly with this link: https://anvil.terra.bio/#billing

    +

    Screenshot of the Terra drop-down menu.  Three items are highlighted: 1) the "hamburger" button for extending the drop-down menu, 2) the arrow next to your username, for extending the drop-down submenu, and 3) the submenu item "Billing".

  4. +
  5. Click “Owned by You” and find the Billing Project. If you do not see the Billing Project in this list, then you are not an Owner and do not have permission to add members.

    +

    Screenshot of the Terra Billing Projects menu.  The submenu "Owned by you" is highlighted and has been expanded, showing a list of Billing Projects below.

  6. +
  7. Click on the name of the Billing Project.

    +

    Screenshot of the Terra Billing Projects menu.  The submenu has been expanded, and the name of one of the Billing Projects is highlighted.

  8. +
  9. Click on the “Members” tab to view and manage members. Then click the “Add User” button.

    +

    Screenshot of a Terra Billing Project management page.  The tab labeled "Members" is highlighed and has been selected, and the button labeled "Add User" is highlighted.

  10. +
  11. Enter the email address of the user or group you’d like to add the the Billing Project.

    +
      +
    • If adding an individual, make sure to enter the account that they use to access AnVIL.
    • +
    • If adding a Terra Group, use the Group email address, which can be found on the Terra Group management page.
    • +
    +

    Screenshot of the dialog box for adding users to a Terra Billing Project.  The textbox labeled "User email" is highlighed and has been filled in.

  12. +
  13. If this user or group will need to add and remove other users of the Billing Project, check the Owner box. Otherwise leave it unchecked.

    +
      +
    • It’s often a good idea to have at least one other Owner of a Billing Project in order to avoid getting locked out, in case the original owner leaves or loses access to their account.
    • +
    +

    Screenshot of the dialog box for adding users to a Terra Billing Project.  The checkbox labeled "Can manage users (Owner)" is highlighed.

  14. +
  15. Click “ADD USER”.

    +

    Screenshot of the dialog box for adding users to a Terra Billing Project.  The button labeled "ADD USER" is highlighed.

  16. +
  17. You should now see the user or group listed in the Billing Project members, along with the appropriate role. They should now be able to use the Billing Project to fund work on AnVIL.

    +

    Screenshot of a Terra Billing Project member management page.  A user email and role are highlighted.

  18. +
+

If you need to remove members or modify their roles, you can do so at any time by clicking the teardrop button next to their name.

+

Screenshot of a Terra Billing Project member management page.  The teardrop button for one user is highlighted.

+
+
+
+

5.8 Disable Terra Billing Project

+

By default this module includes a warning to make sure people understand they will lose access to their Workspace buckets. You can remove the warning from this module by setting AnVIL_module_settings$warning to FALSE before running cow::borrow_chapter:

+
AnVIL_module_settings <- list(
+  warning = FALSE
+)
+cow::borrow_chapter(
+  doc_path = "child/_child_terra_billing_project_disable.Rmd",
+  repo_name = "jhudsl/AnVIL_Template"
+)
+
+
+

Disabling a Billing Project makes Workspace contents inaccessible!

+

Disabling a Billing Project disables funding to all Workspaces funded by the Billing Project. You will be unable to compute in these Workspaces, and you will lose access to any data stored in the Workspace buckets. It is sometimes possible to restore access by reactivating billing, but Google makes no promises about whether or how long the data will be recoverable.

+

Make sure everyone with Workspaces funded by the Billing Project has saved anything they want to keep in another location before disabling the Billing Project.

+
+

To disable a Terra Billing Project (i.e. remove the Google Billing Account that funds the Terra Billing Project):

+
    +
  1. Launch Terra and sign in with your Google account.

  2. +
  3. In the drop-down menu on the left, navigate to “Billing”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Billing”. You can also navigate there directly with this link: https://anvil.terra.bio/#billing

    +

    Screenshot of the Terra drop-down menu.  Three items are highlighted: 1) the "hamburger" button for extending the drop-down menu, 2) the arrow next to your username, for extending the drop-down submenu, and 3) the submenu item "Billing".

  4. +
  5. Click “Owned by You” and find the Billing Project. If you do not see the Billing Project in this list, then you are not an Owner and do not have permission to add members.

    +

    Screenshot of the Terra Billing Projects menu.  The submenu "Owned by you" is highlighted and has been expanded, showing a list of Billing Projects below.

  6. +
  7. Click on the name of the Billing Project.

    +

    Screenshot of the Terra Billing Projects menu.  The submenu has been expanded, and the name of one of the Billing Projects is highlighted.

  8. +
  9. If you don’t see information about the Billing Account, click on “View billing account” to expand the Billing Account information. You may be prompted to enter your login information again.

    +

    Screenshot of a Terra Billing Project management page.  The button labeled "view billing account" is highlighted.

  10. +
  11. You should see the name of the Google Billing Account that is funding this Terra Billing Project. Click on the teardrop icon next to the name of the Billing Account.

    +

    Screenshot of a Terra Billing Project management page.  The teardrop button next to the name of the Billing Account is highlighted.

  12. +
  13. Click “Remove Billing Account”.

    +

    Screenshot of a Terra Billing Project management page.  The teardrop button next to the name of the Billing Account is highlighted.

  14. +
  15. Click OK to confirm that you want to disable funding for this Billing Project.

    +

    Screenshot of the dialoge box confirming removal of the Billing Account from a Terra Billing Project.  The button labeled "OK" is highlighted.

  16. +
  17. The page should now indicate that there is no linked billing account.

    +

    Screenshot of a Terra Billing Project management page.  The Billing Account information which says "No linked billing account" is highlighted.

  18. +
+

If necessary, you can restore funding to the Billing Project and associated Workspaces by clicking the teardrop icon and selecting “Change Billing Account”. However, Google makes no promises about how long the Workspace contents will remain available after you disable funding, so it is best not to rely on them.

+

Screenshot of a Terra Billing Project management page.  The teardrop button next to the Billing Account information is highlighted.

+
+ +
+
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..53c65da --- /dev/null +++ b/docs/index.html @@ -0,0 +1,422 @@ + + + + + + + AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+ +
+

About this Book

+

This book is part of a series of books for the Genomic Data Science Analysis, Visualization, and Informatics Lab-space (AnVIL) of the National Human Genome Research Institute (NHGRI). Learn more about AnVIL by visiting https://anvilproject.org or reading the article in Cell Genomics.

+
+

Skills Level

+
+

Genetics +

+

Programming skills +

+
+
+
+

AnVIL Collection

+

Please check out our full collection of AnVIL and related resources: https://hutchdatascience.org/AnVIL_Collection/

+
+
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..b932d88 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,40 @@ +--- +title: "AnVIL CoFests! 2024" +date: "August 07, 2024" +site: bookdown::bookdown_site +documentclass: book +bibliography: book.bib +biblio-style: apalike +link-citations: yes +description: Description about Course/Book. +favicon: assets/AnVIL_style/anvil_favicon.ico +--- + + +# About this Book {-} + +This book is part of a series of books for the Genomic Data Science Analysis, Visualization, and Informatics Lab-space (AnVIL) of the National Human Genome Research Institute (NHGRI). Learn more about AnVIL by visiting https://anvilproject.org or reading the [article in Cell Genomics](https://www.sciencedirect.com/science/article/pii/S2666979X21001063). + +## Skills Level {-} + +::: {.notice} +_Genetics_ + + +_Programming skills_ + +::: + +## AnVIL Collection {-} + +Please check out our full collection of AnVIL and related resources: https://hutchdatascience.org/AnVIL_Collection/ + +# Learning Objectives {-} + + + + + + + + diff --git a/docs/instructor-modules.html b/docs/instructor-modules.html new file mode 100644 index 0000000..d2e6539 --- /dev/null +++ b/docs/instructor-modules.html @@ -0,0 +1,470 @@ + + + + + + + Chapter 11 Instructor modules | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

Chapter 11 Instructor modules

+

Modules aimed at instructors.

+


+
+

11.1 Why AnVIL for Instructors?

+
+

You may be wondering if AnVIL is a good choice for your class. We feel the answer is an unequivocal YES!

+

AnVIL provides all the advantages of a cloud computing environment:

+
    +
  • Version control: All students will be using the exact same versions of programs, running on the exact same operating system, and the majority of setup can be handled for the students ahead of time. This greatly reduces time spent on setup and prevents unexpected run errors during the activities, limiting the amount of troubleshooting you have to do. As a result, classes and activities will run more smoothly and predictably.
  • +
  • Inclusivity: Cloud-computing enables all students to participate in the activity without needing to provide computers with certain specifications.
  • +
  • Experience: Cloud-computing is becoming common in today’s bioinformatics workplaces, and the classroom is a low-stress and low-stakes opportunity for students to gain experience.
  • +
+

AnVIL is purpose-built for genomic data science:

+
    +
  • Tools: Through AnVIL, students can access a wide range of tools (Galaxy, RStudio/Bioconductor, Jupyter, as well as scripted workflows) all in one place, and can easily transition between them.
  • +
  • Datasets: AnVIL provides a large and growing collection of relevant datasets with standardized organization, for easier importing and processing.
  • +
  • Authenticity: On AnVIL, students will be working in the same environment as scientists carrying out cutting edge research.
  • +
+
+
+ +
+

11.3 Checklist Timeline (premade content)

+
+

1+ month before:

+
    +
  • Figure out how you will fund the class/workshop.
  • +
  • Start working through INSTRUCTOR SETUP. +
      +
    • It’s a good idea to get billing figured out with plenty of time to spare.
    • +
    • Take some time to familiarize yourself with the content and make any desired updates or customizations.
    • +
  • +
  • Do any necessary EVENT SETUP steps.
  • +
+

~1 week before:

+
    +
  • Start working through RUNNING THE CLASS.
  • +
  • If possible, have students log in to AnVIL and send you their usernames, so you can add them to the Student Group ahead of time. This saves time on the day of the class.
  • +
  • Do not add students to your Billing Project ahead of time. This prevents them from accruing costs.
  • +
+

Day of (or shortly before):

+
    +
  • Add students to Billing Project.
  • +
  • Have students clone the Workspace (They cannot do this until you have added them to the Billing Project. As soon as they do this, they can start computing.).
  • +
+

After:

+
    +
  • Collect feedback, if you didn’t do it during the class/workshop.
  • +
  • Work though EVENT WRAP-UP - until you shut things down, you will continue to accrue costs.
  • +
+
+
+
+

11.4 Recommendation to use STRIDES

+
+

If you are new to AnVIL, we strongly recommend seeking funding through NHGRI / STRIDES for teaching your course. In order to prevent abuse, Google sets certain limits on cloud resources available to new users that can complicate teaching (e.g. project quotas). As you or your institution builds a payment history with Google, the limits on your accounts will be relaxed. In the meantime, STRIDES funding can help ensure your initial classes run smoothly.

+

What is STRIDES? NHGRI’s strategic vision highlights the importance of training the next generation of genomic scientists. In collaboration with the NIH Office of Data Science Strategy, NHGRI makes funding available to AnVIL users through the STRIDES program, which aims to promote biological research in cloud environments.

+

To inquire about funding your class on AnVIL, please contact .

+
+ +
+
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/introduction.html b/docs/introduction.html new file mode 100644 index 0000000..3b4c793 --- /dev/null +++ b/docs/introduction.html @@ -0,0 +1,416 @@ + + + + + + + Chapter 1 Introduction | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

Chapter 1 Introduction

+
+

1.1 Motivation

+
+
+

1.2 Target Audience

+

The course is intended for …

+
+
+

1.3 Curriculum

+

The course covers…

+ +
+
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/learning-objectives.html b/docs/learning-objectives.html new file mode 100644 index 0000000..2a8471a --- /dev/null +++ b/docs/learning-objectives.html @@ -0,0 +1,413 @@ + + + + + + + Learning Objectives | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

Learning Objectives

+ + + + + + +
+ + + +
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/onboarding.html b/docs/onboarding.html new file mode 100644 index 0000000..8614182 --- /dev/null +++ b/docs/onboarding.html @@ -0,0 +1,412 @@ + + + + + + + Chapter 6 Onboarding | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

Chapter 6 Onboarding

+

Joining a team on AnVIL.

+


+
+

6.1 Create Google Account

+

If you do not already have a Google account that you would like to use for accessing Terra, create one now.

+

If you would like to create a Google account that is associated with your non-Gmail, institutional email address, follow these instructions.

+ +
+
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/references.html b/docs/references.html new file mode 100644 index 0000000..4af5ff7 --- /dev/null +++ b/docs/references.html @@ -0,0 +1,413 @@ + + + + + + + Chapter 12 References | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

Chapter 12 References

+ +
+
+Allaire, JJ, Yihui Xie, Jonathan McPherson, Javier Luraschi, Kevin Ushey, Aron Atkins, Hadley Wickham, Joe Cheng, Winston Chang, and Richard Iannone. 2021. Rmarkdown: Dynamic Documents for r. https://github.com/rstudio/rmarkdown. +
+
+Xie, Yihui, J. J. Allaire, and Garrett Grolemund. 2018. R Markdown: The Definitive Guide. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown. +
+
+
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/search_index.json b/docs/search_index.json index ba7a66d..a10022d 100644 --- a/docs/search_index.json +++ b/docs/search_index.json @@ -1 +1 @@ -[["index.html", "AnVIL Book Name About this Book Skills Level AnVIL Collection", " AnVIL Book Name August 05, 2024 About this Book This book is part of a series of books for the Genomic Data Science Analysis, Visualization, and Informatics Lab-space (AnVIL) of the National Human Genome Research Institute (NHGRI). Learn more about AnVIL by visiting https://anvilproject.org or reading the article in Cell Genomics. Skills Level Genetics Programming skills AnVIL Collection Please check out our full collection of AnVIL and related resources: https://hutchdatascience.org/AnVIL_Collection/ "],["learning-objectives.html", "Learning Objectives", " Learning Objectives "],["introduction.html", "Chapter 1 Introduction 1.1 Motivation 1.2 Target Audience 1.3 Curriculum", " Chapter 1 Introduction 1.1 Motivation 1.2 Target Audience The course is intended for … 1.3 Curriculum The course covers… "],["a-new-chapter.html", "Chapter 2 A new chapter 2.1 Learning Objectives 2.2 Libraries 2.3 Subtopic 2.4 Print out session info", " Chapter 2 A new chapter *If you haven’t yet read the getting started Wiki pages; start there Every chapter needs to start out with this chunk of code: 2.1 Learning Objectives *Every chapter also needs Learning objectives that will look like this: This chapter will cover: {You can use https://tips.uark.edu/using-blooms-taxonomy/ to define some learning objectives here} {Another learning objective} 2.2 Libraries For this chapter, we’ll need the following packages attached: *Remember to add any additional packages you need to your course’s own docker image. library(magrittr) 2.3 Subtopic Here’s a subheading and some text in this subsection! 2.3.1 Code examples You can demonstrate code like this: output_dir <- file.path("resources", "code_output") if (!dir.exists(output_dir)) { dir.create(output_dir) } And make plots too: hist_plot <- hist(iris$Sepal.Length) You can also save these plots to file: png(file.path(output_dir, "test_plot.png")) hist_plot ## $breaks ## [1] 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 ## ## $counts ## [1] 5 27 27 30 31 18 6 6 ## ## $density ## [1] 0.06666667 0.36000000 0.36000000 0.40000000 0.41333333 0.24000000 0.08000000 ## [8] 0.08000000 ## ## $mids ## [1] 4.25 4.75 5.25 5.75 6.25 6.75 7.25 7.75 ## ## $xname ## [1] "iris$Sepal.Length" ## ## $equidist ## [1] TRUE ## ## attr(,"class") ## [1] "histogram" dev.off() ## png ## 2 2.3.2 Image example How to include a Google slide. It’s simplest to use the ottrpal package: But if you have the slide or some other image locally downloaded you can also use html like this: 2.3.3 Video examples To show videos in your course, you can use markdown syntax like this: A video we want to show Alternatively, you can use knitr::include_url() like this: Note that we are using echo=FALSE in the code chunk because we don’t want the code part of this to show up. If you are unfamiliar with how R Markdown code chunks work, read this. OR this works: 2.3.4 Links to files This works: Or this: This works. Or this: 2.3.5 Links to websites Examples of including a website link. This works: OR this: Another link OR this: 2.3.6 Citation examples We can put citations at the end of a sentence like this (Allaire et al. 2021). Or multiple citations Xie, Allaire, and Grolemund (2018). but they need a ; separator (Allaire et al. 2021; Xie, Allaire, and Grolemund 2018). In text, we can put citations like this Allaire et al. (2021). 2.3.7 Callout boxes There are some preset callout boxes available, which can be used like so: notice: Here’s something interesting. warning: Look out! dictionary: Here’s a definition. reflection: Consider this! github: Here’s how you use GitHub. wip: This section is a Work in Progress. 2.3.8 Dropdown summaries You can hide additional information in a dropdown menu Here’s more words that are hidden. 2.4 Print out session info You should print out session info when you have code for reproducibility purposes. devtools::session_info() ## ─ Session info ─────────────────────────────────────────────────────────────── ## setting value ## version R version 4.3.2 (2023-10-31) ## os Ubuntu 22.04.4 LTS ## system x86_64, linux-gnu ## ui X11 ## language (EN) ## collate en_US.UTF-8 ## ctype en_US.UTF-8 ## tz Etc/UTC ## date 2024-08-05 ## pandoc 3.1.1 @ /usr/local/bin/ (via rmarkdown) ## ## ─ Packages ─────────────────────────────────────────────────────────────────── ## package * version date (UTC) lib source ## askpass 1.2.0 2023-09-03 [1] RSPM (R 4.3.0) ## bookdown 0.39.1 2024-06-11 [1] Github (rstudio/bookdown@f244cf1) ## bslib 0.6.1 2023-11-28 [1] RSPM (R 4.3.0) ## cachem 1.0.8 2023-05-01 [1] RSPM (R 4.3.0) ## cli 3.6.2 2023-12-11 [1] RSPM (R 4.3.0) ## curl 5.2.0 2023-12-08 [1] RSPM (R 4.3.0) ## devtools 2.4.5 2022-10-11 [1] RSPM (R 4.3.0) ## digest 0.6.34 2024-01-11 [1] RSPM (R 4.3.0) ## ellipsis 0.3.2 2021-04-29 [1] RSPM (R 4.3.0) ## evaluate 0.23 2023-11-01 [1] RSPM (R 4.3.0) ## fansi 1.0.6 2023-12-08 [1] RSPM (R 4.3.0) ## fastmap 1.1.1 2023-02-24 [1] RSPM (R 4.3.0) ## fs 1.6.3 2023-07-20 [1] RSPM (R 4.3.0) ## glue 1.7.0 2024-01-09 [1] RSPM (R 4.3.0) ## highr 0.10 2022-12-22 [1] RSPM (R 4.3.0) ## hms 1.1.3 2023-03-21 [1] RSPM (R 4.3.0) ## htmltools 0.5.7 2023-11-03 [1] RSPM (R 4.3.0) ## htmlwidgets 1.6.4 2023-12-06 [1] RSPM (R 4.3.0) ## httpuv 1.6.14 2024-01-26 [1] RSPM (R 4.3.0) ## httr 1.4.7 2023-08-15 [1] RSPM (R 4.3.0) ## jquerylib 0.1.4 2021-04-26 [1] RSPM (R 4.3.0) ## jsonlite 1.8.8 2023-12-04 [1] RSPM (R 4.3.0) ## knitr 1.47.3 2024-06-11 [1] Github (yihui/knitr@e1edd34) ## later 1.3.2 2023-12-06 [1] RSPM (R 4.3.0) ## lifecycle 1.0.4 2023-11-07 [1] RSPM (R 4.3.0) ## magrittr * 2.0.3 2022-03-30 [1] RSPM (R 4.3.0) ## memoise 2.0.1 2021-11-26 [1] RSPM (R 4.3.0) ## mime 0.12 2021-09-28 [1] RSPM (R 4.3.0) ## miniUI 0.1.1.1 2018-05-18 [1] RSPM (R 4.3.0) ## openssl 2.1.1 2023-09-25 [1] RSPM (R 4.3.0) ## ottrpal 1.2.1 2024-06-11 [1] Github (jhudsl/ottrpal@828539f) ## pillar 1.9.0 2023-03-22 [1] RSPM (R 4.3.0) ## pkgbuild 1.4.3 2023-12-10 [1] RSPM (R 4.3.0) ## pkgconfig 2.0.3 2019-09-22 [1] RSPM (R 4.3.0) ## pkgload 1.3.4 2024-01-16 [1] RSPM (R 4.3.0) ## png 0.1-8 2022-11-29 [1] CRAN (R 4.3.2) ## profvis 0.3.8 2023-05-02 [1] RSPM (R 4.3.0) ## promises 1.2.1 2023-08-10 [1] RSPM (R 4.3.0) ## purrr 1.0.2 2023-08-10 [1] RSPM (R 4.3.0) ## R6 2.5.1 2021-08-19 [1] RSPM (R 4.3.0) ## Rcpp 1.0.12 2024-01-09 [1] RSPM (R 4.3.0) ## readr 2.1.5 2024-01-10 [1] RSPM (R 4.3.0) ## remotes 2.4.2.1 2023-07-18 [1] RSPM (R 4.3.0) ## rlang 1.1.4 2024-06-04 [1] CRAN (R 4.3.2) ## rmarkdown 2.27.1 2024-06-11 [1] Github (rstudio/rmarkdown@e1c93a9) ## sass 0.4.8 2023-12-06 [1] RSPM (R 4.3.0) ## sessioninfo 1.2.2 2021-12-06 [1] RSPM (R 4.3.0) ## shiny 1.8.0 2023-11-17 [1] RSPM (R 4.3.0) ## stringi 1.8.3 2023-12-11 [1] RSPM (R 4.3.0) ## stringr 1.5.1 2023-11-14 [1] RSPM (R 4.3.0) ## tibble 3.2.1 2023-03-20 [1] CRAN (R 4.3.2) ## tzdb 0.4.0 2023-05-12 [1] RSPM (R 4.3.0) ## urlchecker 1.0.1 2021-11-30 [1] RSPM (R 4.3.0) ## usethis 2.2.3 2024-02-19 [1] RSPM (R 4.3.0) ## utf8 1.2.4 2023-10-22 [1] RSPM (R 4.3.0) ## vctrs 0.6.5 2023-12-01 [1] RSPM (R 4.3.0) ## xfun 0.44.4 2024-06-11 [1] Github (yihui/xfun@9da62cc) ## xml2 1.3.6 2023-12-04 [1] RSPM (R 4.3.0) ## xtable 1.8-4 2019-04-21 [1] RSPM (R 4.3.0) ## yaml 2.3.8 2023-12-11 [1] RSPM (R 4.3.0) ## ## [1] /usr/local/lib/R/site-library ## [2] /usr/local/lib/R/library ## ## ────────────────────────────────────────────────────────────────────────────── References "],["anvil-module-library.html", "Chapter 3 AnVIL Module Library 3.1 Include using cow::borrow_chapter() 3.2 Background Highlighting for Borrowed Chapters", " Chapter 3 AnVIL Module Library There are several pieces of content that are useful across multiple books, such as “How to Create a Workspace”. To reduce maintenance burden, the AnVIL_Template repository has a collection of _child R Markdown documents that can be included in your books. You can see all the available AnVIL modules in the AnVIL_Template book 3.1 Include using cow::borrow_chapter() To add a module to your book, include a code chunk with the cow::borrow_chapter() function, specifying the file for the module you want to borrow and the repository you want to borrow it from (the AnVIL_Template repository). See the OTTR_Template wiki page for the most recent instructions and additional details. Here is an example of including the _child_workspace_create.Rmd with cow::borrow_chapter() Launch Terra In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the plus icon near the top of left of the page. Name your Workspace and select the appropriate Billing Project. All activity in the Workspace will be charged to this Billing Project (regardless of who conducted it). If you are working with protected data, you can set the Authorization Domain to limit who can be added to your Workspace. Note that the Authorization Domain cannot be changed after the Workspace is created (i.e. there is no way to make this Workspace shareable with a larger audience in the future). Workspaces by default are only visible to people you specifically share them with. Authorization domains add an extra layer of enforcement over privacy, but by nature make sharing more complicated. We recommend using Authorization Domains in cases where it is extremely important and/or legally required that the data be kept private (e.g. protected patient data, industry data). For data you would merely prefer not be shared with the world, we recommend relying on standard Workspace sharing permissions rather than Authorization Domains, as Authorization Domains can make future collaborations, publications, or other sharing complicated. Click “CREATE WORKSPACE”. The new Workspace should now show up under your Workspaces. 3.2 Background Highlighting for Borrowed Chapters You can use the borrowed_chunk custom div block to highlight borrowed content or any other content you choose. Basic format: :::: {.borrowed_chunk} Code/Content here :::: Rendered with highlighting: If you do not already have a Google account that you would like to use for accessing Terra, create one now. If you would like to create a Google account that is associated with your non-Gmail, institutional email address, follow these instructions. Rendered without highlighting: If you do not already have a Google account that you would like to use for accessing Terra, create one now. If you would like to create a Google account that is associated with your non-Gmail, institutional email address, follow these instructions. "],["workspaces.html", "Chapter 4 Workspaces 4.1 Clone a Workspace 4.2 Create a Workspace 4.3 Open a Workspace 4.4 Share a Workspace", " Chapter 4 Workspaces Modules about Terra Workspaces 4.1 Clone a Workspace Launch Terra Locate the Workspace you want to clone. If a Workspace has been shared with you ahead of time, it will appear in “MY WORKSPACES”. You can clone a Workspace that was shared with you to perform your own analyses. In the screenshot below, no Workspaces have been shared. If a Workspace hasn’t been shared with you, navigate to the “FEATURED” or “PUBLIC” Workspace tabs. Use the search box to find the Workspace you want to clone. Click the teardrop button on the far right next to the Workspace you want to clone. Click “Clone”. You can also clone the Workspace from the Workspace Dashboard instead of the search results. You will see a popup box appear. Name your Workspace and select the appropriate Terra Billing Project. All activity in the Workspace will be charged to this Billing Project (regardless of who conducted it). Remember that each Workspace should have its own Billing Project. If you are working with protected data, you can set the Authorization Domain to limit who can be added to your Workspace. Note that the Authorization Domain cannot be changed after the Workspace is created (i.e. there is no way to make this Workspace shareable with a larger audience in the future). Workspaces by default are only visible to people you specifically share them with. Authorization domains add an extra layer of enforcement over privacy, but by nature make sharing more complicated. We recommend using Authorization Domains in cases where it is extremely important and/or legally required that the data be kept private (e.g. protected patient data, industry data). For data you would merely prefer not be shared with the world, we recommend relying on standard Workspace sharing permissions rather than Authorization Domains, as Authorization Domains can make future collaborations, publications, or other sharing complicated. Click “CLONE WORKSPACE”. The new Workspace should now show up under your Workspaces. 4.2 Create a Workspace Launch Terra In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the plus icon near the top of left of the page. Name your Workspace and select the appropriate Billing Project. All activity in the Workspace will be charged to this Billing Project (regardless of who conducted it). If you are working with protected data, you can set the Authorization Domain to limit who can be added to your Workspace. Note that the Authorization Domain cannot be changed after the Workspace is created (i.e. there is no way to make this Workspace shareable with a larger audience in the future). Workspaces by default are only visible to people you specifically share them with. Authorization domains add an extra layer of enforcement over privacy, but by nature make sharing more complicated. We recommend using Authorization Domains in cases where it is extremely important and/or legally required that the data be kept private (e.g. protected patient data, industry data). For data you would merely prefer not be shared with the world, we recommend relying on standard Workspace sharing permissions rather than Authorization Domains, as Authorization Domains can make future collaborations, publications, or other sharing complicated. Click “CREATE WORKSPACE”. The new Workspace should now show up under your Workspaces. 4.3 Open a Workspace Launch Terra In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. You are automatically directed to the “My Workspaces” tab. Here you can see any Workspaces that have been shared with you, along with your permission level. Reader means you can open the Workspace and see everything, but can’t do any computations or make any edits. Writer means you can run computations, which will charge costs to the Workspace’s Billing Project. Writers can also make edits to the Workspace. Owner is similar to Writer, but also allows you to control who can access the Workspace. Click on the name of a Workspace to open it. Opening and viewing a Workspace does not cost anything. When you open a Workspace, you are directed to the Workspace Dashboard. This generally has a description of the Workspace contents, as well as some useful details about the Workspace itself. From here you can navigate through the different tabs of the Workspace, and if you have sufficient permission, you can start running analyses. If you are only a Reader, you may need to “clone” (make your own copy) of the Workspace before you can start working. 4.4 Share a Workspace Launch Terra In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the name of the Workspace to open the Workspace. Opening a Workspace does not cost anything. Certain activities in the Workspace (such as running an analysis) will charge to the Workspace’s Billing Project. Workspace management (e.g. adding and removing members, editing the description) does not cost money. Click the teardrop button () on the right hand side to open the Workspace management menu. Click “Share” Enter the email address of the user or Group you’d like to share the Workspace with. If adding an individual, make sure to enter the account that they use to access AnVIL. If adding a Terra Group, use the Group email address, which can be found on the Terra Group management page. Choose their permission level. Remember that all activity in the Workspace will be charged to the Workspace’s Billing Project, regardless of who conducts it, so only add members as “Writers” or “Owners” if they should be charging to the Workspace’s Billing Project. “Readers” can view all parts of the Workspace but cannot make edits or run analyses (i.e. they cannot spend money). They can also clone their own copy of the Workspace where they can conduct activity on their own Billing Project. Click “Save”. The user should now be able to see the Workspace when logged in to Terra. "],["billing.html", "Chapter 5 Billing 5.1 Create Google Billing Account 5.2 Add Terra to Google Billing Account 5.3 Add Members to Google Billing Account 5.4 Set Alerts for Google Billing 5.5 View Spend for Google Billing 5.6 Create Terra Billing Project 5.7 Add Member to Terra Billing Project 5.8 Disable Terra Billing Project", " Chapter 5 Billing Modules about billing and Billing Projects on Google Cloud Platform and Terra. 5.1 Create Google Billing Account Log in to the Google Cloud Platform console using your Google ID. Make sure to use the same Google account ID you use to log into Terra. If you are a first time user, don’t forget to claim your free credits! If you haven’t been to the console before, once you accept the Terms of Service you will be greeted with an invitation to “Try for Free.” Follow the instructions to sign up for a Billing Account and get your credits. Choose “Individual Account”. This “billing account” is just for managing billing, so you don’t need to be able to add your team members. You will need to give either a credit card or bank account for security. Don’t worry! You won’t be billed until you explicitly turn on automatic billing. You can view and edit your new Billing Account, by selecting “Billing” from the left-hand menu, or going directly to the billing console console.cloud.google.com/billing Clicking on the Billing Account name will allow you to manage the account, including accessing reports, setting alerts, and managing payments and billing. At any point, you can create additional Billing Accounts using the Create Account button. We generally recommend creating a new Billing Account for each funding source. 5.2 Add Terra to Google Billing Account This gives Terra permission to create projects and send charges to the Google Billing Account, and must be done by an administrator of the Google Billing Account. Terra needs to be added as a “Billing Account User”: Log in to the Google Cloud Platform console using your Google ID. Navigate to Billing You may be automatically directed to view a specific Billing Account. If you see information about a single account rather than a list of your Billing Accounts, you can get back to the list by clicking “Manage Billing Accounts” from the drop-down menu. Check the box next to the Billing Account you wish to add Terra to, click “ADD MEMBER”. Enter terra-billing@terra.bio in the text box. In the drop-down menu, mouse over Billing, then choose “Billing Account User”. Click “SAVE”. 5.3 Add Members to Google Billing Account Anyone you wish to add to the Billing Account will need their own Google ID. To add a member to a Billing Project: Log in to the Google Cloud Platform console using your Google ID. Navigate to Billing You may be automatically directed to view a specific Billing Account. If you see information about a single account rather than a list of your Billing Accounts, you can get back to the list by clicking “Manage Billing Accounts” from the drop-down menu. Check the box next to the Billing Account you wish to add a member to, click “ADD MEMBER”. Enter their Google ID in the text box. In the drop-down menu, mouse over Billing, then choose the appropriate role. Click “SAVE”. 5.4 Set Alerts for Google Billing Log in to the Google Cloud Platform console using the Google ID associated with your Google Cloud projects. Open the dropdown menu on the top left and click on Billing. You may be automatically directed to view a specific Billing Account. If you see information about a single account (and it’s not the one you’re interested in), you can get back to the list of all your Billing Accounts by clicking “Manage Billing Accounts” from the drop-down menu. Click on the name of the Billing Account you want to set alerts for. In the left-hand menu, click “Budgets & alerts”. Click the “Create Budget” tab. Enter a name for your budget, and then choose which projects you want to monitor. Then click “Next”. For Budget Type, select “Specified amount”. Enter the total budget amount for the month (you will set alerts at different thresholds in the next step). Click “Next” (do not click “Finish”). Enter the threshold amounts where you want to receive an alert. We recommend starting with 50% and 90%. You can set other alerts if you prefer. Check the box for “Email alerts to billing admins and users”, then click “Finish”. Now you (as the owner and admin), along with anyone you added with admin or user privileges (e.g. lab managers) will receive alerts when your lab members reach the specified spending thresholds. These emails will be sent to the Gmail accounts associated with the Billing Account. You can edit your budgets at any time by going to Billing > Budgets & alerts, and clicking on the name of the budget you want to edit. 5.5 View Spend for Google Billing You can always check your current spend through the Google Billing console, but remember There is a reporting delay (~1 day), so you cannot immediately see what an analysis cost Costs are reported at the level of Workspaces, so if there are multiple people using a Workspace, you will not be able to determine which of them was responsible for the charges. The Google Billing console displays information by Billing Account. To view spending: Log in to the Google Cloud Platform console using the Google ID associated with your Google Cloud projects. Open the dropdown menu on the top left and click on Billing. You may be automatically directed to view a specific Billing Account. If you see information about a single account (and it’s not the one you’re interested in), you can get back to the list of all your Billing Accounts by clicking “Manage Billing Accounts” from the drop-down menu. Click on the name of the Billing Account for the project you want to view. Look at the top of the Overview tab to see your month-to-date spending. Scroll further down the Overview tab to show your top projects. Click on the Reports tab to see more detailed information about each of your projects. This is probably the most useful tab for exploring costs of individual projects over time. Click on the Cost table tab to obtain a convenient table of spending per project. 5.6 Create Terra Billing Project Launch Terra and sign in with your Google account. If this is your first time logging in to Terra, you will need to accept the Terms of Service. In the drop-down menu on the left, navigate to “Billing”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Billing”. You can also navigate there directly with this link: https://anvil.terra.bio/#billing On the Billing page, click the “+ CREATE” button to create a new Billing Project. If prompted, select the Google account to use. If prompted, give Terra permission to manage Google Cloud Platform billing accounts. Enter a unique name for your Terra Billing Project and select the appropriate Google Billing Account. The name of the Terra Billing Project must: Only contain lowercase letters, numbers and hyphens Start with a lowercase letter Not end with a hyphen Be between 6 and 30 characters Select the Google Billing Account to use. All activities conducted under your new Terra Billing Project will charge to this Google Billing Account. If prompted, give Terra permission to manage Google Cloud Platform billing accounts. Click “CREATE BILLING PROJECT”. Your new Billing Project should now show up in the list of Billing Projects Owned by You. You can add additional members or can modify or deactivate the Billing Project at any time by clicking on its name in this list. The page doesn’t always update as soon as the Billing Project is created. If it’s been a couple of minutes and you don’t see a change, try refreshing the page. 5.7 Add Member to Terra Billing Project Launch Terra and sign in with your Google account. In the drop-down menu on the left, navigate to “Billing”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Billing”. You can also navigate there directly with this link: https://anvil.terra.bio/#billing Click “Owned by You” and find the Billing Project. If you do not see the Billing Project in this list, then you are not an Owner and do not have permission to add members. Click on the name of the Billing Project. Click on the “Members” tab to view and manage members. Then click the “Add User” button. Enter the email address of the user or group you’d like to add the the Billing Project. If adding an individual, make sure to enter the account that they use to access AnVIL. If adding a Terra Group, use the Group email address, which can be found on the Terra Group management page. If this user or group will need to add and remove other users of the Billing Project, check the Owner box. Otherwise leave it unchecked. It’s often a good idea to have at least one other Owner of a Billing Project in order to avoid getting locked out, in case the original owner leaves or loses access to their account. Click “ADD USER”. You should now see the user or group listed in the Billing Project members, along with the appropriate role. They should now be able to use the Billing Project to fund work on AnVIL. If you need to remove members or modify their roles, you can do so at any time by clicking the teardrop button next to their name. 5.8 Disable Terra Billing Project By default this module includes a warning to make sure people understand they will lose access to their Workspace buckets. You can remove the warning from this module by setting AnVIL_module_settings$warning to FALSE before running cow::borrow_chapter: AnVIL_module_settings <- list( warning = FALSE ) cow::borrow_chapter( doc_path = "child/_child_terra_billing_project_disable.Rmd", repo_name = "jhudsl/AnVIL_Template" ) Disabling a Billing Project makes Workspace contents inaccessible! Disabling a Billing Project disables funding to all Workspaces funded by the Billing Project. You will be unable to compute in these Workspaces, and you will lose access to any data stored in the Workspace buckets. It is sometimes possible to restore access by reactivating billing, but Google makes no promises about whether or how long the data will be recoverable. Make sure everyone with Workspaces funded by the Billing Project has saved anything they want to keep in another location before disabling the Billing Project. To disable a Terra Billing Project (i.e. remove the Google Billing Account that funds the Terra Billing Project): Launch Terra and sign in with your Google account. In the drop-down menu on the left, navigate to “Billing”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Billing”. You can also navigate there directly with this link: https://anvil.terra.bio/#billing Click “Owned by You” and find the Billing Project. If you do not see the Billing Project in this list, then you are not an Owner and do not have permission to add members. Click on the name of the Billing Project. If you don’t see information about the Billing Account, click on “View billing account” to expand the Billing Account information. You may be prompted to enter your login information again. You should see the name of the Google Billing Account that is funding this Terra Billing Project. Click on the teardrop icon next to the name of the Billing Account. Click “Remove Billing Account”. Click OK to confirm that you want to disable funding for this Billing Project. The page should now indicate that there is no linked billing account. If necessary, you can restore funding to the Billing Project and associated Workspaces by clicking the teardrop icon and selecting “Change Billing Account”. However, Google makes no promises about how long the Workspace contents will remain available after you disable funding, so it is best not to rely on them. "],["onboarding.html", "Chapter 6 Onboarding 6.1 Create Google Account", " Chapter 6 Onboarding Joining a team on AnVIL. 6.1 Create Google Account If you do not already have a Google account that you would like to use for accessing Terra, create one now. If you would like to create a Google account that is associated with your non-Gmail, institutional email address, follow these instructions. "],["using-programming-platforms-on-anvil.html", "Chapter 7 Using programming platforms on AnVIL 7.1 Video overview on using Jupyter Notebooks 7.2 Launching Jupyter 7.3 Video overview on using Galaxy 7.4 Starting Galaxy 7.5 Navigating Galaxy 7.6 Deleting Galaxy 7.7 Video overview on using RStudio 7.8 Launching RStudio 7.9 Touring RStudio 7.10 Pausing RStudio 7.11 Deleting RStudio", " Chapter 7 Using programming platforms on AnVIL Modules about opening, touring, and closing AnVIL platforms 7.1 Video overview on using Jupyter Notebooks Here is a video tutorial that describes the basics of using Jupyter Notebook on AnVIL. 7.1.1 Objectives Start compute for your Jupyter environment Create notebook to perform analysis Stop compute to minimize expenses 7.1.2 Slides The slides for this tutorial are are located here. 7.2 Launching Jupyter AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select a cloud computing environment appropriate to your needs to avoid runaway costs. If you are uncertain, start with the default settings; it is fairly easy to increase your compute resources later, if needed, but harder to scale down. Note that, in order to use Jupyter, you must have access to a Terra Workspace with permission to compute (i.e. you must be a “Writer” or “Owner” of the Workspace). Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>. Click on the cloud icon on the far right to access your Cloud Environment options. In the dialogue box, click the “Settings” button under Jupyter. You will see some configuration options for the Jupyter cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. Configure any settings you need for your cloud environment. If you are uncertain about what you need, the default configuration is a reasonable, cost-conservative choice. It is fairly easy to increase your compute resources later, if needed, but harder to scale down. Scroll down and click the “CREATE” button when you are satisfied with your setup. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the Jupyter icon. It will take a few minutes for Terra to request computers and install software. When your environment is ready, its status will change to “Running”. Click on the “ANALYSES” tab to create or open a Jupyter Notebook. From the ANALYSES tab, you can click on the name of an existing Jupyter Notebook to view and launch it, or click the “START” button to create a new Notebook. Clicking on a Notebook name will open a static preview of the Notebook. To edit and run the Notebook, click the “OPEN” button. 7.3 Video overview on using Galaxy Here is a video tutorial that describes the basics of using Galaxy on AnVIL. 7.3.1 Objectives Start compute for your Galaxy on AnVIL Run tool to quality control sequencing reads Stop compute to minimize expenses 7.3.2 Slides The slides for this tutorial are are located here. 7.4 Starting Galaxy Note that, in order to use Galaxy, you must have access to a Terra Workspace with permission to compute (i.e. you must be a “Writer” or “Owner” of the Workspace). Open your Workspace, and click on the “NOTEBOOKS” tab. Next, click on “Create a Cloud Environment for Galaxy”. You should see a popup window on the right side of the screen. Click on “NEXT” and “CREATE” to keep all settings as-is. This will take 8-10 minutes. When it is done, click “LAUNCH GALAXY”. 7.5 Navigating Galaxy Notice the three main sections. Tools - These are all of the bioinformatics tool packages available for you to use. The Main Dashboard - This contains flash messages and posts when you first open Galaxy, but when we are using data this is the main interface area. History - When you start a project you will be able to see all of the documents in the project in the history. Now be aware, this can become very busy. Also the naming that Galaxy uses is not very intuitive, so you must make sure that you label your files with something that makes sense to you. On the welcome page, there are links to tutorials. You may try these out on your own. If you want to try a new analysis this is a good place to start. 7.6 Deleting Galaxy Once you are done with your activity, you’ll need to shut down your Galaxy cloud environment. This frees up the cloud resources for others and minimizes computing cost. The following steps will delete your work, so make sure you are completely finished at this point. Otherwise, you will have to repeat your work from the previous steps. Return to AnVIL, and find the Galaxy logo that shows your cloud environment is running. Click on this logo: Next, click on “DELETE ENVIRONMENT OPTIONS”: Finally, select “Delete everything, including persistent disk”. Make sure you are done with the activity and then click “DELETE”. 7.7 Video overview on using RStudio Here is a video tutorial that describes the basics of using RStudio on AnVIL. 7.7.1 Objectives Start compute for your RStudio environment Tour RStudio on AnVIL Stop compute to minimize expenses 7.7.2 Slides The slides for this tutorial are are located here. 7.8 Launching RStudio AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select a cloud computing environment appropriate to your needs to avoid runaway costs. If you are uncertain, start with the default settings; it is fairly easy to increase your compute resources later, if needed, but harder to scale down. Note that, in order to use RStudio, you must have access to a Terra Workspace with permission to compute (i.e. you must be a “Writer” or “Owner” of the Workspace). Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>. Click on the cloud icon on the far right to access your Cloud Environment options. In the dialogue box, click the “Settings” button under RStudio. You will see some details about the default RStudio cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. If you are uncertain about what you need, the default configuration is a reasonable, cost-conservative choice. It is fairly easy to increase your compute resources later, if needed, but harder to scale down. Click the “Create” button. Otherwise, click “CUSTOMIZE” to modify the environment for your needs. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the RStudio logo. It will take a few minutes for Terra to request computers and install software. When your environment is ready, its status will change to “Running”. Click on the RStudio logo to open a new dialogue box that will let you launch RStudio. Click the launch icon to open RStudio. This is also where you can pause, modify, or delete your environment when needed. You should now see the RStudio interface with information about the version printed to the console. 7.9 Touring RStudio Next, we will be using RStudio and the package Glimma to create interactive plots. See this vignette for more information. The Bioconductor team has created a very useful package to programmatically interact with Terra and Google Cloud. Install the AnVIL package. It will make some steps easier as we go along. You can now quickly install precompiled binaries using the AnVIL package’s install() function. We will use it to install the Glimma package and the airway package. The airway package contains a SummarizedExperiment data class. This data describes an RNA-Seq experiment on four human airway smooth muscle cell lines treated with dexamethasone. {Note: for some of the packages, you will have to install packaged from the CRAN repository, using the install.packages() function. The examples will show you which install method to use.} <img src="07-using_platforms_modules_files/figure-html//1BLTCaogA04bbeSD1tR1Wt-mVceQA6FHXa8FmFzIARrg_g11f12bc99af_0_56.png" alt="Screenshot of the RStudio environment interface. Code has been typed in the console and is highlighted." width="100%" /> Load the example data. The multidimensional scaling (MDS) plot is frequently used to explore differences in samples. When this data is MDS transformed, the first two dimensions explain the greatest variance between samples, and the amount of variance decreases monotonically with increasing dimension. The following code will launch a new window where you can interact with the MDS plot. Change the colour_by setting to “groups” so you can easily distinguish between groups. In this data, the “group” is the treatment. You can download the interactive html file by clicking on “Save As”. You can also download plots and other files created directly in RStudio. To download the following plot, click on “Export” and save in your preferred format to the default directory. This saves the file in your cloud environment. You should see the plot in the “Files” pane. Select this file and click “More” > “Export” Select “Download” to save the file to your local machine. 7.10 Pausing RStudio The right-hand side icon reminds you that you are accruing cloud computing costs. If you don’t see this icon, you may need to scroll to the right. You should minimize charges when you are not performing an analysis. You can do this by clicking on the RStudio icon and selecting “Pause”. This will release the CPU and memory resources for other people to use. Note that your work will be saved in the environment and continue to accrue a very small cost. This work will be lost if the cloud environment gets deleted. If there is anything you would like to save permanently, it’s a good idea to copy it from your compute environment to another location, such as the Workspace bucket, GitHub, or your local machine, depending on your needs. You can also pause your cloud environment(s) at https://anvil.terra.bio/#clusters. 7.11 Deleting RStudio Pausing your cloud environment only temporarily stops your work. When you are ready to delete the cloud environment, click on the RStudio icon on the right-hand side and select “Settings”. If you don’t see this icon, you may need to scroll to the right. Click on “Delete Environment”. If you are certain that you do not need the data and configuration on your disk, you should select “Delete everything, including persistent disk”. If there is anything you would like to save, open the compute environment and copy the file(s) from your compute environment to another location, such as the Workspace bucket, GitHub, or your local machine, depending on your needs. Select “DELETE”. You can also delete your cloud environment(s) and disk storage at https://anvil.terra.bio/#clusters. "],["student-instructions.html", "Chapter 8 Student instructions 8.1 Student Account Setup 8.2 Student instructions for cloning a Workspace 8.3 Student instructions for launching Jupyter 8.4 Student instructions for launching RStudio", " Chapter 8 Student instructions Modules aimed at students in a course or workshop. 8.1 Student Account Setup In order to run your analyses, you will use the AnVIL cloud computing platform, so that you do not need to install everything on your own computer. The AnVIL (Analysis Visualization and Informatics Lab-space) platform is specially designed for analyzing biological data, and is used by scientists doing all sorts of biological research. AnVIL in a nutshell Behind the scenes, AnVIL relies on Google Cloud Platform to provide computing infrastructure. Basically, AnVIL lets you “rent” computers from Google (remotely). Whenever you run an analyses on AnVIL, it actually runs on one of Google’s computers, and AnVIL lets you see the results in your browser. AnVIL uses Terra to provide many computational tools useful for biological data analysis, such as RStudio, Galaxy, and Jupyter Notebooks. Terra takes care of installing these tools on Google’s computers, so that you can just start using them. 8.1.1 Create Google Account First, you will need to set up a (free) Google account. If you do not already have a Google account that you would like to use for accessing AnVIL, create one now. Alternatively, if you would like to create a Google account that is associated with an existing non-Gmail email address, you can follow these instructions. 8.1.2 Log In to Terra Next, make sure you can log in to Terra – you will use Terra to perform computations on AnVIL. You can access Terra by going to anvil.terra.bio, or by clicking the link on the AnVIL home page. Open Terra, and you should be prompted to sign in with your Google account. 8.1.3 Share Username Finally, make sure your instructor has your Google account username (e.g. myname@gmail.com), so they can give you access to everything you need. Make sure there are no typos! If you have multiple Google accounts, make sure you give them the username that you will be using to access AnVIL It is very important that you share the Google account you will be using to access AnVIL with with your instructor! Otherwise, the instructor cannot add you to Billing Projects or Workspaces, and you will be unable to proceed with your assignments. 8.2 Student instructions for cloning a Workspace These instructions can be customized to a specific workspace by setting certain variables before running cow::borrow_chapter(). If these variables have not been set, reasonable defaults are provided (e.g. “ask your instructor”). 8.2.1 With no variables set: This will not work until your instructor has given you permission to spend money to “rent” the computers that will power your analyses (by adding you to a “Billing Project”). On AnVIL, you access files and computers through Workspaces. Each Workspace functions almost like a mini code laboratory - it is a place where data can be examined, stored, and analyzed. The first thing we want to do is to copy or “clone” a Workspace to create a space for you to experiment. This will give you access to the files you will need (data, code) the computing environment you will use Tip At this point, it might make things easier to open up a new window in your browser and split your screen. That way, you can follow along with this guide on one side and execute the steps on the other. To clone an AnVIL Workspace: Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. You are automatically directed to the “MY WORKSPACES” tab. Here you can see any Workspaces that have been shared with you, along with your permission level. Depending on how your instructor has set things up, you may or may not see any Workspaces in this tab. Locate the Workspace specified by your instructor. (The images below show the SARS-CoV-2-Genome Workspace as an example, but you should look for the Workspace specified by your instructor.) If it has been shared with you ahead of time, it will appear in “MY WORKSPACES”. Otherwise, select the “PUBLIC” tab. In the top search bar, type the Workspace name specified by your instructor. You can also go directly to the Workspace by clicking this link: ask your instructor. Clone the workspace by clicking the teardrop button (). Select “Clone”. Or, if you have opened the Workspace, you can find the teardrop button on the top right of the Workspace. You will see a popup box appear, asking you to configure your Workspace Give your Workspace clone a name by adding an underscore (“_“) and your name. For example, \"ExampleWorkspace_Firstname_Lastname\". Select the Billing Project provided by your instructor. Leave the bottom two boxes as-is. Click “CLONE WORKSPACE”. The new Workspace should now show up under “MY WORKSPACES”. You now have your own copy of the Workspace to work in. 8.2.2 With variables set: This will not work until your instructor has given you permission to spend money to “rent” the computers that will power your analyses (by adding you to a “Billing Project”). On AnVIL, you access files and computers through Workspaces. Each Workspace functions almost like a mini code laboratory - it is a place where data can be examined, stored, and analyzed. The first thing we want to do is to copy or “clone” a Workspace to create a space for you to experiment. This will give you access to the files you will need (data, code) the computing environment you will use Tip At this point, it might make things easier to open up a new window in your browser and split your screen. That way, you can follow along with this guide on one side and execute the steps on the other. To clone an AnVIL Workspace: Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. You are automatically directed to the “MY WORKSPACES” tab. Here you can see any Workspaces that have been shared with you, along with your permission level. Depending on how your instructor has set things up, you may or may not see any Workspaces in this tab. Locate the Workspace Example_Workspace. (The images below show the SARS-CoV-2-Genome Workspace as an example, but you should look for the Workspace Example_Workspace.) If it has been shared with you ahead of time, it will appear in “MY WORKSPACES”. Otherwise, select the “PUBLIC” tab. In the top search bar, type the Workspace name Example_Workspace. You can also go directly to the Workspace by clicking this link: http://example.com/. Clone the workspace by clicking the teardrop button (). Select “Clone”. Or, if you have opened the Workspace, you can find the teardrop button on the top right of the Workspace. You will see a popup box appear, asking you to configure your Workspace Give your Workspace clone a name by adding an underscore (“_“) and your name. For example, \"Example_Workspace_Firstname_Lastname\". Select the Billing Project Example Billing Project. Leave the bottom two boxes as-is. Click “CLONE WORKSPACE”. The new Workspace should now show up under “MY WORKSPACES”. You now have your own copy of the Workspace to work in. 8.3 Student instructions for launching Jupyter The module below is specially customized for students, allowing you to give more specific instructions on the settings for their Jupyter environment. There are several other general purpose modules that may also be useful for students (e.g. Pausing Jupyter, Deleting Jupyter) that can be found in other chapters of this book. The following instructions can be customized by setting certain variables before running cow::borrow_chapter(). Developers should create these variables as a list AnVIL_module_settings. The following variables can be provided: audience = Defaults to general, telling them to use the default Jupyter settings. If audience is set to student, it gives more specific instructions. docker_image = Optional, it will tell them how to set the image. startup_script = Optional, it will tell them how to set the script. 8.3.1 Using default Jupyter environment: AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select the cloud computing environment described here to avoid runaway costs. Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>. Click on the cloud icon on the far right to access your Cloud Environment options. In the dialogue box, click the “Settings” button under Jupyter. You will see some configuration options for the Jupyter cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. Leave everything else as-is. To create your Jupyter Cloud Environment, scroll down and click the “CREATE” button. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the Jupyter icon. It will take a few minutes for Terra to request computers and install software. When your environment is ready, its status will change to “Running”. Click on the “ANALYSES” tab to create or open a Jupyter Notebook. From the ANALYSES tab, you can click on the name of an existing Jupyter Notebook to view and launch it, or click the “START” button to create a new Notebook. 8.3.2 Using custom Jupyter environment: AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select the cloud computing environment described here to avoid runaway costs. Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>. Click on the cloud icon on the far right to access your Cloud Environment options. In the dialogue box, click the “Settings” button under Jupyter. You will see some configuration options for the Jupyter cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. Under “Application configuration” you will see a dropdown menu. Choose “Custom Environment”. Then copy the following link into “Container image” textbox: example docker Under “Startup script” you will see textbox. Copy the following link into the box: example startup script Leave everything else as-is. To create your Jupyter Cloud Environment, scroll down and click the “CREATE” button. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the Jupyter icon. It will take a few minutes for Terra to request computers and install software. When your environment is ready, its status will change to “Running”. Click on the “ANALYSES” tab to create or open a Jupyter Notebook. From the ANALYSES tab, you can click on the name of an existing Jupyter Notebook to view and launch it, or click the “START” button to create a new Notebook. 8.4 Student instructions for launching RStudio The module below is specially customized for students, allowing you to give more specific instructions on the settings for their RStudio environment. There are several other general purpose modules that may also be useful for students (e.g. Pausing RStudio, Deleting RStudio) that can be found in other chapters of this book. The following instructions can be customized by setting certain variables before running cow::borrow_chapter(). Developers should create these variables as a list AnVIL_module_settings. The following variables can be provided: audience = Defaults to general, telling them to use the default RStudio settings. If audience is set to student, it gives more specific instructions. docker_image = Optional, it will tell them to open the customization dialogue and direct them on how to set the image. startup_script = Optional, it will tell them to open the customization dialogue and direct them on how to set the script. 8.4.1 Using default RStudio environment: AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select the cloud computing environment described here to avoid runaway costs. Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>. Click on the cloud icon on the far right to access your Cloud Environment options. In the dialogue box, click the “Settings” button under RStudio. You will see some details about the default RStudio cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. Click the “CREATE” button. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the RStudio logo. It will take a few minutes for Terra to request computers and install software. When your environment is ready, its status will change to “Running”. Click on the RStudio logo to open a new dialogue box that will let you launch RStudio. Click the launch icon to open RStudio. This is also where you can pause, modify, or delete your environment when needed. You should now see the RStudio interface with information about the version printed to the console. 8.4.2 Using custom RStudio environment: AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select the cloud computing environment described here to avoid runaway costs. Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>. Click on the cloud icon on the far right to access your Cloud Environment options. In the dialogue box, click the “Settings” button under RStudio. You will see some details about the default RStudio cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. Click “CUSTOMIZE” to adjust the settings for your environment. Under “Application configuration” you will see a dropdown menu. You can also enter text here. Copy the following link into the box: example docker Under “Startup script” you will see textbox. Copy the following link into the box: example startup script Leave everything else as-is. To create your RStudio Cloud Environment, click on the “CREATE” button. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the RStudio logo. It will take a few minutes for Terra to request computers and install software. When your environment is ready, its status will change to “Running”. Click on the RStudio logo to open a new dialogue box that will let you launch RStudio. Click the launch icon to open RStudio. This is also where you can pause, modify, or delete your environment when needed. You should now see the RStudio interface with information about the version printed to the console. "],["user-management.html", "Chapter 9 User Management 9.1 Create Terra Group 9.2 Add Member to Terra Group 9.3 Find Group Email", " Chapter 9 User Management Modules about Groups and user management 9.1 Create Terra Group Launch Terra and sign in with your Google account. In the drop-down menu on the left, navigate to “Groups”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Groups”. You can also navigate there directly with this link: https://anvil.terra.bio/#groups Click “+ Create a New Group” Enter a name for your group. Names must be unique, so it’s often helpful to include your team’s name, the purpose of the group, and optionally the timeframe, if you will have similar groups in the future. Click “CREATE GROUP” Your new Group should now show up on the Group Management screen. Take note of the email address associated with your group. You will use this email to grant the group access to Billing Projects and Workspaces. 9.2 Add Member to Terra Group Launch Terra and sign in with your Google account. In the drop-down menu on the left, navigate to “Groups”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Groups”. You can also navigate there directly with this link: https://anvil.terra.bio/#groups Find the name of the Group you want to add someone to, and confirm that you have Admin privileges for the Group (you can only add and remove members to a Group if you are an Admin). Click on the name of the Group to view and manage members. Click on “+ Add User”. You will be prompted to enter the user’s AnVIL ID. Type in the user’s email address. Make sure this is the account that they will be using to access AnVIL. If this member will need to add and remove other members of the Group, check the box for “Can manage members (admin)”. This will add them as an “Admin” for the Group. Otherwise leave it unchecked, and they will be added as a “Member”. Admins and Members have equal access to any resources shared with the Group. Admins can manage Group membership - they can add, remove, or change the role of other Group members. Click ADD USER. This will take you back to the Group administration page. The new Group member will now be shown in the list of group members, along with their role. They should now have access to anything that the Group has been given access to. If you need to remove members or modify their roles, you can do so at any time by clicking the teardrop button next to their name. 9.3 Find Group Email Launch Terra and sign in with your Google account. In the drop-down menu on the left, navigate to “Groups”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Groups”. You can also navigate there directly with this link: https://anvil.terra.bio/#groups Find the name of the Group, then look in the “Group Email” column to find the email address associated with the Group. Copy this email address and paste it in as the username when adding people to Billing Projects and Workspaces. This will grant everyone in the Group access to the Billing Project or Workspace. "],["why-anvil.html", "Chapter 10 Why AnVIL 10.1 Why AnVIL for Instructors?", " Chapter 10 Why AnVIL Modules describing why AnVIL is useful for different personas. 10.1 Why AnVIL for Instructors? You may be wondering if AnVIL is a good choice for your class. We feel the answer is an unequivocal YES! AnVIL provides all the advantages of a cloud computing environment: Version control: All students will be using the exact same versions of programs, running on the exact same operating system, and the majority of setup can be handled for the students ahead of time. This greatly reduces time spent on setup and prevents unexpected run errors during the activities, limiting the amount of troubleshooting you have to do. As a result, classes and activities will run more smoothly and predictably. Inclusivity: Cloud-computing enables all students to participate in the activity without needing to provide computers with certain specifications. Experience: Cloud-computing is becoming common in today’s bioinformatics workplaces, and the classroom is a low-stress and low-stakes opportunity for students to gain experience. AnVIL is purpose-built for genomic data science: Tools: Through AnVIL, students can access a wide range of tools (Galaxy, RStudio/Bioconductor, Jupyter, as well as scripted workflows) all in one place, and can easily transition between them. Datasets: AnVIL provides a large and growing collection of relevant datasets with standardized organization, for easier importing and processing. Authenticity: On AnVIL, students will be working in the same environment as scientists carrying out cutting edge research. "],["instructor-modules.html", "Chapter 11 Instructor modules 11.1 Why AnVIL for Instructors? 11.2 Checklist Link 11.3 Checklist Timeline (premade content) 11.4 Recommendation to use STRIDES", " Chapter 11 Instructor modules Modules aimed at instructors. 11.1 Why AnVIL for Instructors? You may be wondering if AnVIL is a good choice for your class. We feel the answer is an unequivocal YES! AnVIL provides all the advantages of a cloud computing environment: Version control: All students will be using the exact same versions of programs, running on the exact same operating system, and the majority of setup can be handled for the students ahead of time. This greatly reduces time spent on setup and prevents unexpected run errors during the activities, limiting the amount of troubleshooting you have to do. As a result, classes and activities will run more smoothly and predictably. Inclusivity: Cloud-computing enables all students to participate in the activity without needing to provide computers with certain specifications. Experience: Cloud-computing is becoming common in today’s bioinformatics workplaces, and the classroom is a low-stress and low-stakes opportunity for students to gain experience. AnVIL is purpose-built for genomic data science: Tools: Through AnVIL, students can access a wide range of tools (Galaxy, RStudio/Bioconductor, Jupyter, as well as scripted workflows) all in one place, and can easily transition between them. Datasets: AnVIL provides a large and growing collection of relevant datasets with standardized organization, for easier importing and processing. Authenticity: On AnVIL, students will be working in the same environment as scientists carrying out cutting edge research. 11.2 Checklist Link Here is a checklist to help you keep track of the steps for setting up and teaching on AnVIL. Details about each of these steps can be found in the AnVIL Instructor Guide. Note that this checklist is written for workshop instructors as well as classroom instructors, so some of the “Event Setup” steps may not be applicable to you, depending on your teaching context. 11.3 Checklist Timeline (premade content) 1+ month before: Figure out how you will fund the class/workshop. Start working through INSTRUCTOR SETUP. It’s a good idea to get billing figured out with plenty of time to spare. Take some time to familiarize yourself with the content and make any desired updates or customizations. Do any necessary EVENT SETUP steps. ~1 week before: Start working through RUNNING THE CLASS. If possible, have students log in to AnVIL and send you their usernames, so you can add them to the Student Group ahead of time. This saves time on the day of the class. Do not add students to your Billing Project ahead of time. This prevents them from accruing costs. Day of (or shortly before): Add students to Billing Project. Have students clone the Workspace (They cannot do this until you have added them to the Billing Project. As soon as they do this, they can start computing.). After: Collect feedback, if you didn’t do it during the class/workshop. Work though EVENT WRAP-UP - until you shut things down, you will continue to accrue costs. 11.4 Recommendation to use STRIDES If you are new to AnVIL, we strongly recommend seeking funding through NHGRI / STRIDES for teaching your course. In order to prevent abuse, Google sets certain limits on cloud resources available to new users that can complicate teaching (e.g. project quotas). As you or your institution builds a payment history with Google, the limits on your accounts will be relaxed. In the meantime, STRIDES funding can help ensure your initial classes run smoothly. What is STRIDES? NHGRI’s strategic vision highlights the importance of training the next generation of genomic scientists. In collaboration with the NIH Office of Data Science Strategy, NHGRI makes funding available to AnVIL users through the STRIDES program, which aims to promote biological research in cloud environments. To inquire about funding your class on AnVIL, please contact help@lists.anvilproject.org. "],["about-the-authors.html", "About the Authors", " About the Authors These credits are based on our course contributors table guidelines.     Credits Names Pedagogy Lead Content Instructor(s) FirstName LastName Lecturer(s) (include chapter name/link in parentheses if only for specific chapters) - make new line if more than one chapter involved Delivered the course in some way - video or audio Content Author(s) (include chapter name/link in parentheses if only for specific chapters) - make new line if more than one chapter involved If any other authors besides lead instructor Content Contributor(s) (include section name/link in parentheses) - make new line if more than one section involved Wrote less than a chapter AnVIL instructions: Katherine Cox, Ava Hoffman, Elizabeth Humphries Content Editor(s)/Reviewer(s) Checked your content Content Director(s) Helped guide the content direction Content Consultants (include chapter name/link in parentheses or word “General”) - make new line if more than one chapter involved Gave high level advice on content AnVIL instructions: Allie Cliffe Acknowledgments Gave small assistance to content but not to the level of consulting Production Content Publisher(s) Helped with publishing platform Content Publishing Reviewer(s) Reviewed overall content and aesthetics on publishing platform Technical Course Publishing Engineer(s) Helped with the code for the technical aspects related to the specific course generation Template Publishing Engineers Candace Savonen, Carrie Wright Publishing Maintenance Engineer Candace Savonen Technical Publishing Stylists Carrie Wright, Candace Savonen Package Developers (ottrpal) John Muschelli, Candace Savonen, Carrie Wright Art and Design Illustrator(s) Created graphics for the course Figure Artist(s) Created figures/plots for course Videographer(s) Filmed videos Videography Editor(s) Edited film Audiographer(s) Recorded audio Audiography Editor(s) Edited audio recordings Funding Funder(s) Institution/individual who funded course including grant number Funding Staff Staff members who help with funding   ## ─ Session info ─────────────────────────────────────────────────────────────── ## setting value ## version R version 4.3.2 (2023-10-31) ## os Ubuntu 22.04.4 LTS ## system x86_64, linux-gnu ## ui X11 ## language (EN) ## collate en_US.UTF-8 ## ctype en_US.UTF-8 ## tz Etc/UTC ## date 2024-08-05 ## pandoc 3.1.1 @ /usr/local/bin/ (via rmarkdown) ## ## ─ Packages ─────────────────────────────────────────────────────────────────── ## package * version date (UTC) lib source ## bookdown 0.39.1 2024-06-11 [1] Github (rstudio/bookdown@f244cf1) ## bslib 0.6.1 2023-11-28 [1] RSPM (R 4.3.0) ## cachem 1.0.8 2023-05-01 [1] RSPM (R 4.3.0) ## cli 3.6.2 2023-12-11 [1] RSPM (R 4.3.0) ## devtools 2.4.5 2022-10-11 [1] RSPM (R 4.3.0) ## digest 0.6.34 2024-01-11 [1] RSPM (R 4.3.0) ## ellipsis 0.3.2 2021-04-29 [1] RSPM (R 4.3.0) ## evaluate 0.23 2023-11-01 [1] RSPM (R 4.3.0) ## fastmap 1.1.1 2023-02-24 [1] RSPM (R 4.3.0) ## fs 1.6.3 2023-07-20 [1] RSPM (R 4.3.0) ## glue 1.7.0 2024-01-09 [1] RSPM (R 4.3.0) ## htmltools 0.5.7 2023-11-03 [1] RSPM (R 4.3.0) ## htmlwidgets 1.6.4 2023-12-06 [1] RSPM (R 4.3.0) ## httpuv 1.6.14 2024-01-26 [1] RSPM (R 4.3.0) ## jquerylib 0.1.4 2021-04-26 [1] RSPM (R 4.3.0) ## jsonlite 1.8.8 2023-12-04 [1] RSPM (R 4.3.0) ## knitr 1.47.3 2024-06-11 [1] Github (yihui/knitr@e1edd34) ## later 1.3.2 2023-12-06 [1] RSPM (R 4.3.0) ## lifecycle 1.0.4 2023-11-07 [1] RSPM (R 4.3.0) ## magrittr 2.0.3 2022-03-30 [1] RSPM (R 4.3.0) ## memoise 2.0.1 2021-11-26 [1] RSPM (R 4.3.0) ## mime 0.12 2021-09-28 [1] RSPM (R 4.3.0) ## miniUI 0.1.1.1 2018-05-18 [1] RSPM (R 4.3.0) ## pkgbuild 1.4.3 2023-12-10 [1] RSPM (R 4.3.0) ## pkgload 1.3.4 2024-01-16 [1] RSPM (R 4.3.0) ## profvis 0.3.8 2023-05-02 [1] RSPM (R 4.3.0) ## promises 1.2.1 2023-08-10 [1] RSPM (R 4.3.0) ## purrr 1.0.2 2023-08-10 [1] RSPM (R 4.3.0) ## R6 2.5.1 2021-08-19 [1] RSPM (R 4.3.0) ## Rcpp 1.0.12 2024-01-09 [1] RSPM (R 4.3.0) ## remotes 2.4.2.1 2023-07-18 [1] RSPM (R 4.3.0) ## rlang 1.1.4 2024-06-04 [1] CRAN (R 4.3.2) ## rmarkdown 2.27.1 2024-06-11 [1] Github (rstudio/rmarkdown@e1c93a9) ## sass 0.4.8 2023-12-06 [1] RSPM (R 4.3.0) ## sessioninfo 1.2.2 2021-12-06 [1] RSPM (R 4.3.0) ## shiny 1.8.0 2023-11-17 [1] RSPM (R 4.3.0) ## stringi 1.8.3 2023-12-11 [1] RSPM (R 4.3.0) ## stringr 1.5.1 2023-11-14 [1] RSPM (R 4.3.0) ## urlchecker 1.0.1 2021-11-30 [1] RSPM (R 4.3.0) ## usethis 2.2.3 2024-02-19 [1] RSPM (R 4.3.0) ## vctrs 0.6.5 2023-12-01 [1] RSPM (R 4.3.0) ## xfun 0.44.4 2024-06-11 [1] Github (yihui/xfun@9da62cc) ## xtable 1.8-4 2019-04-21 [1] RSPM (R 4.3.0) ## yaml 2.3.8 2023-12-11 [1] RSPM (R 4.3.0) ## ## [1] /usr/local/lib/R/site-library ## [2] /usr/local/lib/R/library ## ## ────────────────────────────────────────────────────────────────────────────── "],["references.html", "Chapter 12 References", " Chapter 12 References "],["404.html", "Page not found", " Page not found The page you requested cannot be found (perhaps it was moved or renamed). You may want to try searching to find the page's new location, or use the table of contents to find the page you are looking for. "]] +[["index.html", "AnVIL CoFests! 2024 About this Book Skills Level AnVIL Collection", " AnVIL CoFests! 2024 August 07, 2024 About this Book This book is part of a series of books for the Genomic Data Science Analysis, Visualization, and Informatics Lab-space (AnVIL) of the National Human Genome Research Institute (NHGRI). Learn more about AnVIL by visiting https://anvilproject.org or reading the article in Cell Genomics. Skills Level Genetics Programming skills AnVIL Collection Please check out our full collection of AnVIL and related resources: https://hutchdatascience.org/AnVIL_Collection/ "],["learning-objectives.html", "Learning Objectives", " Learning Objectives "],["introduction.html", "Chapter 1 Introduction 1.1 Motivation 1.2 Target Audience 1.3 Curriculum", " Chapter 1 Introduction 1.1 Motivation 1.2 Target Audience The course is intended for … 1.3 Curriculum The course covers… "],["a-new-chapter.html", "Chapter 2 A new chapter 2.1 Learning Objectives 2.2 Libraries 2.3 Subtopic 2.4 Print out session info", " Chapter 2 A new chapter *If you haven’t yet read the getting started Wiki pages; start there Every chapter needs to start out with this chunk of code: 2.1 Learning Objectives *Every chapter also needs Learning objectives that will look like this: This chapter will cover: {You can use https://tips.uark.edu/using-blooms-taxonomy/ to define some learning objectives here} {Another learning objective} 2.2 Libraries For this chapter, we’ll need the following packages attached: *Remember to add any additional packages you need to your course’s own docker image. library(magrittr) 2.3 Subtopic Here’s a subheading and some text in this subsection! 2.3.1 Code examples You can demonstrate code like this: output_dir <- file.path("resources", "code_output") if (!dir.exists(output_dir)) { dir.create(output_dir) } And make plots too: hist_plot <- hist(iris$Sepal.Length) You can also save these plots to file: png(file.path(output_dir, "test_plot.png")) hist_plot ## $breaks ## [1] 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 ## ## $counts ## [1] 5 27 27 30 31 18 6 6 ## ## $density ## [1] 0.06666667 0.36000000 0.36000000 0.40000000 0.41333333 0.24000000 0.08000000 ## [8] 0.08000000 ## ## $mids ## [1] 4.25 4.75 5.25 5.75 6.25 6.75 7.25 7.75 ## ## $xname ## [1] "iris$Sepal.Length" ## ## $equidist ## [1] TRUE ## ## attr(,"class") ## [1] "histogram" dev.off() ## png ## 2 2.3.2 Image example How to include a Google slide. It’s simplest to use the ottrpal package: But if you have the slide or some other image locally downloaded you can also use html like this: 2.3.3 Video examples To show videos in your course, you can use markdown syntax like this: A video we want to show Alternatively, you can use knitr::include_url() like this: Note that we are using echo=FALSE in the code chunk because we don’t want the code part of this to show up. If you are unfamiliar with how R Markdown code chunks work, read this. OR this works: 2.3.4 Links to files This works: Or this: This works. Or this: 2.3.5 Links to websites Examples of including a website link. This works: OR this: Another link OR this: 2.3.6 Citation examples We can put citations at the end of a sentence like this (Allaire et al. 2021). Or multiple citations Xie, Allaire, and Grolemund (2018). but they need a ; separator (Allaire et al. 2021; Xie, Allaire, and Grolemund 2018). In text, we can put citations like this Allaire et al. (2021). 2.3.7 Callout boxes There are some preset callout boxes available, which can be used like so: notice: Here’s something interesting. warning: Look out! dictionary: Here’s a definition. reflection: Consider this! github: Here’s how you use GitHub. wip: This section is a Work in Progress. 2.3.8 Dropdown summaries You can hide additional information in a dropdown menu Here’s more words that are hidden. 2.4 Print out session info You should print out session info when you have code for reproducibility purposes. devtools::session_info() ## ─ Session info ─────────────────────────────────────────────────────────────── ## setting value ## version R version 4.3.2 (2023-10-31) ## os Ubuntu 22.04.4 LTS ## system x86_64, linux-gnu ## ui X11 ## language (EN) ## collate en_US.UTF-8 ## ctype en_US.UTF-8 ## tz Etc/UTC ## date 2024-08-07 ## pandoc 3.1.1 @ /usr/local/bin/ (via rmarkdown) ## ## ─ Packages ─────────────────────────────────────────────────────────────────── ## package * version date (UTC) lib source ## askpass 1.2.0 2023-09-03 [1] RSPM (R 4.3.0) ## bookdown 0.39.1 2024-06-11 [1] Github (rstudio/bookdown@f244cf1) ## bslib 0.6.1 2023-11-28 [1] RSPM (R 4.3.0) ## cachem 1.0.8 2023-05-01 [1] RSPM (R 4.3.0) ## cli 3.6.2 2023-12-11 [1] RSPM (R 4.3.0) ## curl 5.2.0 2023-12-08 [1] RSPM (R 4.3.0) ## devtools 2.4.5 2022-10-11 [1] RSPM (R 4.3.0) ## digest 0.6.34 2024-01-11 [1] RSPM (R 4.3.0) ## ellipsis 0.3.2 2021-04-29 [1] RSPM (R 4.3.0) ## evaluate 0.23 2023-11-01 [1] RSPM (R 4.3.0) ## fansi 1.0.6 2023-12-08 [1] RSPM (R 4.3.0) ## fastmap 1.1.1 2023-02-24 [1] RSPM (R 4.3.0) ## fs 1.6.3 2023-07-20 [1] RSPM (R 4.3.0) ## glue 1.7.0 2024-01-09 [1] RSPM (R 4.3.0) ## highr 0.10 2022-12-22 [1] RSPM (R 4.3.0) ## hms 1.1.3 2023-03-21 [1] RSPM (R 4.3.0) ## htmltools 0.5.7 2023-11-03 [1] RSPM (R 4.3.0) ## htmlwidgets 1.6.4 2023-12-06 [1] RSPM (R 4.3.0) ## httpuv 1.6.14 2024-01-26 [1] RSPM (R 4.3.0) ## httr 1.4.7 2023-08-15 [1] RSPM (R 4.3.0) ## jquerylib 0.1.4 2021-04-26 [1] RSPM (R 4.3.0) ## jsonlite 1.8.8 2023-12-04 [1] RSPM (R 4.3.0) ## knitr 1.47.3 2024-06-11 [1] Github (yihui/knitr@e1edd34) ## later 1.3.2 2023-12-06 [1] RSPM (R 4.3.0) ## lifecycle 1.0.4 2023-11-07 [1] RSPM (R 4.3.0) ## magrittr * 2.0.3 2022-03-30 [1] RSPM (R 4.3.0) ## memoise 2.0.1 2021-11-26 [1] RSPM (R 4.3.0) ## mime 0.12 2021-09-28 [1] RSPM (R 4.3.0) ## miniUI 0.1.1.1 2018-05-18 [1] RSPM (R 4.3.0) ## openssl 2.1.1 2023-09-25 [1] RSPM (R 4.3.0) ## ottrpal 1.2.1 2024-06-11 [1] Github (jhudsl/ottrpal@828539f) ## pillar 1.9.0 2023-03-22 [1] RSPM (R 4.3.0) ## pkgbuild 1.4.3 2023-12-10 [1] RSPM (R 4.3.0) ## pkgconfig 2.0.3 2019-09-22 [1] RSPM (R 4.3.0) ## pkgload 1.3.4 2024-01-16 [1] RSPM (R 4.3.0) ## png 0.1-8 2022-11-29 [1] CRAN (R 4.3.2) ## profvis 0.3.8 2023-05-02 [1] RSPM (R 4.3.0) ## promises 1.2.1 2023-08-10 [1] RSPM (R 4.3.0) ## purrr 1.0.2 2023-08-10 [1] RSPM (R 4.3.0) ## R6 2.5.1 2021-08-19 [1] RSPM (R 4.3.0) ## Rcpp 1.0.12 2024-01-09 [1] RSPM (R 4.3.0) ## readr 2.1.5 2024-01-10 [1] RSPM (R 4.3.0) ## remotes 2.4.2.1 2023-07-18 [1] RSPM (R 4.3.0) ## rlang 1.1.4 2024-06-04 [1] CRAN (R 4.3.2) ## rmarkdown 2.27.1 2024-06-11 [1] Github (rstudio/rmarkdown@e1c93a9) ## sass 0.4.8 2023-12-06 [1] RSPM (R 4.3.0) ## sessioninfo 1.2.2 2021-12-06 [1] RSPM (R 4.3.0) ## shiny 1.8.0 2023-11-17 [1] RSPM (R 4.3.0) ## stringi 1.8.3 2023-12-11 [1] RSPM (R 4.3.0) ## stringr 1.5.1 2023-11-14 [1] RSPM (R 4.3.0) ## tibble 3.2.1 2023-03-20 [1] CRAN (R 4.3.2) ## tzdb 0.4.0 2023-05-12 [1] RSPM (R 4.3.0) ## urlchecker 1.0.1 2021-11-30 [1] RSPM (R 4.3.0) ## usethis 2.2.3 2024-02-19 [1] RSPM (R 4.3.0) ## utf8 1.2.4 2023-10-22 [1] RSPM (R 4.3.0) ## vctrs 0.6.5 2023-12-01 [1] RSPM (R 4.3.0) ## xfun 0.44.4 2024-06-11 [1] Github (yihui/xfun@9da62cc) ## xml2 1.3.6 2023-12-04 [1] RSPM (R 4.3.0) ## xtable 1.8-4 2019-04-21 [1] RSPM (R 4.3.0) ## yaml 2.3.8 2023-12-11 [1] RSPM (R 4.3.0) ## ## [1] /usr/local/lib/R/site-library ## [2] /usr/local/lib/R/library ## ## ────────────────────────────────────────────────────────────────────────────── References "],["anvil-module-library.html", "Chapter 3 AnVIL Module Library 3.1 Include using cow::borrow_chapter() 3.2 Background Highlighting for Borrowed Chapters", " Chapter 3 AnVIL Module Library There are several pieces of content that are useful across multiple books, such as “How to Create a Workspace”. To reduce maintenance burden, the AnVIL_Template repository has a collection of _child R Markdown documents that can be included in your books. You can see all the available AnVIL modules in the AnVIL_Template book 3.1 Include using cow::borrow_chapter() To add a module to your book, include a code chunk with the cow::borrow_chapter() function, specifying the file for the module you want to borrow and the repository you want to borrow it from (the AnVIL_Template repository). See the OTTR_Template wiki page for the most recent instructions and additional details. Here is an example of including the _child_workspace_create.Rmd with cow::borrow_chapter() Launch Terra In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the plus icon near the top of left of the page. Name your Workspace and select the appropriate Billing Project. All activity in the Workspace will be charged to this Billing Project (regardless of who conducted it). If you are working with protected data, you can set the Authorization Domain to limit who can be added to your Workspace. Note that the Authorization Domain cannot be changed after the Workspace is created (i.e. there is no way to make this Workspace shareable with a larger audience in the future). Workspaces by default are only visible to people you specifically share them with. Authorization domains add an extra layer of enforcement over privacy, but by nature make sharing more complicated. We recommend using Authorization Domains in cases where it is extremely important and/or legally required that the data be kept private (e.g. protected patient data, industry data). For data you would merely prefer not be shared with the world, we recommend relying on standard Workspace sharing permissions rather than Authorization Domains, as Authorization Domains can make future collaborations, publications, or other sharing complicated. Click “CREATE WORKSPACE”. The new Workspace should now show up under your Workspaces. 3.2 Background Highlighting for Borrowed Chapters You can use the borrowed_chunk custom div block to highlight borrowed content or any other content you choose. Basic format: :::: {.borrowed_chunk} Code/Content here :::: Rendered with highlighting: If you do not already have a Google account that you would like to use for accessing Terra, create one now. If you would like to create a Google account that is associated with your non-Gmail, institutional email address, follow these instructions. Rendered without highlighting: If you do not already have a Google account that you would like to use for accessing Terra, create one now. If you would like to create a Google account that is associated with your non-Gmail, institutional email address, follow these instructions. "],["workspaces.html", "Chapter 4 Workspaces 4.1 Clone a Workspace 4.2 Create a Workspace 4.3 Open a Workspace 4.4 Share a Workspace", " Chapter 4 Workspaces Modules about Terra Workspaces 4.1 Clone a Workspace Launch Terra Locate the Workspace you want to clone. If a Workspace has been shared with you ahead of time, it will appear in “MY WORKSPACES”. You can clone a Workspace that was shared with you to perform your own analyses. In the screenshot below, no Workspaces have been shared. If a Workspace hasn’t been shared with you, navigate to the “FEATURED” or “PUBLIC” Workspace tabs. Use the search box to find the Workspace you want to clone. Click the teardrop button on the far right next to the Workspace you want to clone. Click “Clone”. You can also clone the Workspace from the Workspace Dashboard instead of the search results. You will see a popup box appear. Name your Workspace and select the appropriate Terra Billing Project. All activity in the Workspace will be charged to this Billing Project (regardless of who conducted it). Remember that each Workspace should have its own Billing Project. If you are working with protected data, you can set the Authorization Domain to limit who can be added to your Workspace. Note that the Authorization Domain cannot be changed after the Workspace is created (i.e. there is no way to make this Workspace shareable with a larger audience in the future). Workspaces by default are only visible to people you specifically share them with. Authorization domains add an extra layer of enforcement over privacy, but by nature make sharing more complicated. We recommend using Authorization Domains in cases where it is extremely important and/or legally required that the data be kept private (e.g. protected patient data, industry data). For data you would merely prefer not be shared with the world, we recommend relying on standard Workspace sharing permissions rather than Authorization Domains, as Authorization Domains can make future collaborations, publications, or other sharing complicated. Click “CLONE WORKSPACE”. The new Workspace should now show up under your Workspaces. 4.2 Create a Workspace Launch Terra In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the plus icon near the top of left of the page. Name your Workspace and select the appropriate Billing Project. All activity in the Workspace will be charged to this Billing Project (regardless of who conducted it). If you are working with protected data, you can set the Authorization Domain to limit who can be added to your Workspace. Note that the Authorization Domain cannot be changed after the Workspace is created (i.e. there is no way to make this Workspace shareable with a larger audience in the future). Workspaces by default are only visible to people you specifically share them with. Authorization domains add an extra layer of enforcement over privacy, but by nature make sharing more complicated. We recommend using Authorization Domains in cases where it is extremely important and/or legally required that the data be kept private (e.g. protected patient data, industry data). For data you would merely prefer not be shared with the world, we recommend relying on standard Workspace sharing permissions rather than Authorization Domains, as Authorization Domains can make future collaborations, publications, or other sharing complicated. Click “CREATE WORKSPACE”. The new Workspace should now show up under your Workspaces. 4.3 Open a Workspace Launch Terra In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. You are automatically directed to the “My Workspaces” tab. Here you can see any Workspaces that have been shared with you, along with your permission level. Reader means you can open the Workspace and see everything, but can’t do any computations or make any edits. Writer means you can run computations, which will charge costs to the Workspace’s Billing Project. Writers can also make edits to the Workspace. Owner is similar to Writer, but also allows you to control who can access the Workspace. Click on the name of a Workspace to open it. Opening and viewing a Workspace does not cost anything. When you open a Workspace, you are directed to the Workspace Dashboard. This generally has a description of the Workspace contents, as well as some useful details about the Workspace itself. From here you can navigate through the different tabs of the Workspace, and if you have sufficient permission, you can start running analyses. If you are only a Reader, you may need to “clone” (make your own copy) of the Workspace before you can start working. 4.4 Share a Workspace Launch Terra In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the name of the Workspace to open the Workspace. Opening a Workspace does not cost anything. Certain activities in the Workspace (such as running an analysis) will charge to the Workspace’s Billing Project. Workspace management (e.g. adding and removing members, editing the description) does not cost money. Click the teardrop button () on the right hand side to open the Workspace management menu. Click “Share” Enter the email address of the user or Group you’d like to share the Workspace with. If adding an individual, make sure to enter the account that they use to access AnVIL. If adding a Terra Group, use the Group email address, which can be found on the Terra Group management page. Choose their permission level. Remember that all activity in the Workspace will be charged to the Workspace’s Billing Project, regardless of who conducts it, so only add members as “Writers” or “Owners” if they should be charging to the Workspace’s Billing Project. “Readers” can view all parts of the Workspace but cannot make edits or run analyses (i.e. they cannot spend money). They can also clone their own copy of the Workspace where they can conduct activity on their own Billing Project. Click “Save”. The user should now be able to see the Workspace when logged in to Terra. "],["billing.html", "Chapter 5 Billing 5.1 Create Google Billing Account 5.2 Add Terra to Google Billing Account 5.3 Add Members to Google Billing Account 5.4 Set Alerts for Google Billing 5.5 View Spend for Google Billing 5.6 Create Terra Billing Project 5.7 Add Member to Terra Billing Project 5.8 Disable Terra Billing Project", " Chapter 5 Billing Modules about billing and Billing Projects on Google Cloud Platform and Terra. 5.1 Create Google Billing Account Log in to the Google Cloud Platform console using your Google ID. Make sure to use the same Google account ID you use to log into Terra. If you are a first time user, don’t forget to claim your free credits! If you haven’t been to the console before, once you accept the Terms of Service you will be greeted with an invitation to “Try for Free.” Follow the instructions to sign up for a Billing Account and get your credits. Choose “Individual Account”. This “billing account” is just for managing billing, so you don’t need to be able to add your team members. You will need to give either a credit card or bank account for security. Don’t worry! You won’t be billed until you explicitly turn on automatic billing. You can view and edit your new Billing Account, by selecting “Billing” from the left-hand menu, or going directly to the billing console console.cloud.google.com/billing Clicking on the Billing Account name will allow you to manage the account, including accessing reports, setting alerts, and managing payments and billing. At any point, you can create additional Billing Accounts using the Create Account button. We generally recommend creating a new Billing Account for each funding source. 5.2 Add Terra to Google Billing Account This gives Terra permission to create projects and send charges to the Google Billing Account, and must be done by an administrator of the Google Billing Account. Terra needs to be added as a “Billing Account User”: Log in to the Google Cloud Platform console using your Google ID. Navigate to Billing You may be automatically directed to view a specific Billing Account. If you see information about a single account rather than a list of your Billing Accounts, you can get back to the list by clicking “Manage Billing Accounts” from the drop-down menu. Check the box next to the Billing Account you wish to add Terra to, click “ADD MEMBER”. Enter terra-billing@terra.bio in the text box. In the drop-down menu, mouse over Billing, then choose “Billing Account User”. Click “SAVE”. 5.3 Add Members to Google Billing Account Anyone you wish to add to the Billing Account will need their own Google ID. To add a member to a Billing Project: Log in to the Google Cloud Platform console using your Google ID. Navigate to Billing You may be automatically directed to view a specific Billing Account. If you see information about a single account rather than a list of your Billing Accounts, you can get back to the list by clicking “Manage Billing Accounts” from the drop-down menu. Check the box next to the Billing Account you wish to add a member to, click “ADD MEMBER”. Enter their Google ID in the text box. In the drop-down menu, mouse over Billing, then choose the appropriate role. Click “SAVE”. 5.4 Set Alerts for Google Billing Log in to the Google Cloud Platform console using the Google ID associated with your Google Cloud projects. Open the dropdown menu on the top left and click on Billing. You may be automatically directed to view a specific Billing Account. If you see information about a single account (and it’s not the one you’re interested in), you can get back to the list of all your Billing Accounts by clicking “Manage Billing Accounts” from the drop-down menu. Click on the name of the Billing Account you want to set alerts for. In the left-hand menu, click “Budgets & alerts”. Click the “Create Budget” tab. Enter a name for your budget, and then choose which projects you want to monitor. Then click “Next”. For Budget Type, select “Specified amount”. Enter the total budget amount for the month (you will set alerts at different thresholds in the next step). Click “Next” (do not click “Finish”). Enter the threshold amounts where you want to receive an alert. We recommend starting with 50% and 90%. You can set other alerts if you prefer. Check the box for “Email alerts to billing admins and users”, then click “Finish”. Now you (as the owner and admin), along with anyone you added with admin or user privileges (e.g. lab managers) will receive alerts when your lab members reach the specified spending thresholds. These emails will be sent to the Gmail accounts associated with the Billing Account. You can edit your budgets at any time by going to Billing > Budgets & alerts, and clicking on the name of the budget you want to edit. 5.5 View Spend for Google Billing You can always check your current spend through the Google Billing console, but remember There is a reporting delay (~1 day), so you cannot immediately see what an analysis cost Costs are reported at the level of Workspaces, so if there are multiple people using a Workspace, you will not be able to determine which of them was responsible for the charges. The Google Billing console displays information by Billing Account. To view spending: Log in to the Google Cloud Platform console using the Google ID associated with your Google Cloud projects. Open the dropdown menu on the top left and click on Billing. You may be automatically directed to view a specific Billing Account. If you see information about a single account (and it’s not the one you’re interested in), you can get back to the list of all your Billing Accounts by clicking “Manage Billing Accounts” from the drop-down menu. Click on the name of the Billing Account for the project you want to view. Look at the top of the Overview tab to see your month-to-date spending. Scroll further down the Overview tab to show your top projects. Click on the Reports tab to see more detailed information about each of your projects. This is probably the most useful tab for exploring costs of individual projects over time. Click on the Cost table tab to obtain a convenient table of spending per project. 5.6 Create Terra Billing Project Launch Terra and sign in with your Google account. If this is your first time logging in to Terra, you will need to accept the Terms of Service. In the drop-down menu on the left, navigate to “Billing”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Billing”. You can also navigate there directly with this link: https://anvil.terra.bio/#billing On the Billing page, click the “+ CREATE” button to create a new Billing Project. If prompted, select the Google account to use. If prompted, give Terra permission to manage Google Cloud Platform billing accounts. Enter a unique name for your Terra Billing Project and select the appropriate Google Billing Account. The name of the Terra Billing Project must: Only contain lowercase letters, numbers and hyphens Start with a lowercase letter Not end with a hyphen Be between 6 and 30 characters Select the Google Billing Account to use. All activities conducted under your new Terra Billing Project will charge to this Google Billing Account. If prompted, give Terra permission to manage Google Cloud Platform billing accounts. Click “CREATE BILLING PROJECT”. Your new Billing Project should now show up in the list of Billing Projects Owned by You. You can add additional members or can modify or deactivate the Billing Project at any time by clicking on its name in this list. The page doesn’t always update as soon as the Billing Project is created. If it’s been a couple of minutes and you don’t see a change, try refreshing the page. 5.7 Add Member to Terra Billing Project Launch Terra and sign in with your Google account. In the drop-down menu on the left, navigate to “Billing”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Billing”. You can also navigate there directly with this link: https://anvil.terra.bio/#billing Click “Owned by You” and find the Billing Project. If you do not see the Billing Project in this list, then you are not an Owner and do not have permission to add members. Click on the name of the Billing Project. Click on the “Members” tab to view and manage members. Then click the “Add User” button. Enter the email address of the user or group you’d like to add the the Billing Project. If adding an individual, make sure to enter the account that they use to access AnVIL. If adding a Terra Group, use the Group email address, which can be found on the Terra Group management page. If this user or group will need to add and remove other users of the Billing Project, check the Owner box. Otherwise leave it unchecked. It’s often a good idea to have at least one other Owner of a Billing Project in order to avoid getting locked out, in case the original owner leaves or loses access to their account. Click “ADD USER”. You should now see the user or group listed in the Billing Project members, along with the appropriate role. They should now be able to use the Billing Project to fund work on AnVIL. If you need to remove members or modify their roles, you can do so at any time by clicking the teardrop button next to their name. 5.8 Disable Terra Billing Project By default this module includes a warning to make sure people understand they will lose access to their Workspace buckets. You can remove the warning from this module by setting AnVIL_module_settings$warning to FALSE before running cow::borrow_chapter: AnVIL_module_settings <- list( warning = FALSE ) cow::borrow_chapter( doc_path = "child/_child_terra_billing_project_disable.Rmd", repo_name = "jhudsl/AnVIL_Template" ) Disabling a Billing Project makes Workspace contents inaccessible! Disabling a Billing Project disables funding to all Workspaces funded by the Billing Project. You will be unable to compute in these Workspaces, and you will lose access to any data stored in the Workspace buckets. It is sometimes possible to restore access by reactivating billing, but Google makes no promises about whether or how long the data will be recoverable. Make sure everyone with Workspaces funded by the Billing Project has saved anything they want to keep in another location before disabling the Billing Project. To disable a Terra Billing Project (i.e. remove the Google Billing Account that funds the Terra Billing Project): Launch Terra and sign in with your Google account. In the drop-down menu on the left, navigate to “Billing”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Billing”. You can also navigate there directly with this link: https://anvil.terra.bio/#billing Click “Owned by You” and find the Billing Project. If you do not see the Billing Project in this list, then you are not an Owner and do not have permission to add members. Click on the name of the Billing Project. If you don’t see information about the Billing Account, click on “View billing account” to expand the Billing Account information. You may be prompted to enter your login information again. You should see the name of the Google Billing Account that is funding this Terra Billing Project. Click on the teardrop icon next to the name of the Billing Account. Click “Remove Billing Account”. Click OK to confirm that you want to disable funding for this Billing Project. The page should now indicate that there is no linked billing account. If necessary, you can restore funding to the Billing Project and associated Workspaces by clicking the teardrop icon and selecting “Change Billing Account”. However, Google makes no promises about how long the Workspace contents will remain available after you disable funding, so it is best not to rely on them. "],["onboarding.html", "Chapter 6 Onboarding 6.1 Create Google Account", " Chapter 6 Onboarding Joining a team on AnVIL. 6.1 Create Google Account If you do not already have a Google account that you would like to use for accessing Terra, create one now. If you would like to create a Google account that is associated with your non-Gmail, institutional email address, follow these instructions. "],["using-programming-platforms-on-anvil.html", "Chapter 7 Using programming platforms on AnVIL 7.1 Video overview on using Jupyter Notebooks 7.2 Launching Jupyter 7.3 Video overview on using Galaxy 7.4 Starting Galaxy 7.5 Navigating Galaxy 7.6 Deleting Galaxy 7.7 Video overview on using RStudio 7.8 Launching RStudio 7.9 Touring RStudio 7.10 Pausing RStudio 7.11 Deleting RStudio", " Chapter 7 Using programming platforms on AnVIL Modules about opening, touring, and closing AnVIL platforms 7.1 Video overview on using Jupyter Notebooks Here is a video tutorial that describes the basics of using Jupyter Notebook on AnVIL. 7.1.1 Objectives Start compute for your Jupyter environment Create notebook to perform analysis Stop compute to minimize expenses 7.1.2 Slides The slides for this tutorial are are located here. 7.2 Launching Jupyter AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select a cloud computing environment appropriate to your needs to avoid runaway costs. If you are uncertain, start with the default settings; it is fairly easy to increase your compute resources later, if needed, but harder to scale down. Note that, in order to use Jupyter, you must have access to a Terra Workspace with permission to compute (i.e. you must be a “Writer” or “Owner” of the Workspace). Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>. Click on the cloud icon on the far right to access your Cloud Environment options. In the dialogue box, click the “Settings” button under Jupyter. You will see some configuration options for the Jupyter cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. Configure any settings you need for your cloud environment. If you are uncertain about what you need, the default configuration is a reasonable, cost-conservative choice. It is fairly easy to increase your compute resources later, if needed, but harder to scale down. Scroll down and click the “CREATE” button when you are satisfied with your setup. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the Jupyter icon. It will take a few minutes for Terra to request computers and install software. When your environment is ready, its status will change to “Running”. Click on the “ANALYSES” tab to create or open a Jupyter Notebook. From the ANALYSES tab, you can click on the name of an existing Jupyter Notebook to view and launch it, or click the “START” button to create a new Notebook. Clicking on a Notebook name will open a static preview of the Notebook. To edit and run the Notebook, click the “OPEN” button. 7.3 Video overview on using Galaxy Here is a video tutorial that describes the basics of using Galaxy on AnVIL. 7.3.1 Objectives Start compute for your Galaxy on AnVIL Run tool to quality control sequencing reads Stop compute to minimize expenses 7.3.2 Slides The slides for this tutorial are are located here. 7.4 Starting Galaxy Note that, in order to use Galaxy, you must have access to a Terra Workspace with permission to compute (i.e. you must be a “Writer” or “Owner” of the Workspace). Open your Workspace, and click on the “NOTEBOOKS” tab. Next, click on “Create a Cloud Environment for Galaxy”. You should see a popup window on the right side of the screen. Click on “NEXT” and “CREATE” to keep all settings as-is. This will take 8-10 minutes. When it is done, click “LAUNCH GALAXY”. 7.5 Navigating Galaxy Notice the three main sections. Tools - These are all of the bioinformatics tool packages available for you to use. The Main Dashboard - This contains flash messages and posts when you first open Galaxy, but when we are using data this is the main interface area. History - When you start a project you will be able to see all of the documents in the project in the history. Now be aware, this can become very busy. Also the naming that Galaxy uses is not very intuitive, so you must make sure that you label your files with something that makes sense to you. On the welcome page, there are links to tutorials. You may try these out on your own. If you want to try a new analysis this is a good place to start. 7.6 Deleting Galaxy Once you are done with your activity, you’ll need to shut down your Galaxy cloud environment. This frees up the cloud resources for others and minimizes computing cost. The following steps will delete your work, so make sure you are completely finished at this point. Otherwise, you will have to repeat your work from the previous steps. Return to AnVIL, and find the Galaxy logo that shows your cloud environment is running. Click on this logo: Next, click on “DELETE ENVIRONMENT OPTIONS”: Finally, select “Delete everything, including persistent disk”. Make sure you are done with the activity and then click “DELETE”. 7.7 Video overview on using RStudio Here is a video tutorial that describes the basics of using RStudio on AnVIL. 7.7.1 Objectives Start compute for your RStudio environment Tour RStudio on AnVIL Stop compute to minimize expenses 7.7.2 Slides The slides for this tutorial are are located here. 7.8 Launching RStudio AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select a cloud computing environment appropriate to your needs to avoid runaway costs. If you are uncertain, start with the default settings; it is fairly easy to increase your compute resources later, if needed, but harder to scale down. Note that, in order to use RStudio, you must have access to a Terra Workspace with permission to compute (i.e. you must be a “Writer” or “Owner” of the Workspace). Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>. Click on the cloud icon on the far right to access your Cloud Environment options. In the dialogue box, click the “Settings” button under RStudio. You will see some details about the default RStudio cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. If you are uncertain about what you need, the default configuration is a reasonable, cost-conservative choice. It is fairly easy to increase your compute resources later, if needed, but harder to scale down. Click the “Create” button. Otherwise, click “CUSTOMIZE” to modify the environment for your needs. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the RStudio logo. It will take a few minutes for Terra to request computers and install software. When your environment is ready, its status will change to “Running”. Click on the RStudio logo to open a new dialogue box that will let you launch RStudio. Click the launch icon to open RStudio. This is also where you can pause, modify, or delete your environment when needed. You should now see the RStudio interface with information about the version printed to the console. 7.9 Touring RStudio Next, we will be using RStudio and the package Glimma to create interactive plots. See this vignette for more information. The Bioconductor team has created a very useful package to programmatically interact with Terra and Google Cloud. Install the AnVIL package. It will make some steps easier as we go along. You can now quickly install precompiled binaries using the AnVIL package’s install() function. We will use it to install the Glimma package and the airway package. The airway package contains a SummarizedExperiment data class. This data describes an RNA-Seq experiment on four human airway smooth muscle cell lines treated with dexamethasone. {Note: for some of the packages, you will have to install packaged from the CRAN repository, using the install.packages() function. The examples will show you which install method to use.} <img src="07-using_platforms_modules_files/figure-html//1BLTCaogA04bbeSD1tR1Wt-mVceQA6FHXa8FmFzIARrg_g11f12bc99af_0_56.png" alt="Screenshot of the RStudio environment interface. Code has been typed in the console and is highlighted." width="100%" /> Load the example data. The multidimensional scaling (MDS) plot is frequently used to explore differences in samples. When this data is MDS transformed, the first two dimensions explain the greatest variance between samples, and the amount of variance decreases monotonically with increasing dimension. The following code will launch a new window where you can interact with the MDS plot. Change the colour_by setting to “groups” so you can easily distinguish between groups. In this data, the “group” is the treatment. You can download the interactive html file by clicking on “Save As”. You can also download plots and other files created directly in RStudio. To download the following plot, click on “Export” and save in your preferred format to the default directory. This saves the file in your cloud environment. You should see the plot in the “Files” pane. Select this file and click “More” > “Export” Select “Download” to save the file to your local machine. 7.10 Pausing RStudio The right-hand side icon reminds you that you are accruing cloud computing costs. If you don’t see this icon, you may need to scroll to the right. You should minimize charges when you are not performing an analysis. You can do this by clicking on the RStudio icon and selecting “Pause”. This will release the CPU and memory resources for other people to use. Note that your work will be saved in the environment and continue to accrue a very small cost. This work will be lost if the cloud environment gets deleted. If there is anything you would like to save permanently, it’s a good idea to copy it from your compute environment to another location, such as the Workspace bucket, GitHub, or your local machine, depending on your needs. You can also pause your cloud environment(s) at https://anvil.terra.bio/#clusters. 7.11 Deleting RStudio Pausing your cloud environment only temporarily stops your work. When you are ready to delete the cloud environment, click on the RStudio icon on the right-hand side and select “Settings”. If you don’t see this icon, you may need to scroll to the right. Click on “Delete Environment”. If you are certain that you do not need the data and configuration on your disk, you should select “Delete everything, including persistent disk”. If there is anything you would like to save, open the compute environment and copy the file(s) from your compute environment to another location, such as the Workspace bucket, GitHub, or your local machine, depending on your needs. Select “DELETE”. You can also delete your cloud environment(s) and disk storage at https://anvil.terra.bio/#clusters. "],["student-instructions.html", "Chapter 8 Student instructions 8.1 Student Account Setup 8.2 Student instructions for cloning a Workspace 8.3 Student instructions for launching Jupyter 8.4 Student instructions for launching RStudio", " Chapter 8 Student instructions Modules aimed at students in a course or workshop. 8.1 Student Account Setup In order to run your analyses, you will use the AnVIL cloud computing platform, so that you do not need to install everything on your own computer. The AnVIL (Analysis Visualization and Informatics Lab-space) platform is specially designed for analyzing biological data, and is used by scientists doing all sorts of biological research. AnVIL in a nutshell Behind the scenes, AnVIL relies on Google Cloud Platform to provide computing infrastructure. Basically, AnVIL lets you “rent” computers from Google (remotely). Whenever you run an analyses on AnVIL, it actually runs on one of Google’s computers, and AnVIL lets you see the results in your browser. AnVIL uses Terra to provide many computational tools useful for biological data analysis, such as RStudio, Galaxy, and Jupyter Notebooks. Terra takes care of installing these tools on Google’s computers, so that you can just start using them. 8.1.1 Create Google Account First, you will need to set up a (free) Google account. If you do not already have a Google account that you would like to use for accessing AnVIL, create one now. Alternatively, if you would like to create a Google account that is associated with an existing non-Gmail email address, you can follow these instructions. 8.1.2 Log In to Terra Next, make sure you can log in to Terra – you will use Terra to perform computations on AnVIL. You can access Terra by going to anvil.terra.bio, or by clicking the link on the AnVIL home page. Open Terra, and you should be prompted to sign in with your Google account. 8.1.3 Share Username Finally, make sure your instructor has your Google account username (e.g. myname@gmail.com), so they can give you access to everything you need. Make sure there are no typos! If you have multiple Google accounts, make sure you give them the username that you will be using to access AnVIL It is very important that you share the Google account you will be using to access AnVIL with with your instructor! Otherwise, the instructor cannot add you to Billing Projects or Workspaces, and you will be unable to proceed with your assignments. 8.2 Student instructions for cloning a Workspace These instructions can be customized to a specific workspace by setting certain variables before running cow::borrow_chapter(). If these variables have not been set, reasonable defaults are provided (e.g. “ask your instructor”). 8.2.1 With no variables set: This will not work until your instructor has given you permission to spend money to “rent” the computers that will power your analyses (by adding you to a “Billing Project”). On AnVIL, you access files and computers through Workspaces. Each Workspace functions almost like a mini code laboratory - it is a place where data can be examined, stored, and analyzed. The first thing we want to do is to copy or “clone” a Workspace to create a space for you to experiment. This will give you access to the files you will need (data, code) the computing environment you will use Tip At this point, it might make things easier to open up a new window in your browser and split your screen. That way, you can follow along with this guide on one side and execute the steps on the other. To clone an AnVIL Workspace: Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. You are automatically directed to the “MY WORKSPACES” tab. Here you can see any Workspaces that have been shared with you, along with your permission level. Depending on how your instructor has set things up, you may or may not see any Workspaces in this tab. Locate the Workspace specified by your instructor. (The images below show the SARS-CoV-2-Genome Workspace as an example, but you should look for the Workspace specified by your instructor.) If it has been shared with you ahead of time, it will appear in “MY WORKSPACES”. Otherwise, select the “PUBLIC” tab. In the top search bar, type the Workspace name specified by your instructor. You can also go directly to the Workspace by clicking this link: ask your instructor. Clone the workspace by clicking the teardrop button (). Select “Clone”. Or, if you have opened the Workspace, you can find the teardrop button on the top right of the Workspace. You will see a popup box appear, asking you to configure your Workspace Give your Workspace clone a name by adding an underscore (“_“) and your name. For example, \"ExampleWorkspace_Firstname_Lastname\". Select the Billing Project provided by your instructor. Leave the bottom two boxes as-is. Click “CLONE WORKSPACE”. The new Workspace should now show up under “MY WORKSPACES”. You now have your own copy of the Workspace to work in. 8.2.2 With variables set: This will not work until your instructor has given you permission to spend money to “rent” the computers that will power your analyses (by adding you to a “Billing Project”). On AnVIL, you access files and computers through Workspaces. Each Workspace functions almost like a mini code laboratory - it is a place where data can be examined, stored, and analyzed. The first thing we want to do is to copy or “clone” a Workspace to create a space for you to experiment. This will give you access to the files you will need (data, code) the computing environment you will use Tip At this point, it might make things easier to open up a new window in your browser and split your screen. That way, you can follow along with this guide on one side and execute the steps on the other. To clone an AnVIL Workspace: Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. You are automatically directed to the “MY WORKSPACES” tab. Here you can see any Workspaces that have been shared with you, along with your permission level. Depending on how your instructor has set things up, you may or may not see any Workspaces in this tab. Locate the Workspace Example_Workspace. (The images below show the SARS-CoV-2-Genome Workspace as an example, but you should look for the Workspace Example_Workspace.) If it has been shared with you ahead of time, it will appear in “MY WORKSPACES”. Otherwise, select the “PUBLIC” tab. In the top search bar, type the Workspace name Example_Workspace. You can also go directly to the Workspace by clicking this link: http://example.com/. Clone the workspace by clicking the teardrop button (). Select “Clone”. Or, if you have opened the Workspace, you can find the teardrop button on the top right of the Workspace. You will see a popup box appear, asking you to configure your Workspace Give your Workspace clone a name by adding an underscore (“_“) and your name. For example, \"Example_Workspace_Firstname_Lastname\". Select the Billing Project Example Billing Project. Leave the bottom two boxes as-is. Click “CLONE WORKSPACE”. The new Workspace should now show up under “MY WORKSPACES”. You now have your own copy of the Workspace to work in. 8.3 Student instructions for launching Jupyter The module below is specially customized for students, allowing you to give more specific instructions on the settings for their Jupyter environment. There are several other general purpose modules that may also be useful for students (e.g. Pausing Jupyter, Deleting Jupyter) that can be found in other chapters of this book. The following instructions can be customized by setting certain variables before running cow::borrow_chapter(). Developers should create these variables as a list AnVIL_module_settings. The following variables can be provided: audience = Defaults to general, telling them to use the default Jupyter settings. If audience is set to student, it gives more specific instructions. docker_image = Optional, it will tell them how to set the image. startup_script = Optional, it will tell them how to set the script. 8.3.1 Using default Jupyter environment: AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select the cloud computing environment described here to avoid runaway costs. Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>. Click on the cloud icon on the far right to access your Cloud Environment options. In the dialogue box, click the “Settings” button under Jupyter. You will see some configuration options for the Jupyter cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. Leave everything else as-is. To create your Jupyter Cloud Environment, scroll down and click the “CREATE” button. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the Jupyter icon. It will take a few minutes for Terra to request computers and install software. When your environment is ready, its status will change to “Running”. Click on the “ANALYSES” tab to create or open a Jupyter Notebook. From the ANALYSES tab, you can click on the name of an existing Jupyter Notebook to view and launch it, or click the “START” button to create a new Notebook. 8.3.2 Using custom Jupyter environment: AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select the cloud computing environment described here to avoid runaway costs. Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>. Click on the cloud icon on the far right to access your Cloud Environment options. In the dialogue box, click the “Settings” button under Jupyter. You will see some configuration options for the Jupyter cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. Under “Application configuration” you will see a dropdown menu. Choose “Custom Environment”. Then copy the following link into “Container image” textbox: example docker Under “Startup script” you will see textbox. Copy the following link into the box: example startup script Leave everything else as-is. To create your Jupyter Cloud Environment, scroll down and click the “CREATE” button. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the Jupyter icon. It will take a few minutes for Terra to request computers and install software. When your environment is ready, its status will change to “Running”. Click on the “ANALYSES” tab to create or open a Jupyter Notebook. From the ANALYSES tab, you can click on the name of an existing Jupyter Notebook to view and launch it, or click the “START” button to create a new Notebook. 8.4 Student instructions for launching RStudio The module below is specially customized for students, allowing you to give more specific instructions on the settings for their RStudio environment. There are several other general purpose modules that may also be useful for students (e.g. Pausing RStudio, Deleting RStudio) that can be found in other chapters of this book. The following instructions can be customized by setting certain variables before running cow::borrow_chapter(). Developers should create these variables as a list AnVIL_module_settings. The following variables can be provided: audience = Defaults to general, telling them to use the default RStudio settings. If audience is set to student, it gives more specific instructions. docker_image = Optional, it will tell them to open the customization dialogue and direct them on how to set the image. startup_script = Optional, it will tell them to open the customization dialogue and direct them on how to set the script. 8.4.1 Using default RStudio environment: AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select the cloud computing environment described here to avoid runaway costs. Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>. Click on the cloud icon on the far right to access your Cloud Environment options. In the dialogue box, click the “Settings” button under RStudio. You will see some details about the default RStudio cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. Click the “CREATE” button. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the RStudio logo. It will take a few minutes for Terra to request computers and install software. When your environment is ready, its status will change to “Running”. Click on the RStudio logo to open a new dialogue box that will let you launch RStudio. Click the launch icon to open RStudio. This is also where you can pause, modify, or delete your environment when needed. You should now see the RStudio interface with information about the version printed to the console. 8.4.2 Using custom RStudio environment: AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select the cloud computing environment described here to avoid runaway costs. Open Terra - use a web browser to go to anvil.terra.bio In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>. Click on the cloud icon on the far right to access your Cloud Environment options. In the dialogue box, click the “Settings” button under RStudio. You will see some details about the default RStudio cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. Click “CUSTOMIZE” to adjust the settings for your environment. Under “Application configuration” you will see a dropdown menu. You can also enter text here. Copy the following link into the box: example docker Under “Startup script” you will see textbox. Copy the following link into the box: example startup script Leave everything else as-is. To create your RStudio Cloud Environment, click on the “CREATE” button. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the RStudio logo. It will take a few minutes for Terra to request computers and install software. When your environment is ready, its status will change to “Running”. Click on the RStudio logo to open a new dialogue box that will let you launch RStudio. Click the launch icon to open RStudio. This is also where you can pause, modify, or delete your environment when needed. You should now see the RStudio interface with information about the version printed to the console. "],["user-management.html", "Chapter 9 User Management 9.1 Create Terra Group 9.2 Add Member to Terra Group 9.3 Find Group Email", " Chapter 9 User Management Modules about Groups and user management 9.1 Create Terra Group Launch Terra and sign in with your Google account. In the drop-down menu on the left, navigate to “Groups”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Groups”. You can also navigate there directly with this link: https://anvil.terra.bio/#groups Click “+ Create a New Group” Enter a name for your group. Names must be unique, so it’s often helpful to include your team’s name, the purpose of the group, and optionally the timeframe, if you will have similar groups in the future. Click “CREATE GROUP” Your new Group should now show up on the Group Management screen. Take note of the email address associated with your group. You will use this email to grant the group access to Billing Projects and Workspaces. 9.2 Add Member to Terra Group Launch Terra and sign in with your Google account. In the drop-down menu on the left, navigate to “Groups”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Groups”. You can also navigate there directly with this link: https://anvil.terra.bio/#groups Find the name of the Group you want to add someone to, and confirm that you have Admin privileges for the Group (you can only add and remove members to a Group if you are an Admin). Click on the name of the Group to view and manage members. Click on “+ Add User”. You will be prompted to enter the user’s AnVIL ID. Type in the user’s email address. Make sure this is the account that they will be using to access AnVIL. If this member will need to add and remove other members of the Group, check the box for “Can manage members (admin)”. This will add them as an “Admin” for the Group. Otherwise leave it unchecked, and they will be added as a “Member”. Admins and Members have equal access to any resources shared with the Group. Admins can manage Group membership - they can add, remove, or change the role of other Group members. Click ADD USER. This will take you back to the Group administration page. The new Group member will now be shown in the list of group members, along with their role. They should now have access to anything that the Group has been given access to. If you need to remove members or modify their roles, you can do so at any time by clicking the teardrop button next to their name. 9.3 Find Group Email Launch Terra and sign in with your Google account. In the drop-down menu on the left, navigate to “Groups”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Groups”. You can also navigate there directly with this link: https://anvil.terra.bio/#groups Find the name of the Group, then look in the “Group Email” column to find the email address associated with the Group. Copy this email address and paste it in as the username when adding people to Billing Projects and Workspaces. This will grant everyone in the Group access to the Billing Project or Workspace. "],["why-anvil.html", "Chapter 10 Why AnVIL 10.1 Why AnVIL for Instructors?", " Chapter 10 Why AnVIL Modules describing why AnVIL is useful for different personas. 10.1 Why AnVIL for Instructors? You may be wondering if AnVIL is a good choice for your class. We feel the answer is an unequivocal YES! AnVIL provides all the advantages of a cloud computing environment: Version control: All students will be using the exact same versions of programs, running on the exact same operating system, and the majority of setup can be handled for the students ahead of time. This greatly reduces time spent on setup and prevents unexpected run errors during the activities, limiting the amount of troubleshooting you have to do. As a result, classes and activities will run more smoothly and predictably. Inclusivity: Cloud-computing enables all students to participate in the activity without needing to provide computers with certain specifications. Experience: Cloud-computing is becoming common in today’s bioinformatics workplaces, and the classroom is a low-stress and low-stakes opportunity for students to gain experience. AnVIL is purpose-built for genomic data science: Tools: Through AnVIL, students can access a wide range of tools (Galaxy, RStudio/Bioconductor, Jupyter, as well as scripted workflows) all in one place, and can easily transition between them. Datasets: AnVIL provides a large and growing collection of relevant datasets with standardized organization, for easier importing and processing. Authenticity: On AnVIL, students will be working in the same environment as scientists carrying out cutting edge research. "],["instructor-modules.html", "Chapter 11 Instructor modules 11.1 Why AnVIL for Instructors? 11.2 Checklist Link 11.3 Checklist Timeline (premade content) 11.4 Recommendation to use STRIDES", " Chapter 11 Instructor modules Modules aimed at instructors. 11.1 Why AnVIL for Instructors? You may be wondering if AnVIL is a good choice for your class. We feel the answer is an unequivocal YES! AnVIL provides all the advantages of a cloud computing environment: Version control: All students will be using the exact same versions of programs, running on the exact same operating system, and the majority of setup can be handled for the students ahead of time. This greatly reduces time spent on setup and prevents unexpected run errors during the activities, limiting the amount of troubleshooting you have to do. As a result, classes and activities will run more smoothly and predictably. Inclusivity: Cloud-computing enables all students to participate in the activity without needing to provide computers with certain specifications. Experience: Cloud-computing is becoming common in today’s bioinformatics workplaces, and the classroom is a low-stress and low-stakes opportunity for students to gain experience. AnVIL is purpose-built for genomic data science: Tools: Through AnVIL, students can access a wide range of tools (Galaxy, RStudio/Bioconductor, Jupyter, as well as scripted workflows) all in one place, and can easily transition between them. Datasets: AnVIL provides a large and growing collection of relevant datasets with standardized organization, for easier importing and processing. Authenticity: On AnVIL, students will be working in the same environment as scientists carrying out cutting edge research. 11.2 Checklist Link Here is a checklist to help you keep track of the steps for setting up and teaching on AnVIL. Details about each of these steps can be found in the AnVIL Instructor Guide. Note that this checklist is written for workshop instructors as well as classroom instructors, so some of the “Event Setup” steps may not be applicable to you, depending on your teaching context. 11.3 Checklist Timeline (premade content) 1+ month before: Figure out how you will fund the class/workshop. Start working through INSTRUCTOR SETUP. It’s a good idea to get billing figured out with plenty of time to spare. Take some time to familiarize yourself with the content and make any desired updates or customizations. Do any necessary EVENT SETUP steps. ~1 week before: Start working through RUNNING THE CLASS. If possible, have students log in to AnVIL and send you their usernames, so you can add them to the Student Group ahead of time. This saves time on the day of the class. Do not add students to your Billing Project ahead of time. This prevents them from accruing costs. Day of (or shortly before): Add students to Billing Project. Have students clone the Workspace (They cannot do this until you have added them to the Billing Project. As soon as they do this, they can start computing.). After: Collect feedback, if you didn’t do it during the class/workshop. Work though EVENT WRAP-UP - until you shut things down, you will continue to accrue costs. 11.4 Recommendation to use STRIDES If you are new to AnVIL, we strongly recommend seeking funding through NHGRI / STRIDES for teaching your course. In order to prevent abuse, Google sets certain limits on cloud resources available to new users that can complicate teaching (e.g. project quotas). As you or your institution builds a payment history with Google, the limits on your accounts will be relaxed. In the meantime, STRIDES funding can help ensure your initial classes run smoothly. What is STRIDES? NHGRI’s strategic vision highlights the importance of training the next generation of genomic scientists. In collaboration with the NIH Office of Data Science Strategy, NHGRI makes funding available to AnVIL users through the STRIDES program, which aims to promote biological research in cloud environments. To inquire about funding your class on AnVIL, please contact help@lists.anvilproject.org. "],["about-the-authors.html", "About the Authors", " About the Authors These credits are based on our course contributors table guidelines.     Credits Names Pedagogy Lead Content Instructor(s) FirstName LastName Lecturer(s) (include chapter name/link in parentheses if only for specific chapters) - make new line if more than one chapter involved Delivered the course in some way - video or audio Content Author(s) (include chapter name/link in parentheses if only for specific chapters) - make new line if more than one chapter involved If any other authors besides lead instructor Content Contributor(s) (include section name/link in parentheses) - make new line if more than one section involved Wrote less than a chapter AnVIL instructions: Katherine Cox, Ava Hoffman, Elizabeth Humphries Content Editor(s)/Reviewer(s) Checked your content Content Director(s) Helped guide the content direction Content Consultants (include chapter name/link in parentheses or word “General”) - make new line if more than one chapter involved Gave high level advice on content AnVIL instructions: Allie Cliffe Acknowledgments Gave small assistance to content but not to the level of consulting Production Content Publisher(s) Helped with publishing platform Content Publishing Reviewer(s) Reviewed overall content and aesthetics on publishing platform Technical Course Publishing Engineer(s) Helped with the code for the technical aspects related to the specific course generation Template Publishing Engineers Candace Savonen, Carrie Wright Publishing Maintenance Engineer Candace Savonen Technical Publishing Stylists Carrie Wright, Candace Savonen Package Developers (ottrpal) John Muschelli, Candace Savonen, Carrie Wright Art and Design Illustrator(s) Created graphics for the course Figure Artist(s) Created figures/plots for course Videographer(s) Filmed videos Videography Editor(s) Edited film Audiographer(s) Recorded audio Audiography Editor(s) Edited audio recordings Funding Funder(s) Institution/individual who funded course including grant number Funding Staff Staff members who help with funding   ## ─ Session info ─────────────────────────────────────────────────────────────── ## setting value ## version R version 4.3.2 (2023-10-31) ## os Ubuntu 22.04.4 LTS ## system x86_64, linux-gnu ## ui X11 ## language (EN) ## collate en_US.UTF-8 ## ctype en_US.UTF-8 ## tz Etc/UTC ## date 2024-08-07 ## pandoc 3.1.1 @ /usr/local/bin/ (via rmarkdown) ## ## ─ Packages ─────────────────────────────────────────────────────────────────── ## package * version date (UTC) lib source ## bookdown 0.39.1 2024-06-11 [1] Github (rstudio/bookdown@f244cf1) ## bslib 0.6.1 2023-11-28 [1] RSPM (R 4.3.0) ## cachem 1.0.8 2023-05-01 [1] RSPM (R 4.3.0) ## cli 3.6.2 2023-12-11 [1] RSPM (R 4.3.0) ## devtools 2.4.5 2022-10-11 [1] RSPM (R 4.3.0) ## digest 0.6.34 2024-01-11 [1] RSPM (R 4.3.0) ## ellipsis 0.3.2 2021-04-29 [1] RSPM (R 4.3.0) ## evaluate 0.23 2023-11-01 [1] RSPM (R 4.3.0) ## fastmap 1.1.1 2023-02-24 [1] RSPM (R 4.3.0) ## fs 1.6.3 2023-07-20 [1] RSPM (R 4.3.0) ## glue 1.7.0 2024-01-09 [1] RSPM (R 4.3.0) ## htmltools 0.5.7 2023-11-03 [1] RSPM (R 4.3.0) ## htmlwidgets 1.6.4 2023-12-06 [1] RSPM (R 4.3.0) ## httpuv 1.6.14 2024-01-26 [1] RSPM (R 4.3.0) ## jquerylib 0.1.4 2021-04-26 [1] RSPM (R 4.3.0) ## jsonlite 1.8.8 2023-12-04 [1] RSPM (R 4.3.0) ## knitr 1.47.3 2024-06-11 [1] Github (yihui/knitr@e1edd34) ## later 1.3.2 2023-12-06 [1] RSPM (R 4.3.0) ## lifecycle 1.0.4 2023-11-07 [1] RSPM (R 4.3.0) ## magrittr 2.0.3 2022-03-30 [1] RSPM (R 4.3.0) ## memoise 2.0.1 2021-11-26 [1] RSPM (R 4.3.0) ## mime 0.12 2021-09-28 [1] RSPM (R 4.3.0) ## miniUI 0.1.1.1 2018-05-18 [1] RSPM (R 4.3.0) ## pkgbuild 1.4.3 2023-12-10 [1] RSPM (R 4.3.0) ## pkgload 1.3.4 2024-01-16 [1] RSPM (R 4.3.0) ## profvis 0.3.8 2023-05-02 [1] RSPM (R 4.3.0) ## promises 1.2.1 2023-08-10 [1] RSPM (R 4.3.0) ## purrr 1.0.2 2023-08-10 [1] RSPM (R 4.3.0) ## R6 2.5.1 2021-08-19 [1] RSPM (R 4.3.0) ## Rcpp 1.0.12 2024-01-09 [1] RSPM (R 4.3.0) ## remotes 2.4.2.1 2023-07-18 [1] RSPM (R 4.3.0) ## rlang 1.1.4 2024-06-04 [1] CRAN (R 4.3.2) ## rmarkdown 2.27.1 2024-06-11 [1] Github (rstudio/rmarkdown@e1c93a9) ## sass 0.4.8 2023-12-06 [1] RSPM (R 4.3.0) ## sessioninfo 1.2.2 2021-12-06 [1] RSPM (R 4.3.0) ## shiny 1.8.0 2023-11-17 [1] RSPM (R 4.3.0) ## stringi 1.8.3 2023-12-11 [1] RSPM (R 4.3.0) ## stringr 1.5.1 2023-11-14 [1] RSPM (R 4.3.0) ## urlchecker 1.0.1 2021-11-30 [1] RSPM (R 4.3.0) ## usethis 2.2.3 2024-02-19 [1] RSPM (R 4.3.0) ## vctrs 0.6.5 2023-12-01 [1] RSPM (R 4.3.0) ## xfun 0.44.4 2024-06-11 [1] Github (yihui/xfun@9da62cc) ## xtable 1.8-4 2019-04-21 [1] RSPM (R 4.3.0) ## yaml 2.3.8 2023-12-11 [1] RSPM (R 4.3.0) ## ## [1] /usr/local/lib/R/site-library ## [2] /usr/local/lib/R/library ## ## ────────────────────────────────────────────────────────────────────────────── "],["references.html", "Chapter 12 References", " Chapter 12 References "],["404.html", "Page not found", " Page not found The page you requested cannot be found (perhaps it was moved or renamed). You may want to try searching to find the page's new location, or use the table of contents to find the page you are looking for. "]] diff --git a/docs/student-instructions.html b/docs/student-instructions.html new file mode 100644 index 0000000..81a60df --- /dev/null +++ b/docs/student-instructions.html @@ -0,0 +1,699 @@ + + + + + + + Chapter 8 Student instructions | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

Chapter 8 Student instructions

+

Modules aimed at students in a course or workshop.

+


+
+

8.1 Student Account Setup

+
+

In order to run your analyses, you will use the AnVIL cloud computing platform, so that you do not need to install everything on your own computer. The AnVIL (Analysis Visualization and Informatics Lab-space) platform is specially designed for analyzing biological data, and is used by scientists doing all sorts of biological research.

+
+

AnVIL in a nutshell

+
    +
  • Behind the scenes, AnVIL relies on Google Cloud Platform to provide computing infrastructure. Basically, AnVIL lets you “rent” computers from Google (remotely). Whenever you run an analyses on AnVIL, it actually runs on one of Google’s computers, and AnVIL lets you see the results in your browser.
  • +
  • AnVIL uses Terra to provide many computational tools useful for biological data analysis, such as RStudio, Galaxy, and Jupyter Notebooks. Terra takes care of installing these tools on Google’s computers, so that you can just start using them.
  • +
+
+
+

8.1.1 Create Google Account

+

First, you will need to set up a (free) Google account.

+

If you do not already have a Google account that you would like to use for accessing AnVIL, create one now.

+
    +
  • Alternatively, if you would like to create a Google account that is associated with an existing non-Gmail email address, you can follow these instructions.
  • +
+
+
+

8.1.2 Log In to Terra

+

Next, make sure you can log in to Terra – you will use Terra to perform computations on AnVIL.

+

You can access Terra by going to anvil.terra.bio, or by clicking the link on the AnVIL home page.

+

Screenshot of the AnVIL home page. The section descring Terra is highlighted.

+

Open Terra, and you should be prompted to sign in with your Google account.

+
+
+

8.1.3 Share Username

+

Finally, make sure your instructor has your Google account username (e.g. myname@gmail.com), so they can give you access to everything you need.

+
    +
  • Make sure there are no typos!
  • +
  • If you have multiple Google accounts, make sure you give them the username that you will be using to access AnVIL
  • +
+
+

It is very important that you share the Google account you will be using to access AnVIL with with your instructor! Otherwise, the instructor cannot add you to Billing Projects or Workspaces, and you will be unable to proceed with your assignments.

+
+
+
+
+
+

8.2 Student instructions for cloning a Workspace

+

These instructions can be customized to a specific workspace by setting certain variables before running cow::borrow_chapter(). If these variables have not been set, reasonable defaults are provided (e.g. “ask your instructor”).

+
+

8.2.1 With no variables set:

+
+
+

This will not work until your instructor has given you permission to spend money to “rent” the computers that will power your analyses (by adding you to a “Billing Project”).

+
+

On AnVIL, you access files and computers through Workspaces. Each Workspace functions almost like a mini code laboratory - it is a place where data can be examined, stored, and analyzed. The first thing we want to do is to copy or “clone” a Workspace to create a space for you to experiment. This will give you access to

+
    +
  • the files you will need (data, code)
  • +
  • the computing environment you will use
  • +
+
+

Tip +At this point, it might make things easier to open up a new window in your browser and split your screen. That way, you can follow along with this guide on one side and execute the steps on the other.

+
+

To clone an AnVIL Workspace:

+
    +
  1. Open Terra - use a web browser to go to anvil.terra.bio

  2. +
  3. In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”.

    +

    Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted.

  4. +
  5. You are automatically directed to the “MY WORKSPACES” tab. Here you can see any Workspaces that have been shared with you, along with your permission level. Depending on how your instructor has set things up, you may or may not see any Workspaces in this tab.

    +

    Screenshot of Terra Workspaces page with the "MY WORKSPACES" tab selected.  The "MY WORKSPACES" tab and the column showing permission level are highlighted.

  6. +
  7. Locate the Workspace specified by your instructor. (The images below show the SARS-CoV-2-Genome Workspace as an example, but you should look for the Workspace specified by your instructor.)

    +
      +
    1. If it has been shared with you ahead of time, it will appear in “MY WORKSPACES”.
    2. +
    +

    Screenshot of Terra Workspaces page with the "MY WORKSPACES" tab selected. The "MY WORKSPACES" tab and a Workspace name are highlighted.

    +
      +
    1. Otherwise, select the “PUBLIC” tab. In the top search bar, type the Workspace name specified by your instructor.
    2. +
    +

    Screenshot of Terra Workspaces page with the "PUBLIC" tab selected. The "PUBLIC" tab and search box are highlighted.  The the user has typed in the term "sars". A Workspace related to SARS appears in the results.

    +
      +
    1. You can also go directly to the Workspace by clicking this link: ask your instructor.
    2. +
  8. +
  9. Clone the workspace by clicking the teardrop button (teardrop button). Select “Clone”. Or, if you have opened the Workspace, you can find the teardrop button on the top right of the Workspace.

    +

    Screenshot showing the teardrop button. The button has been clicked revealing the "clone" option. The Clone option and the teardrop button are highlighted. +Screenshot of the Dashboard for the Workspace that we want to clone. The teardrop button has been clicked to bring up the options. The "Clone" option from the list is highlighted.

  10. +
  11. You will see a popup box appear, asking you to configure your Workspace

    +
      +
    1. Give your Workspace clone a name by adding an underscore (“_“) and your name. For example, "ExampleWorkspace_Firstname_Lastname".
    2. +
    3. Select the Billing Project provided by your instructor.
    4. +
    5. Leave the bottom two boxes as-is.
    6. +
    7. Click “CLONE WORKSPACE”.
    8. +
    +

    Screenshot showing the "clone a workspace" popout. The Workspace name, Billing Project, and Clone Workspace button have been filled in and highlighted.

  12. +
  13. The new Workspace should now show up under “MY WORKSPACES”. You now have your own copy of the Workspace to work in.

  14. +
+
+
+
+

8.2.2 With variables set:

+
+
+

This will not work until your instructor has given you permission to spend money to “rent” the computers that will power your analyses (by adding you to a “Billing Project”).

+
+

On AnVIL, you access files and computers through Workspaces. Each Workspace functions almost like a mini code laboratory - it is a place where data can be examined, stored, and analyzed. The first thing we want to do is to copy or “clone” a Workspace to create a space for you to experiment. This will give you access to

+
    +
  • the files you will need (data, code)
  • +
  • the computing environment you will use
  • +
+
+

Tip +At this point, it might make things easier to open up a new window in your browser and split your screen. That way, you can follow along with this guide on one side and execute the steps on the other.

+
+

To clone an AnVIL Workspace:

+
    +
  1. Open Terra - use a web browser to go to anvil.terra.bio

  2. +
  3. In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”.

    +

    Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted.

  4. +
  5. You are automatically directed to the “MY WORKSPACES” tab. Here you can see any Workspaces that have been shared with you, along with your permission level. Depending on how your instructor has set things up, you may or may not see any Workspaces in this tab.

    +

    Screenshot of Terra Workspaces page with the "MY WORKSPACES" tab selected.  The "MY WORKSPACES" tab and the column showing permission level are highlighted.

  6. +
  7. Locate the Workspace Example_Workspace. (The images below show the SARS-CoV-2-Genome Workspace as an example, but you should look for the Workspace Example_Workspace.)

    +
      +
    1. If it has been shared with you ahead of time, it will appear in “MY WORKSPACES”.
    2. +
    +

    Screenshot of Terra Workspaces page with the "MY WORKSPACES" tab selected. The "MY WORKSPACES" tab and a Workspace name are highlighted.

    +
      +
    1. Otherwise, select the “PUBLIC” tab. In the top search bar, type the Workspace name Example_Workspace.
    2. +
    +

    Screenshot of Terra Workspaces page with the "PUBLIC" tab selected. The "PUBLIC" tab and search box are highlighted.  The the user has typed in the term "sars". A Workspace related to SARS appears in the results.

    +
      +
    1. You can also go directly to the Workspace by clicking this link: http://example.com/.
    2. +
  8. +
  9. Clone the workspace by clicking the teardrop button (teardrop button). Select “Clone”. Or, if you have opened the Workspace, you can find the teardrop button on the top right of the Workspace.

    +

    Screenshot showing the teardrop button. The button has been clicked revealing the "clone" option. The Clone option and the teardrop button are highlighted. +Screenshot of the Dashboard for the Workspace that we want to clone. The teardrop button has been clicked to bring up the options. The "Clone" option from the list is highlighted.

  10. +
  11. You will see a popup box appear, asking you to configure your Workspace

    +
      +
    1. Give your Workspace clone a name by adding an underscore (“_“) and your name. For example, "Example_Workspace_Firstname_Lastname".
    2. +
    3. Select the Billing Project Example Billing Project.
    4. +
    5. Leave the bottom two boxes as-is.
    6. +
    7. Click “CLONE WORKSPACE”.
    8. +
    +

    Screenshot showing the "clone a workspace" popout. The Workspace name, Billing Project, and Clone Workspace button have been filled in and highlighted.

  12. +
  13. The new Workspace should now show up under “MY WORKSPACES”. You now have your own copy of the Workspace to work in.

  14. +
+
+
+
+
+

8.3 Student instructions for launching Jupyter

+

The module below is specially customized for students, allowing you to give more specific instructions on the settings for their Jupyter environment. There are several other general purpose modules that may also be useful for students (e.g. Pausing Jupyter, Deleting Jupyter) that can be found in other chapters of this book.

+

The following instructions can be customized by setting certain variables before running cow::borrow_chapter(). Developers should create these variables as a list AnVIL_module_settings. The following variables can be provided:

+
    +
  • audience = Defaults to general, telling them to use the default Jupyter settings. If audience is set to student, it gives more specific instructions.
  • +
  • docker_image = Optional, it will tell them how to set the image.
  • +
  • startup_script = Optional, it will tell them how to set the script.
  • +
+
+

8.3.1 Using default Jupyter environment:

+
+
+

AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select the cloud computing environment described here to avoid runaway costs.

+
+
    +
  1. Open Terra - use a web browser to go to anvil.terra.bio

  2. +
  3. In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”.

    +

    Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted.

  4. +
  5. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>.

  6. +
  7. Click on the cloud icon on the far right to access your Cloud Environment options.

    +

    Screenshot of a Terra Workspace. The cloud icon to create a new cloud environment is highlighted.

  8. +
  9. In the dialogue box, click the “Settings” button under Jupyter.

    +

    Screenshot of the Cloud Environment Details dialogue box. The Settings button under Jupyter is highlighted.

  10. +
  11. You will see some configuration options for the Jupyter cloud environment, and a list of costs because it costs a small amount of money to use cloud computing.

    +

    Screenshot of the Jupyter Cloud Environment dialogue box. The cost to run the environment is highlighted.

  12. +
  13. Leave everything else as-is. To create your Jupyter Cloud Environment, scroll down and click the “CREATE” button.

    +

    Screenshot of the Jupyter Cloud Environment dialogue box. The "CREATE" button is highlighted.

  14. +
  15. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the Jupyter icon. It will take a few minutes for Terra to request computers and install software.

    +

    Screenshot of a Terra Workspace. The hovertext for the Jupyter icon is highlighted, and indicates that the status of the environment is "Creating".

  16. +
  17. When your environment is ready, its status will change to “Running”. Click on the “ANALYSES” tab to create or open a Jupyter Notebook.

    +

    Screenshot of a Terra Workspace. The hovertext for the Jupyter icon is highlighted, and indicates that the status of the environment is "Running".  The ANALYSES tab is also highlighted

  18. +
  19. From the ANALYSES tab, you can click on the name of an existing Jupyter Notebook to view and launch it, or click the “START” button to create a new Notebook.

    +

    Screenshot of Terra Workspace with the "ANALYSES" tab selected and highlighted.  The page shows a list of Jupyter Notebooks.  The Notebook names and the START button are highlighted.

  20. +
+
+
+
+

8.3.2 Using custom Jupyter environment:

+
+
+

AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select the cloud computing environment described here to avoid runaway costs.

+
+
    +
  1. Open Terra - use a web browser to go to anvil.terra.bio

  2. +
  3. In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”.

    +

    Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted.

  4. +
  5. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>.

  6. +
  7. Click on the cloud icon on the far right to access your Cloud Environment options.

    +

    Screenshot of a Terra Workspace. The cloud icon to create a new cloud environment is highlighted.

  8. +
  9. In the dialogue box, click the “Settings” button under Jupyter.

    +

    Screenshot of the Cloud Environment Details dialogue box. The Settings button under Jupyter is highlighted.

  10. +
  11. You will see some configuration options for the Jupyter cloud environment, and a list of costs because it costs a small amount of money to use cloud computing.

    +

    Screenshot of the Jupyter Cloud Environment dialogue box. The cost to run the environment is highlighted.

  12. +
  13. Under “Application configuration” you will see a dropdown menu. Choose “Custom Environment”. Then copy the following link into “Container image” textbox:

    +

    example docker

    +

    Screenshot of the Jupyter Cloud Environment "Application configuration" dropdown. The option "Custom Environment" is highlighted.

    +

    Screenshot of the Jupyter Cloud Environment dialog box. "Custom Environment" has been selected in the "Application configuration" dropdown menu, and the "Container image" textbox is highlighted.

  14. +
  15. Under “Startup script” you will see textbox. Copy the following link into the box:

    +

    example startup script

    +

    Screenshot of the Jupyter Cloud Environment customization dialogue box. The textbox labeled "Startup script" is highlighted.

  16. +
  17. Leave everything else as-is. To create your Jupyter Cloud Environment, scroll down and click the “CREATE” button.

    +

    Screenshot of the Jupyter Cloud Environment dialogue box. The "CREATE" button is highlighted.

  18. +
  19. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the Jupyter icon. It will take a few minutes for Terra to request computers and install software.

    +

    Screenshot of a Terra Workspace. The hovertext for the Jupyter icon is highlighted, and indicates that the status of the environment is "Creating".

  20. +
  21. When your environment is ready, its status will change to “Running”. Click on the “ANALYSES” tab to create or open a Jupyter Notebook.

    +

    Screenshot of a Terra Workspace. The hovertext for the Jupyter icon is highlighted, and indicates that the status of the environment is "Running".  The ANALYSES tab is also highlighted

  22. +
  23. From the ANALYSES tab, you can click on the name of an existing Jupyter Notebook to view and launch it, or click the “START” button to create a new Notebook.

    +

    Screenshot of Terra Workspace with the "ANALYSES" tab selected and highlighted.  The page shows a list of Jupyter Notebooks.  The Notebook names and the START button are highlighted.

  24. +
+
+
+
+
+

8.4 Student instructions for launching RStudio

+

The module below is specially customized for students, allowing you to give more specific instructions on the settings for their RStudio environment. There are several other general purpose modules that may also be useful for students (e.g. Pausing RStudio, Deleting RStudio) that can be found in other chapters of this book.

+

The following instructions can be customized by setting certain variables before running cow::borrow_chapter(). Developers should create these variables as a list AnVIL_module_settings. The following variables can be provided:

+
    +
  • audience = Defaults to general, telling them to use the default RStudio settings. If audience is set to student, it gives more specific instructions.
  • +
  • docker_image = Optional, it will tell them to open the customization dialogue and direct them on how to set the image.
  • +
  • startup_script = Optional, it will tell them to open the customization dialogue and direct them on how to set the script.
  • +
+
+

8.4.1 Using default RStudio environment:

+
+
+

AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select the cloud computing environment described here to avoid runaway costs.

+
+
    +
  1. Open Terra - use a web browser to go to anvil.terra.bio

  2. +
  3. In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”.

    +

    Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted.

  4. +
  5. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>.

  6. +
  7. Click on the cloud icon on the far right to access your Cloud Environment options.

    +

    Screenshot of a Terra Workspace. The cloud icon to create a new cloud environment is highlighted.

  8. +
  9. In the dialogue box, click the “Settings” button under RStudio.

    +

    Screenshot of the Cloud Environment Details dialogue box. The Settings button under RStudio is highlighted.

  10. +
  11. You will see some details about the default RStudio cloud environment, and a list of costs because it costs a small amount of money to use cloud computing.

    +

    Screenshot of the RStudio Cloud Environment dialogue box. The cost to run the environment is highlighted.

  12. +
  13. Click the “CREATE” button.

    +

    Screenshot of the RStudio Cloud Environment dialogue box. The "CREATE" button is highlighted.

  14. +
  15. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the RStudio logo. It will take a few minutes for Terra to request computers and install software.

    +

    Screenshot of a Terra Workspace. The hovertext for the RStudio icon is highlighted, and indicates that the status of the environment is "Creating".

  16. +
  17. When your environment is ready, its status will change to “Running”. Click on the RStudio logo to open a new dialogue box that will let you launch RStudio.

    +

    Screenshot of a Terra Workspace. The hovertext for the RStudio icon is highlighted, and indicates that the status of the environment is "Running".

  18. +
  19. Click the launch icon to open RStudio. This is also where you can pause, modify, or delete your environment when needed.

    +

    Screenshot of the RStudio Environment Details dialogue box. The "Open" button is highlighted.

  20. +
  21. You should now see the RStudio interface with information about the version printed to the console.

    +

    Screenshot of the RStudio environment interface.

  22. +
+
+
+
+

8.4.2 Using custom RStudio environment:

+
+
+

AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select the cloud computing environment described here to avoid runaway costs.

+
+
    +
  1. Open Terra - use a web browser to go to anvil.terra.bio

  2. +
  3. In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”.

    +

    Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted.

  4. +
  5. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>.

  6. +
  7. Click on the cloud icon on the far right to access your Cloud Environment options.

    +

    Screenshot of a Terra Workspace. The cloud icon to create a new cloud environment is highlighted.

  8. +
  9. In the dialogue box, click the “Settings” button under RStudio.

    +

    Screenshot of the Cloud Environment Details dialogue box. The Settings button under RStudio is highlighted.

  10. +
  11. You will see some details about the default RStudio cloud environment, and a list of costs because it costs a small amount of money to use cloud computing.

    +

    Screenshot of the RStudio Cloud Environment dialogue box. The cost to run the environment is highlighted.

  12. +
  13. Click “CUSTOMIZE” to adjust the settings for your environment.

    +

    Screenshot of the RStudio Cloud Environment dialogue box. The "CUSTOMIZE" button is highlighted.

  14. +
  15. Under “Application configuration” you will see a dropdown menu. You can also enter text here. Copy the following link into the box:

    +

    example docker

    +

    Screenshot of the RStudio Cloud Environment customization dialogue box. The dropdown menu labeled "Application configuration" is highlighted.

  16. +
  17. Under “Startup script” you will see textbox. Copy the following link into the box:

    +

    example startup script

    +

    Screenshot of the RStudio Cloud Environment customization dialogue box. The textbox labeled "Startup script" is highlighted.

  18. +
  19. Leave everything else as-is. To create your RStudio Cloud Environment, click on the “CREATE” button.

    +

    Screenshot of the RStudio Cloud Environment customization dialogue box. The "CREATE" button is highlighted.

  20. +
  21. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the RStudio logo. It will take a few minutes for Terra to request computers and install software.

    +

    Screenshot of a Terra Workspace. The hovertext for the RStudio icon is highlighted, and indicates that the status of the environment is "Creating".

  22. +
  23. When your environment is ready, its status will change to “Running”. Click on the RStudio logo to open a new dialogue box that will let you launch RStudio.

    +

    Screenshot of a Terra Workspace. The hovertext for the RStudio icon is highlighted, and indicates that the status of the environment is "Running".

  24. +
  25. Click the launch icon to open RStudio. This is also where you can pause, modify, or delete your environment when needed.

    +

    Screenshot of the RStudio Environment Details dialogue box. The "Open" button is highlighted.

  26. +
  27. You should now see the RStudio interface with information about the version printed to the console.

    +

    Screenshot of the RStudio environment interface.

  28. +
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/user-management.html b/docs/user-management.html new file mode 100644 index 0000000..6477fdd --- /dev/null +++ b/docs/user-management.html @@ -0,0 +1,465 @@ + + + + + + + Chapter 9 User Management | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

Chapter 9 User Management

+

Modules about Groups and user management

+


+
+

9.1 Create Terra Group

+
+
    +
  1. Launch Terra and sign in with your Google account.

  2. +
  3. In the drop-down menu on the left, navigate to “Groups”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Groups”. You can also navigate there directly with this link: https://anvil.terra.bio/#groups

    +

    Screenshot of the Terra drop-down menu.  Three items are highlighted: 1) the "hamburger" button for extending the drop-down menu, 2) the arrow next to your username, for extending the drop-down submenu, and 3) the submenu item "Groups".

  4. +
  5. Click “+ Create a New Group”

    +

    Screenshot of the Terra Group page. The "Create a New Group" button is highlighted.

  6. +
  7. Enter a name for your group. Names must be unique, so it’s often helpful to include your team’s name, the purpose of the group, and optionally the timeframe, if you will have similar groups in the future.

    +

    Screenshot of the Terra Group page with Create New Group pop out box. The textbox is highlighted and has been filled in with the Group name.

  8. +
  9. Click “CREATE GROUP”

    +

    Screenshot of the Terra Group page with Create New Group pop out box. The "CREATE GROUP" button is highlighted.

  10. +
  11. Your new Group should now show up on the Group Management screen. Take note of the email address associated with your group. You will use this email to grant the group access to Billing Projects and Workspaces.

    +

    Screenshot of the Terra Groups page.  The Group email address is highlighted.

  12. +
+
+
+
+

9.2 Add Member to Terra Group

+
+
    +
  1. Launch Terra and sign in with your Google account.

  2. +
  3. In the drop-down menu on the left, navigate to “Groups”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Groups”. You can also navigate there directly with this link: https://anvil.terra.bio/#groups

    +

    Screenshot of the Terra drop-down menu.  Three items are highlighted: 1) the "hamburger" button for extending the drop-down menu, 2) the arrow next to your username, for extending the drop-down submenu, and 3) the submenu item "Groups".

  4. +
  5. Find the name of the Group you want to add someone to, and confirm that you have Admin privileges for the Group (you can only add and remove members to a Group if you are an Admin). Click on the name of the Group to view and manage members.

    +

    Screenshot of the Terra Groups page.  The Group Name and Role are highlighted.

  6. +
  7. Click on “+ Add User”. You will be prompted to enter the user’s AnVIL ID.

    +

    Screenshot of a Terra Group management page. The "+ Add User" button is highlighted.

  8. +
  9. Type in the user’s email address. Make sure this is the account that they will be using to access AnVIL.

    +

    Screenshot of the dialog box for adding Terra Group members. The textbox labeled "User email" is highlighted and an email address has been entered.

  10. +
  11. If this member will need to add and remove other members of the Group, check the box for “Can manage members (admin)”. This will add them as an “Admin” for the Group. Otherwise leave it unchecked, and they will be added as a “Member”.

    +
      +
    • Admins and Members have equal access to any resources shared with the Group.
    • +
    • Admins can manage Group membership - they can add, remove, or change the role of other Group members.
    • +
    +

    Screenshot of the dialog box for adding Terra Group members. The checkbox labeled "Can manage members (admin)" is highlighted.

  12. +
  13. Click ADD USER. This will take you back to the Group administration page.

    +

    Screenshot of the dialog box for adding Terra Group members. The button labeled "ADD USER" is highlighted.

  14. +
  15. The new Group member will now be shown in the list of group members, along with their role. They should now have access to anything that the Group has been given access to.

    +

    Screenshot of a Terra Group management page. The name and role of the new member is highlighted.

  16. +
+

If you need to remove members or modify their roles, you can do so at any time by clicking the teardrop button next to their name.

+

Screenshot of a Terra Group management page. The teardrop button next to one of the members is highlighted.

+
+
+
+

9.3 Find Group Email

+
+
    +
  1. Launch Terra and sign in with your Google account.

  2. +
  3. In the drop-down menu on the left, navigate to “Groups”. Click the triple bar in the top left corner to access the menu. Click the arrow next to your name to expand the menu, then click “Groups”. You can also navigate there directly with this link: https://anvil.terra.bio/#groups

    +

    Screenshot of the Terra drop-down menu.  Three items are highlighted: 1) the "hamburger" button for extending the drop-down menu, 2) the arrow next to your username, for extending the drop-down submenu, and 3) the submenu item "Groups".

  4. +
  5. Find the name of the Group, then look in the “Group Email” column to find the email address associated with the Group. Copy this email address and paste it in as the username when adding people to Billing Projects and Workspaces. This will grant everyone in the Group access to the Billing Project or Workspace.

    +

    Screenshot of the Terra Groups page.  A Group email address is highlighted.

  6. +
+
+ +
+
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/using-programming-platforms-on-anvil.html b/docs/using-programming-platforms-on-anvil.html new file mode 100644 index 0000000..69b7c78 --- /dev/null +++ b/docs/using-programming-platforms-on-anvil.html @@ -0,0 +1,619 @@ + + + + + + + Chapter 7 Using programming platforms on AnVIL | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

Chapter 7 Using programming platforms on AnVIL

+

Modules about opening, touring, and closing AnVIL platforms

+


+
+

7.1 Video overview on using Jupyter Notebooks

+

Here is a video tutorial that describes the basics of using Jupyter Notebook on AnVIL.

+ +
+

7.1.1 Objectives

+
    +
  • Start compute for your Jupyter environment
  • +
  • Create notebook to perform analysis
  • +
  • Stop compute to minimize expenses
  • +
+
+
+

7.1.2 Slides

+

The slides for this tutorial are are located here.

+
+
+
+

7.2 Launching Jupyter

+
+
+

AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select a cloud computing environment appropriate to your needs to avoid runaway costs. If you are uncertain, start with the default settings; it is fairly easy to increase your compute resources later, if needed, but harder to scale down.

+
+

Note that, in order to use Jupyter, you must have access to a Terra Workspace with permission to compute (i.e. you must be a “Writer” or “Owner” of the Workspace).

+
    +
  1. Open Terra - use a web browser to go to anvil.terra.bio

  2. +
  3. In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”.

    +

    Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted.

  4. +
  5. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>.

  6. +
  7. Click on the cloud icon on the far right to access your Cloud Environment options.

    +

    Screenshot of a Terra Workspace. The cloud icon to create a new cloud environment is highlighted.

  8. +
  9. In the dialogue box, click the “Settings” button under Jupyter.

    +

    Screenshot of the Cloud Environment Details dialogue box. The Settings button under Jupyter is highlighted.

  10. +
  11. You will see some configuration options for the Jupyter cloud environment, and a list of costs because it costs a small amount of money to use cloud computing.

    +

    Screenshot of the Jupyter Cloud Environment dialogue box. The cost to run the environment is highlighted.

  12. +
  13. Configure any settings you need for your cloud environment. If you are uncertain about what you need, the default configuration is a reasonable, cost-conservative choice. It is fairly easy to increase your compute resources later, if needed, but harder to scale down. Scroll down and click the “CREATE” button when you are satisfied with your setup.

    +

    Screenshot of the Jupyter Cloud Environment dialogue box. The "CREATE" button is highlighted.

  14. +
  15. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the Jupyter icon. It will take a few minutes for Terra to request computers and install software.

    +

    Screenshot of a Terra Workspace. The hovertext for the Jupyter icon is highlighted, and indicates that the status of the environment is "Creating".

  16. +
  17. When your environment is ready, its status will change to “Running”. Click on the “ANALYSES” tab to create or open a Jupyter Notebook.

    +

    Screenshot of a Terra Workspace. The hovertext for the Jupyter icon is highlighted, and indicates that the status of the environment is "Running".  The ANALYSES tab is also highlighted

  18. +
  19. From the ANALYSES tab, you can click on the name of an existing Jupyter Notebook to view and launch it, or click the “START” button to create a new Notebook.

    +

    Screenshot of Terra Workspace with the "ANALYSES" tab selected and highlighted.  The page shows a list of Jupyter Notebooks.  The Notebook names and the START button are highlighted.

  20. +
  21. Clicking on a Notebook name will open a static preview of the Notebook. To edit and run the Notebook, click the “OPEN” button.

    +

    Screenshot of a preview of a Jupyter Notebook in a Terra Workspace.  The "OPEN" button is highlighted.

  22. +
+
+
+
+

7.3 Video overview on using Galaxy

+

Here is a video tutorial that describes the basics of using Galaxy on AnVIL.

+ +
+

7.3.1 Objectives

+
    +
  • Start compute for your Galaxy on AnVIL
  • +
  • Run tool to quality control sequencing reads
  • +
  • Stop compute to minimize expenses
  • +
+
+
+

7.3.2 Slides

+

The slides for this tutorial are are located here.

+
+
+
+

7.4 Starting Galaxy

+
+

Note that, in order to use Galaxy, you must have access to a Terra Workspace with permission to compute (i.e. you must be a “Writer” or “Owner” of the Workspace).

+

Open your Workspace, and click on the “NOTEBOOKS” tab. Next, click on “Create a Cloud Environment for Galaxy”. You should see a popup window on the right side of the screen. Click on “NEXT” and “CREATE” to keep all settings as-is. This will take 8-10 minutes. When it is done, click “LAUNCH GALAXY”.

+

Screenshot of the Workspace Notebooks tab. The notebook tab name and the plus button that starts a cloud environment for Galaxy have been highlighted,

+
+
+ +
+

7.6 Deleting Galaxy

+
+

Once you are done with your activity, you’ll need to shut down your Galaxy cloud environment. This frees up the cloud resources for others and minimizes computing cost. The following steps will delete your work, so make sure you are completely finished at this point. Otherwise, you will have to repeat your work from the previous steps.

+

Return to AnVIL, and find the Galaxy logo that shows your cloud environment is running. Click on this logo:

+

Screenshot of the Workspace menu. The currently running Galaxy cloud environment logo on the top right of the page is highlighted.

+

Next, click on “DELETE ENVIRONMENT OPTIONS”:

+

Screenshot of the cloud environment pop out menu. The “DELETE ENVIRONMENT OPTIONS” link is highlighted.

+

Finally, select “Delete everything, including persistent disk”. Make sure you are done with the activity and then click “DELETE”.

+

Screenshot of the cloud environment pop out menu. The “Delete everything, including persistent disk” radio button has been checked and is highlighted. The “DELETE” button is highlighted.

+
+
+
+

7.7 Video overview on using RStudio

+

Here is a video tutorial that describes the basics of using RStudio on AnVIL.

+ +
+

7.7.1 Objectives

+
    +
  • Start compute for your RStudio environment
  • +
  • Tour RStudio on AnVIL
  • +
  • Stop compute to minimize expenses
  • +
+
+
+

7.7.2 Slides

+

The slides for this tutorial are are located here.

+
+
+
+

7.8 Launching RStudio

+
+
+

AnVIL is very versatile and can scale up to use very powerful cloud computers. It’s very important that you select a cloud computing environment appropriate to your needs to avoid runaway costs. If you are uncertain, start with the default settings; it is fairly easy to increase your compute resources later, if needed, but harder to scale down.

+
+

Note that, in order to use RStudio, you must have access to a Terra Workspace with permission to compute (i.e. you must be a “Writer” or “Owner” of the Workspace).

+
    +
  1. Open Terra - use a web browser to go to anvil.terra.bio

  2. +
  3. In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”.

    +

    Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted.

  4. +
  5. Click on the name of your Workspace. You should be routed to a link that looks like: https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>.

  6. +
  7. Click on the cloud icon on the far right to access your Cloud Environment options.

    +

    Screenshot of a Terra Workspace. The cloud icon to create a new cloud environment is highlighted.

  8. +
  9. In the dialogue box, click the “Settings” button under RStudio.

    +

    Screenshot of the Cloud Environment Details dialogue box. The Settings button under RStudio is highlighted.

  10. +
  11. You will see some details about the default RStudio cloud environment, and a list of costs because it costs a small amount of money to use cloud computing.

    +

    Screenshot of the RStudio Cloud Environment dialogue box. The cost to run the environment is highlighted.

  12. +
  13. If you are uncertain about what you need, the default configuration is a reasonable, cost-conservative choice. It is fairly easy to increase your compute resources later, if needed, but harder to scale down. Click the “Create” button.

    +

    Screenshot of the RStudio Cloud Environment dialogue box. The "CREATE" button is highlighted.

  14. +
  15. Otherwise, click “CUSTOMIZE” to modify the environment for your needs.

    +

    Screenshot of the RStudio Cloud Environment dialogue box. The "CUSTOMIZE" button is highlighted.

  16. +
  17. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the RStudio logo. It will take a few minutes for Terra to request computers and install software.

    +

    Screenshot of a Terra Workspace. The hovertext for the RStudio icon is highlighted, and indicates that the status of the environment is "Creating".

  18. +
  19. When your environment is ready, its status will change to “Running”. Click on the RStudio logo to open a new dialogue box that will let you launch RStudio.

    +

    Screenshot of a Terra Workspace. The hovertext for the RStudio icon is highlighted, and indicates that the status of the environment is "Running".

  20. +
  21. Click the launch icon to open RStudio. This is also where you can pause, modify, or delete your environment when needed.

    +

    Screenshot of the RStudio Environment Details dialogue box. The "Open" button is highlighted.

  22. +
  23. You should now see the RStudio interface with information about the version printed to the console.

    +

    Screenshot of the RStudio environment interface.

  24. +
+
+
+
+

7.9 Touring RStudio

+
+

Next, we will be using RStudio and the package Glimma to create interactive plots. See this vignette for more information.

+
    +
  1. The Bioconductor team has created a very useful package to programmatically interact with Terra and Google Cloud. Install the AnVIL package. It will make some steps easier as we go along.

    +

    Screenshot of the RStudio environment interface. Code has been typed in the console and is highlighted.

  2. +
  3. You can now quickly install precompiled binaries using the AnVIL package’s install() function. We will use it to install the Glimma package and the airway package. The airway package contains a SummarizedExperiment data class. This data describes an RNA-Seq experiment on four human airway smooth muscle cell lines treated with dexamethasone.

  4. +
+

{Note: for some of the packages, you will have to install packaged from the CRAN repository, using the install.packages() function. The examples will show you which install method to use.}

+
<img src="07-using_platforms_modules_files/figure-html//1BLTCaogA04bbeSD1tR1Wt-mVceQA6FHXa8FmFzIARrg_g11f12bc99af_0_56.png" alt="Screenshot of the RStudio environment interface. Code has been typed in the console and is highlighted." width="100%" />
+
    +
  1. Load the example data.

    +

    Screenshot of the RStudio environment interface. Code has been typed in the console and is highlighted.

  2. +
  3. The multidimensional scaling (MDS) plot is frequently used to explore differences in samples. When this data is MDS transformed, the first two dimensions explain the greatest variance between samples, and the amount of variance decreases monotonically with increasing dimension. The following code will launch a new window where you can interact with the MDS plot.

    +

    Screenshot of the Glimma popout showing the data in an MDS plot. All data points are blue.

  4. +
  5. Change the colour_by setting to “groups” so you can easily distinguish between groups. In this data, the “group” is the treatment.

    +

    Screenshot of the Glimma popout showing the data in an MDS plot. Data points are colored blue and orange by group. The colour by dropdown menu on the interactive plot is hightlighted.

  6. +
  7. You can download the interactive html file by clicking on “Save As”.

    +

    Screenshot of the Glimma popout showing the data in an MDS plot. The Save As menu is highlighted.

  8. +
  9. You can also download plots and other files created directly in RStudio. To download the following plot, click on “Export” and save in your preferred format to the default directory. This saves the file in your cloud environment.

    +

    Screenshot of the RStudio interface. A plot has been created. The Export menu has been highlighted.

  10. +
  11. You should see the plot in the “Files” pane.

    +

    Screenshot of the RStudio interface. A plot has been created. The saved pdf file is now visible under the "Files" pane.

  12. +
  13. Select this file and click “More” > “Export”

    +

    Screenshot of the RStudio interface. A plot has been created. The saved pdf file is now visible under the "Files" pane. The "More" and "Export" menus have been highlighted.

  14. +
  15. Select “Download” to save the file to your local machine.

    +

    Screenshot of the RStudio interface. The popup to download the selected file has been highlighted,

  16. +
+
+
+
+

7.10 Pausing RStudio

+
+
    +
  1. The right-hand side icon reminds you that you are accruing cloud computing costs. If you don’t see this icon, you may need to scroll to the right.

    +

    Screenshot of the RStudio interface. The icon on the right showing that the cloud environment is running is highlighted.

  2. +
  3. You should minimize charges when you are not performing an analysis. You can do this by clicking on the RStudio icon and selecting “Pause”. This will release the CPU and memory resources for other people to use. Note that your work will be saved in the environment and continue to accrue a very small cost. This work will be lost if the cloud environment gets deleted. If there is anything you would like to save permanently, it’s a good idea to copy it from your compute environment to another location, such as the Workspace bucket, GitHub, or your local machine, depending on your needs.

    +

    Screenshot of the RStudio menu. The pause button which stops the cloud environment is highlighted.

  4. +
+
+

You can also pause your cloud environment(s) at https://anvil.terra.bio/#clusters.

+
+
+
+
+

7.11 Deleting RStudio

+
+
    +
  1. Pausing your cloud environment only temporarily stops your work. When you are ready to delete the cloud environment, click on the RStudio icon on the right-hand side and select “Settings”. If you don’t see this icon, you may need to scroll to the right.

    +

    Screenshot of the Workspace page. The RStudio icon associated with the cloud environment is highlighted. The Settings button is also highlighted

  2. +
  3. Click on “Delete Environment”.

    +

    Screenshot of the cloud environment popout. "Delete environment" is highlighted.

  4. +
  5. If you are certain that you do not need the data and configuration on your disk, you should select “Delete everything, including persistent disk”. If there is anything you would like to save, open the compute environment and copy the file(s) from your compute environment to another location, such as the Workspace bucket, GitHub, or your local machine, depending on your needs.

    +

    Screenshot of the cloud environment popout. "Delete everything, including persistent disk" is highlighted.

  6. +
  7. Select “DELETE”.

    +

    Screenshot of the cloud environment popout. "Delete" is highlighted.

  8. +
+
+

You can also delete your cloud environment(s) and disk storage at https://anvil.terra.bio/#clusters.

+
+
+ +
+
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/why-anvil.html b/docs/why-anvil.html new file mode 100644 index 0000000..833e7b8 --- /dev/null +++ b/docs/why-anvil.html @@ -0,0 +1,425 @@ + + + + + + + Chapter 10 Why AnVIL | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

Chapter 10 Why AnVIL

+

Modules describing why AnVIL is useful for different personas.

+


+
+

10.1 Why AnVIL for Instructors?

+
+

You may be wondering if AnVIL is a good choice for your class. We feel the answer is an unequivocal YES!

+

AnVIL provides all the advantages of a cloud computing environment:

+
    +
  • Version control: All students will be using the exact same versions of programs, running on the exact same operating system, and the majority of setup can be handled for the students ahead of time. This greatly reduces time spent on setup and prevents unexpected run errors during the activities, limiting the amount of troubleshooting you have to do. As a result, classes and activities will run more smoothly and predictably.
  • +
  • Inclusivity: Cloud-computing enables all students to participate in the activity without needing to provide computers with certain specifications.
  • +
  • Experience: Cloud-computing is becoming common in today’s bioinformatics workplaces, and the classroom is a low-stress and low-stakes opportunity for students to gain experience.
  • +
+

AnVIL is purpose-built for genomic data science:

+
    +
  • Tools: Through AnVIL, students can access a wide range of tools (Galaxy, RStudio/Bioconductor, Jupyter, as well as scripted workflows) all in one place, and can easily transition between them.
  • +
  • Datasets: AnVIL provides a large and growing collection of relevant datasets with standardized organization, for easier importing and processing.
  • +
  • Authenticity: On AnVIL, students will be working in the same environment as scientists carrying out cutting edge research.
  • +
+
+ +
+
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + diff --git a/docs/workspaces.html b/docs/workspaces.html new file mode 100644 index 0000000..d4e3b84 --- /dev/null +++ b/docs/workspaces.html @@ -0,0 +1,490 @@ + + + + + + + Chapter 4 Workspaces | AnVIL CoFests! 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + +
+ +
+
+

Chapter 4 Workspaces

+

Modules about Terra Workspaces

+


+
+

4.1 Clone a Workspace

+
    +
  1. Launch Terra

  2. +
  3. Locate the Workspace you want to clone. If a Workspace has been shared with you ahead of time, it will appear in “MY WORKSPACES”. You can clone a Workspace that was shared with you to perform your own analyses. In the screenshot below, no Workspaces have been shared.

    +

    Screenshot of Terra "MY WORKSPACES" menu. The "MY WORKSPACES" tab is highlighted. No Workspaces are visible because none have been shared with the user. There is an option to create a new Workspace.

  4. +
  5. If a Workspace hasn’t been shared with you, navigate to the “FEATURED” or “PUBLIC” Workspace tabs.

    +

    Screenshot of Terra "My Workspaces" menu. The "FEATURED" tab is highlighted.

  6. +
  7. Use the search box to find the Workspace you want to clone.

    +

    Screenshot of Terra "My Workspaces" menu. The search bar is highlighted and the user has typed in the term "COVID-19". A Workspace related to COVID-19 appears in the results.

  8. +
  9. Click the teardrop button on the far right next to the Workspace you want to clone. Click “Clone”. You can also clone the Workspace from the Workspace Dashboard instead of the search results.

    +

    Screenshot of Terra "My Workspaces" menu with the Workspace that we want to clone. The teardrop button has been clicked to bring up the options. The "Clone" option from the list is highlighted. +Screenshot of the Dashboard for the Workspace that we want to clone. The teardrop button has been clicked to bring up the options. The "Clone" option from the list is highlighted.

  10. +
  11. You will see a popup box appear. Name your Workspace and select the appropriate Terra Billing Project. All activity in the Workspace will be charged to this Billing Project (regardless of who conducted it). Remember that each Workspace should have its own Billing Project.

    +

    Screenshot of the "clone workspace" Terra popup dialog box. The Workspace name and Billing Project dropdown are highlighted. Text has been filled in for the Workspace name as "Lab-member-1-workspace-2".

  12. +
  13. If you are working with protected data, you can set the Authorization Domain to limit who can be added to your Workspace. Note that the Authorization Domain cannot be changed after the Workspace is created (i.e. there is no way to make this Workspace shareable with a larger audience in the future). Workspaces by default are only visible to people you specifically share them with. Authorization domains add an extra layer of enforcement over privacy, but by nature make sharing more complicated. We recommend using Authorization Domains in cases where it is extremely important and/or legally required that the data be kept private (e.g. protected patient data, industry data). For data you would merely prefer not be shared with the world, we recommend relying on standard Workspace sharing permissions rather than Authorization Domains, as Authorization Domains can make future collaborations, publications, or other sharing complicated.

    +

    Screenshot of Terra popup dialog box for creating a new Workspace. The drop-down menu labeled "Authorization domain" is highlighted.

  14. +
  15. Click “CLONE WORKSPACE”. The new Workspace should now show up under your Workspaces.

    +

    Screenshot of Terra popup dialog box for creating a new Workspace. The "Clone Workspace" button is highlighted.

  16. +
+
+
+

4.2 Create a Workspace

+
    +
  1. Launch Terra

  2. +
  3. In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”.

    +

    Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted.

  4. +
  5. Click on the plus icon near the top of left of the page.

    +

    Screenshot of Terra Workspaces page.  The "+" is highlighted.

  6. +
  7. Name your Workspace and select the appropriate Billing Project. All activity in the Workspace will be charged to this Billing Project (regardless of who conducted it).

    +

    Screenshot of Terra dialog box for creating a new Workspace.  The text box labeled "Workspace name" and the drop-down menu labeled "Billing project" are highlighted.

  8. +
  9. If you are working with protected data, you can set the Authorization Domain to limit who can be added to your Workspace. Note that the Authorization Domain cannot be changed after the Workspace is created (i.e. there is no way to make this Workspace shareable with a larger audience in the future). Workspaces by default are only visible to people you specifically share them with. Authorization domains add an extra layer of enforcement over privacy, but by nature make sharing more complicated. We recommend using Authorization Domains in cases where it is extremely important and/or legally required that the data be kept private (e.g. protected patient data, industry data). For data you would merely prefer not be shared with the world, we recommend relying on standard Workspace sharing permissions rather than Authorization Domains, as Authorization Domains can make future collaborations, publications, or other sharing complicated.

    +

    Screenshot of Terra dialog box for creating a new Workspace.  The drop-down menu labeled "Authorization domain" is highlighted.

  10. +
  11. Click “CREATE WORKSPACE”. The new Workspace should now show up under your Workspaces.

    +

    Screenshot of Terra dialog box for creating a new Workspace.  The "Create Workspace" button is highlighted.

  12. +
+
+
+

4.3 Open a Workspace

+
    +
  1. Launch Terra

  2. +
  3. In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”.

    +

    Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted.

  4. +
  5. You are automatically directed to the “My Workspaces” tab. Here you can see any Workspaces that have been shared with you, along with your permission level.

    +

    Screenshot of Terra Workspaces page with the "My Workspaces" tab selected.  The "My Workspaces" tab and the column showing permission level are highlighted.

    +
      +
    • Reader means you can open the Workspace and see everything, but can’t do any computations or make any edits.
    • +
    • Writer means you can run computations, which will charge costs to the Workspace’s Billing Project. Writers can also make edits to the Workspace.
    • +
    • Owner is similar to Writer, but also allows you to control who can access the Workspace.
    • +
  6. +
  7. Click on the name of a Workspace to open it. Opening and viewing a Workspace does not cost anything.

    +

    Screenshot of Terra Workspaces page with the "My Workspaces" tab selected.  The name of one of the Workspaces is highlighted.

  8. +
  9. When you open a Workspace, you are directed to the Workspace Dashboard. This generally has a description of the Workspace contents, as well as some useful details about the Workspace itself.

    +

    Screenshot of a Terra Workspace.  The "Dashboard" is highlighted.

  10. +
+

From here you can navigate through the different tabs of the Workspace, and if you have sufficient permission, you can start running analyses. If you are only a Reader, you may need to “clone” (make your own copy) of the Workspace before you can start working.

+
+
+

4.4 Share a Workspace

+
    +
  1. Launch Terra

  2. +
  3. In the drop-down menu on the left, navigate to “Workspaces”. Click the triple bar in the top left corner to access the menu. Click “Workspaces”.

    +

    Screenshot of Terra drop-down menu.  The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted.

  4. +
  5. Click on the name of the Workspace to open the Workspace. Opening a Workspace does not cost anything. Certain activities in the Workspace (such as running an analysis) will charge to the Workspace’s Billing Project. Workspace management (e.g. adding and removing members, editing the description) does not cost money.

    +

    Screenshot of Terra Workspace page.  The name of a Workspace is highlighted.

  6. +
  7. Click the teardrop button (teardrop button) on the right hand side to open the Workspace management menu. Click “Share”

    +

    Screenshot of an individual Terra Workspace dashboard page.  The button for extending the Workspaces's drop-down menu is highlighted, and the menu item "Share" is highlighted.

  8. +
  9. Enter the email address of the user or Group you’d like to share the Workspace with.

    +
      +
    • If adding an individual, make sure to enter the account that they use to access AnVIL.
    • +
    • If adding a Terra Group, use the Group email address, which can be found on the Terra Group management page.
    • +
    +

    Screenshot of the dialog box for sharing a Terra Workspace.  The text box labeled "User email" is highlighted.

  10. +
  11. Choose their permission level.

    +
      +
    • Remember that all activity in the Workspace will be charged to the Workspace’s Billing Project, regardless of who conducts it, so only add members as “Writers” or “Owners” if they should be charging to the Workspace’s Billing Project.
    • +
    • “Readers” can view all parts of the Workspace but cannot make edits or run analyses (i.e. they cannot spend money). They can also clone their own copy of the Workspace where they can conduct activity on their own Billing Project.
    • +
    +

    Screenshot of the dialog box for sharing a Terra Workspace.  The drop-down menu labeled with the email of the user you are sharing with is highlighted and the menu item "Writer" is selected.

  12. +
  13. Click “Save”. The user should now be able to see the Workspace when logged in to Terra.

    +

    Screenshot of the dialog box for sharing a Terra Workspace.  The "Save" button is highlighted.

  14. +
+ +
+
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + +