Skip to content

Latest commit

 

History

History
60 lines (35 loc) · 4.19 KB

README.md

File metadata and controls

60 lines (35 loc) · 4.19 KB

Software installation

We ask you come prepared to class with a laptop on which you can participate in coding activities. Please follow the instructions below to install the required software for this course (all programs are freely available for academic use). We'll use the other files in this directory to test the software together in class. The tools you'll need include:

Once you have the above software installed, you should be able to run the example Python and R Jupyter notebooks after you open this repository using a Remote Development Container within VSCode.

VSCode Text Editor

We will use VSCode as the source code and text editor for this class. Install VSCode on your computer and view the introductory video here before the first class to familiarize yourself with the user interface.

We will use the following features in VSCode as part of this class:

  1. Work with Git and GitHub for version control (see more below).
  2. Edit Markdown files and preview rendered versions.
  3. Write Python and R code in native Jupyter notebooks.
  4. Use the integrated terminal.
  5. Connect to and work on remote hosts such as the Fred Hutch Rhino computing cluster.

Docker

We need Docker for creating reproducible environments for running programs written in Python or R. You can install Docker following links here. Ignore steps 2 and 3 about the WSL 2 for now.

VSCode Remote Development Extension Pack

You can follow instructions here to install the extension pack.

Git

You can follow the instructions here to install Git. Use the default settings in the installer.

Testing Software Installation

Once you have installed the requisite software, then you should be able to perfom the following steps:

  1. Open VS Code

  2. "Reopen in container" the TFCB Docker container. This will install the container.

  3. After installing the container (takes a minute), then you should be able to run the test code (hint: pick the right kernel for R, python etc.)

R

R in vscode is run via jupyter. Ignore the next bit if R seems to be working. See: https://code.visualstudio.com/docs/languages/r

  1. Open terminal in vscode inside the dev container. Check your environment, which is located left of your current path and likely says (base).

  2. Check which conda you are using by typing which conda and conda --version into terminal. These should return something like /opt/conda/bin/conda and conda 4.12.0 respectively.

  3. Check your conda environments with conda env list. We will use the tidy env for R, which can be activate with conda activate tidy.

  4. Inside the tidy environment you can run R directly from the commandline, which is helpful for installing new packages. Of note, the devcontainer already comes with most things you need and adding new packages can create conflicts, so be careful installing packages that you don't overwrite dependencies or install anything risky from a 3rd party developer. For now lets just determine which R we are running, which I will let you figure out using some of the above commands (see step 2). What happens if you run these commands outside the conda environment?

  5. Add your R path to the Rterm in the dev container settings. Your R path should now appear under available kernels, which you can select to run the R test notebook.