Skip to content

Commit

Permalink
Merge pull request #224 from jhudsl/update-student-stuff
Browse files Browse the repository at this point in the history
Updates to student guide
  • Loading branch information
avahoffman authored Aug 27, 2024
2 parents 0b6e17f + 63b4f4e commit acd40d2
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 34 deletions.
1 change: 0 additions & 1 deletion 02-chapter_of_course.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,3 @@ You should print out session info when you have code for [reproducibility purpos
```{r}
devtools::session_info()
```

1 change: 1 addition & 0 deletions 07-using_platforms_modules.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ cow::borrow_chapter(
repo_name = "jhudsl/AnVIL_Template"
)
```
::::

## Launching Jupyter

Expand Down
20 changes: 10 additions & 10 deletions child/_child_galaxy_delete.Rmd
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@


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:
Return to AnVIL, and find the Galaxy logo that shows your cloud environment is running. Click on this logo.

```{r, echo=FALSE, fig.alt='Screenshot of the Workspace menu. The currently running Galaxy cloud environment logo on the top right of the page is highlighted.'}
ottrpal::include_slide("https://docs.google.com/presentation/d/182AOzMaiyrreinnsRX2VhH7YsVgvAp4xtIB_7Mzmk6I/edit#slide=id.gf243efded1_0_134")
```{r, echo=FALSE, fig.alt='Screenshot of the Workspace menu. The currently running Galaxy cloud environment logo on the right sidebar is highlighted.'}
ottrpal::include_slide("https://docs.google.com/presentation/d/1yYCg4cPVBMMDghT17B4XzROieqyMH99Ex9nMm_Scm9Q/edit#slide=id.ge20e585f11_0_248")
```

Next, click on “DELETE ENVIRONMENT OPTIONS”:
Next, click on "Settings". Click on "Delete Environment".

```{r, echo=FALSE, fig.alt='Screenshot of the cloud environment pop out menu. The “DELETE ENVIRONMENT OPTIONS” link is highlighted.'}
ottrpal::include_slide("https://docs.google.com/presentation/d/182AOzMaiyrreinnsRX2VhH7YsVgvAp4xtIB_7Mzmk6I/edit#slide=id.gf243efded1_0_140")
```{r, echo=FALSE, fig.alt='Screenshot of the cloud environment pop out menu. The "Delete Environment" button is highlighted.'}
ottrpal::include_slide("https://docs.google.com/presentation/d/1yYCg4cPVBMMDghT17B4XzROieqyMH99Ex9nMm_Scm9Q/edit#slide=id.ge20e585f11_0_256")
```

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

```{r, echo=FALSE, fig.alt='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.'}
ottrpal::include_slide("https://docs.google.com/presentation/d/182AOzMaiyrreinnsRX2VhH7YsVgvAp4xtIB_7Mzmk6I/edit#slide=id.gf243efded1_0_146")
```{r, echo=FALSE, fig.alt='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.'}
ottrpal::include_slide("https://docs.google.com/presentation/d/1UIfBMQcujMzyNTyIiMXQ6eU0DdWHmI9QUtseGylg6Ms/edit#slide=id.g117989bd49c_0_0")
```
1 change: 0 additions & 1 deletion child/_child_galaxy_navigate.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ ottrpal::include_slide("https://docs.google.com/presentation/d/182AOzMaiyrreinns
```

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.

17 changes: 14 additions & 3 deletions child/_child_galaxy_start.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
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”.
Open your Workspace, and click on the “Environment configuration” button, a cloud icon on the righthand side of the screen.

```{r, echo=FALSE, fig.alt='Screenshot of the Workspace Notebooks tab. The notebook tab name and the plus button that starts a cloud environment for Galaxy have been highlighted,'}
ottrpal::include_slide("https://docs.google.com/presentation/d/182AOzMaiyrreinnsRX2VhH7YsVgvAp4xtIB_7Mzmk6I/edit#slide=id.ged15532ded_0_788")
```{r, echo=FALSE, fig.alt='Screenshot of the Workspace that points to the Environment configuration button, an icon of a cloud with a lightning bolt.'}
ottrpal::include_slide("https://docs.google.com/presentation/d/1yYCg4cPVBMMDghT17B4XzROieqyMH99Ex9nMm_Scm9Q/edit#slide=id.ge20e585f11_0_9")
```

Under Galaxy, click on “Create new Environment”. Click on “Next” and “Create” to keep all settings as-is. This will take 8-10 minutes.

```{r, echo=FALSE, fig.alt='The button that starts a cloud environment for Galaxy has been highlighted,'}
ottrpal::include_slide("https://docs.google.com/presentation/d/1yYCg4cPVBMMDghT17B4XzROieqyMH99Ex9nMm_Scm9Q/edit#slide=id.ge1182914a6_0_36")
```

Click on "Open Galaxy" when the environment is ready.

```{r, echo=FALSE, fig.alt='The Open Galaxy button is highlighted in the ready environment popup.'}
ottrpal::include_slide("https://docs.google.com/presentation/d/1yYCg4cPVBMMDghT17B4XzROieqyMH99Ex9nMm_Scm9Q/edit#slide=id.ge1182914a6_0_57")
```
4 changes: 2 additions & 2 deletions child/_child_galaxy_video.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

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

<iframe src="https://drive.google.com/file/d/16QEY8x-gBsUkKEeO3w_H-I4SLIBPloXd/preview" width="640" height="360" allow="autoplay"></iframe>
<iframe width="560" height="315" src="https://youtu.be/9TEVu7QobOo?si=tLFXNe951vVJV4iN" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

### Objectives

Expand All @@ -11,6 +11,6 @@ Here is a video tutorial that describes the basics of using Galaxy on AnVIL.

### Slides

The slides for this tutorial are are located [here](https://docs.google.com/presentation/d/1yYCg4cPVBMMDghT17B4XzROieqyMH99Ex9nMm_Scm9Q).
The slides for this tutorial are are located [here](https://docs.google.com/presentation/d/1yYCg4cPVBMMDghT17B4XzROieqyMH99Ex9nMm_Scm9Q/edit?usp=sharing).


23 changes: 8 additions & 15 deletions child/_child_student_create_account.Rmd
Original file line number Diff line number Diff line change
@@ -1,39 +1,32 @@
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.
In order to run your analyses, you will use the [AnVIL cloud computing platform](https://anvilproject.org/). 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.
- Behind the scenes, AnVIL relies on Google Cloud Platform to provide computing infrastructure. Basically, AnVIL lets you "rent" computers through the internet. The analysis is run on the rented computer. 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 so you can use them right away.
:::

### 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).
A Google account usually looks like "`[email protected]`". Alternatively, you can enable Google for an existing non-Gmail email address using [these instructions](https://support.terra.bio/hc/en-us/articles/360029186611).

- 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).
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).

### 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/).


```{r, echo=FALSE, fig.alt='Screenshot of the AnVIL home page. The section descring Terra is highlighted.'}
ottrpal::include_slide("https://docs.google.com/presentation/d/1-PVlDAzmDncjcCHIy9ZyR3ROyPpfjrg46LhEQopDc1Q/edit#slide=id.g22c9add987a_0_5")
```

Open Terra, and you should be prompted to sign in with your Google account.
You can access Terra by going to [`anvil.terra.bio`](https://anvil.terra.bio/). 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. `[email protected]`), so they can give you access to everything you need.
Make sure your instructor has your Google account username (e.g. `[email protected]`), 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
- If you have multiple Google accounts, make sure you give them the username that you will be using to log in to `anvil.terra.bio`.

:::{.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.
Expand Down
59 changes: 59 additions & 0 deletions child/_child_student_workspace_clone_direct.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
```{r, include = FALSE}
if (!exists("AnVIL_module_settings")) {
AnVIL_module_settings <- list()
}
if (is.null(AnVIL_module_settings$workspace_name)) {
AnVIL_module_settings$workspace_name = "specified by your instructor"
AnVIL_module_settings$clone_name = "ExampleWorkspace_Firstname_Lastname"
} else {
AnVIL_module_settings$clone_name = paste0(AnVIL_module_settings$workspace_name, "_Firstname_Lastname")
}
if (is.null(AnVIL_module_settings$workspace_link)) {
AnVIL_module_settings$workspace_link = "ask your instructor"
}
if (is.null(AnVIL_module_settings$billing_project)) {
AnVIL_module_settings$billing_project = "provided by your instructor"
}
```

:::{.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. Go to the Workspace by clicking this link: `r AnVIL_module_settings$workspace_link`.

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". See the screenshot below on a different Workspace:

```{r, echo=FALSE, out.width = '100%', fig.alt='Screenshot showing the teardrop button. The button has been clicked revealing the "clone" option. The Clone option and the teardrop button are highlighted.'}
ottrpal::include_slide("https://docs.google.com/presentation/d/1a5Da6qX9BG7Q_6XAz7MvlDyWTvssm2hWwuo1WFJXb_0/edit#slide=id.g117abafa453_0_577")
```

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, \"`r AnVIL_module_settings$clone_name`\".
a. Select the Billing Project `r AnVIL_module_settings$billing_project`.
a. Leave the bottom two boxes as-is.
a. Click “CLONE WORKSPACE”.

See the screenshot below on a different Workspace:

```{r, echo=FALSE, out.width = '100%', fig.alt='Screenshot showing the "clone a workspace" popout. The Workspace name, Billing Project, and Clone Workspace button have been filled in and highlighted.'}
ottrpal::include_slide("https://docs.google.com/presentation/d/1a5Da6qX9BG7Q_6XAz7MvlDyWTvssm2hWwuo1WFJXb_0/edit#slide=id.g17144dbacd0_0_352")
```

1. The new Workspace should now show up under https://anvil.terra.bio/#workspaces. This is your own copy of the Workspace to work in.

```{r, include = FALSE}
AnVIL_module_settings <<- NULL
```
4 changes: 2 additions & 2 deletions child/_child_terra_billing_project_create.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
ottrpal::include_slide("https://docs.google.com/presentation/d/1POwxqv4p6AfPHJlN9VNq0TaT44fA2RAFSpIERIMHdWU/edit#slide=id.g116f8d759be_0_2")
```

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.
1. On the Billing page, click the "+ CREATE" button to create a new Billing Project. Select GCP Billing Project (Google's Platform). If prompted, select the Google account to use and give Terra permission to manage Google Cloud Platform billing accounts.

```{r, echo=FALSE, out.width = '100%', fig.alt='Screenshot of the Terra Billing Page. The "plus" button next to "Billing Projects" is highlighted.'}
ottrpal::include_slide("https://docs.google.com/presentation/d/1POwxqv4p6AfPHJlN9VNq0TaT44fA2RAFSpIERIMHdWU/edit#slide=id.g116f8d759be_0_149")
Expand All @@ -28,7 +28,7 @@ ottrpal::include_slide("https://docs.google.com/presentation/d/1POwxqv4p6AfPHJlN
ottrpal::include_slide("https://docs.google.com/presentation/d/1POwxqv4p6AfPHJlN9VNq0TaT44fA2RAFSpIERIMHdWU/edit#slide=id.g2105956e909_0_0")
```

1. Click "CREATE BILLING PROJECT".
1. Click "Create".

```{r, echo=FALSE, out.width = '100%', fig.alt='Screenshot of the Terra Add Billing Project dialog box. The button labeled "CREATE BILLING PROJECT" is highlighted.'}
ottrpal::include_slide("https://docs.google.com/presentation/d/1POwxqv4p6AfPHJlN9VNq0TaT44fA2RAFSpIERIMHdWU/edit#slide=id.g116f8d759be_0_438")
Expand Down

0 comments on commit acd40d2

Please sign in to comment.