This notebook contains instructions for downloading the course materials, and setting up your own computer with the software required to run the course examples, and reproduce the materials.

1 Introduction

This course material is built up from several components, and mostly written in the programming language R. R is widely used in academia and industry for statistical computing and graphics.

To use this repository and engage with the materials locally on your own machine, you will need access to the software described below. In addition, you will need an up-to-date web browser.

  • R and RStudio
    • These are necessary to run the notebooks and Shiny applications locally on your computer
  • OpenRefine
    • To engage with the data-cleaning section, you will need OpenRefine and a web browser. OPenRefine is a Java program that runs on your machine (not in the cloud) and, although it runs in a web browser, no web connection is needed.
  • bash shell/terminal
    • The bash shell is a powerful way of giving your computer instructions by typing them. It may already be available on your computer.
  • git
    • git is the version control management system we use to manage the course materials. This is an optional installation. You can obtain the source materials for this course (and contribute changes) without using git.

2 How to Get The Materials Onto Your Computer

The material for this repository is held at GitHub in a public repository. You can download the material by interacting with the GitHub repository using git, or by downloading the files as a compressed .zip archive.

Download a .zip file (click to expand)

The course materials can be downloaded as the very latest ‘in development’ version, or as a time-stamped release for a particular presentation. Whichever version is downloaded, it will be provided as a .zip archive which, when extracted, will replicate the directory structure of the GitHub repository.

This archive is sufficient to work through the course on your own computer.

To download the materials, click on one of the links below.

Using git (click to expand)

Clone this repository using one of the GUIs (graphical user interfaces) for git, or by issuing the command git clone git@github.com:sipbs-compbiol/BM432.git in a terminal window.

Cloning the repository will enable you to interact with it using git. This facilitates making changes and suggestions for the code, via git’s system of pull requests. This is the way we would expect changes to be made to the materials.

If you do not have a terminal installed on your machine, or do not know where to find a terminal, please see the instructions for bash shell installation below.

If you do not have git installed on your machine, please see the instructions for git installation below.

3 Installing Software Tools

3.1 R/RStudio

R is a powerful programming language that is widely-used for statistical data analysis and visualisation. Most of this material is written in R. It is a very versatile and capable language, and it can be used to write theses (with bookdown), and produce interactive standalone and web applications (with Shiny).

In this repository, we use R to produce the webpages and interactive applications for the course.

To interact with R, we use the RStudio Integrated Development Environment (IDE).

Please follow the instructions below for your operating system, to obtain an up-to-date version of R and RStudio on your machine.

Windows (click to expand)

To install R (the programming language), download and run this .exe file from CRAN(the Comprehensive R Archive Network). Please also install the RStudio IDE.

You should run both installers as an Administrator level account

To do so, right-click on the .exe file and select Run as Adminstrator.

The Carpentries provide a video guide to installing R and RStudio (see below).

macOS (click to expand)

To install R (the programming language), download and run this .pkg file from CRAN(the Comprehensive R Archive Network). Please also install the RStudio IDE.

The Carpentries provide a video guide to installing R and RStudio (see below).

Linux (click to expand) The binary files for your Linux distribution can be downloaded from CRAN(the Comprehensive R Archive Network). Alternatively, you may wish to use your distribution’s package manager (e.g. for Fedora run sudo dnf install R, and for Ubuntu/Debian run sudo apt-get install r-base).

3.2 OpenRefine

For the data-cleaning section of the workshop, you will need OpenRefine and an up-to-date web browser installed on your own machine.

OpenRefine is a Java program that runs on your machine, not in the cloud. Although it runs inside a web browser, no web connection is required.

Please follow the instructions below to obtain and install OpenRefine for your operating system.

Windows (click to expand)
  1. Check that you have either Firefox, Chrome, or Microsoft Edge installed and set as your default browser. NOTE: OpenRefine will run in your default browser.
  2. Download the latest version of OpenRefine from https://openrefine.org/download.html.
  3. Create a new directory callled OpenRefine
  4. Unzip the downloaded file into the OpenRefine directory (e.g. right-click on the file and select Extract...).
  5. Go to the newly-created OpenRefine directory.
  6. Launch OpenRefine by clicking openrefine.exe.

If you are using a different browser, or if OpenRefine does not automatically run in your browser, point your browser to at http://127.0.0.1:3333/ or http://localhost:3333 to use the program.

macOS (click to expand)
  1. Check that you have either Firefox, Chrome, or Microsoft Edge installed and set as your default browser. NOTE: OpenRefine will run in your default browser.
  2. Download the latest version of OpenRefine from https://openrefine.org/download.html.
  3. Create a new directory callled OpenRefine
  4. Unzip the downloaded file into the OpenRefine directory (e.g. double-click on the compressed file).
  5. Go to the newly-created OpenRefine directory.
  6. Drag the OpenRefine icon into your Applications folder
  7. Double-click (or Ctrl-click and select Open...) on the OpenRefine icon to launch the program.

If you are using a different browser, or if OpenRefine does not automatically run in your browser, point your browser to at http://127.0.0.1:3333/ or http://localhost:3333 to use the program.

OpenRefine may not run in the Safari browser.

Linux (click to expand)
  1. Check that you have either Firefox, Chrome, or Microsoft Edge installed and set as your default browser. NOTE: OpenRefine will run in your default browser.
  2. Download the latest version of OpenRefine from https://openrefine.org/download.html.
  3. Make a new directory called OpenRefine (e.g. mkdir -p OpenRefine)
  4. Unzip the downloaded file into the OpenRefine directory (e.g. unzip openrefine-linux-3.4.1.tar.gz -d OpenRefine)
  5. Go to the newly-created OpenRefine directory (e.g. cd OpenRefine)
  6. Launch OpenRefine by entering ./refine into the terminal, while in the OpenRefine directory

If you are using a different browser, or if OpenRefine does not automatically run in your browser, point your browser to at http://127.0.0.1:3333/ or http://localhost:3333 to use the program.

3.3 bash

The bash shell is a powerful way of giving your computer instructions by typing them. It may already be available on your computer, depending on which operating system you use.

Please follow the instructions below to obtain a bash terminal on your operating system.

Windows (click to expand)
  1. Download the git for Windows installer
  2. Run the installer, and follow the steps below.
  3. Click on Next to move through the Information, Location, Components and Start Menu screens, without changing any options.
  4. From the dropdown menu on the next screen, select Use the Nano efitor by default and click on Next
  5. On the page that says Adjusting the name of the initial branch in new repositories, ensure that Let Git decide is selected.
  6. Ensure that Git from the command line and also from 3rd-party software is selected and click on Next.
  7. Ensure that Use the native Windows Secure Channel Library is selected and click on Next.
  8. Ensure that Checkout Windows-style, commit Unix-style line endings is selected and click on Next.
  9. Ensure that Use Windows' default console window is selected and click on Next.
  10. Ensure that Default (fast-forward or merge) is selected and click Next.
  11. Ensure that Git Credential Manager Core is selected and click on Next.
  12. Ensure that Enable file system caching is selected and click on Next.
  13. Click on Install.
  14. Click on Finish or Next.
  15. If your HOME environment variable is not set (or you don’t know what this is):
  16. Open command prompt (Open Start Menu then type cmd and press Enter).
  17. Type the following line into the command prompt window exactly as shown: setx HOME "%USERPROFILE%".
  18. Press Enter, you should see SUCCESS: Specified value was saved.
  19. Quit command prompt by typing exit then pressing Enter.

This will provide you with both git and bash in the Git Bash program, from your Start Menu.

The Carpentries provide a video guide to installing Git Bash (see below).

macOS (click to expand)

On some macOS versions, bash is already the default shell, and you will not need to install anything. Even if this is not the case for you, bash is available in all versions, so there is no need to install any new software.

To access bash, start the Terminal program (this can be found in /Applications/Utilities). The video tutorial below will show you how to open the Terminal program. It can be useful to have this program available in your dock.

To check if your default shell is bash type echo $SHELL in the Terminal and press the Return key. If the message printed does not end with /bash then your default is something else and you can run bash by typing bash and pressing Enter.

The Carpentries provide a video guide to installing bash, git and nano on your own machine (see below).

Linux (click to expand)

On Linux, bash is usually the default shell, and you will not need to install anything.

To check if your default shell is bash type echo $SHELL in a terminal window and press the Return key. If the message printed does not end with /bash then your default is something else and you can run bash by typing bash and pressing Enter.