1. Set up the environment

Set up the R environment used in the tutorial, either via the workshop cloud environment or locally on your laptop.

Option B (fallback): Run RStudio locally on your laptop

Our cloud environment is being tested for the first time. If needed, you can run the tutorial locally.

You will need to install:

  1. R
  2. RStudio
  3. the following R packages:
    • remotes
    • asvoccur
    • ranger
    • vegan
    • ape
    • rworldmap
    • data.table

To install and load the required R packages:

# Install from CRAN
install.packages(c(
  "remotes",
  "ranger",
  "vegan",
  "ape",
  "rworldmap",
  "data.table"
))

# Install from GitHub
remotes::install_github("biodiversitydata-se/asvoccur")

# Load
library(asvoccur)
library(ranger)
library(vegan)
library(ape)
library(rworldmap)
library(data.table)

# Confirm version
packageVersion("asvoccur")  # Should say 1.1.1

Download example data from the ASV portal

In this option, example data is downloaded directly from the ASV portal.

  1. Go to the ASV portal start page.

    Click DOWNLOAD. If you are not already logged in, you will be redirected to the login page.

  2. If you do not already have an account, either:

    • sign in with a Google or GitHub account, or
    • create a new SBDI account.
  3. On the Download page, under Download link, download the following datasets (note the underlined project IDs to distinguish similar titles):

    • PRJEB55296-16S
    • KTH-2013-Baltic-16S
    • PRJEB55296-18S
    • KTH-2013-Baltic-18S
  4. After downloading, organise the data locally into two sub-folders:

    course-data/
    ├── 16S/
    │   ├── PRJEB55296-16S.zip
    │   └── KTH-2013-Baltic-16S.zip
    └── 18S/
        ├── PRJEB55296-18S.zip
        └── KTH-2013-Baltic-18S.zip
  5. Set the path to the 16S data folder in R and confirm access:

       data_path <- "local/path/to/course-data/16S"
       list.files(data_path)

If “KTH-2013-Baltic-16S.zip” and “PRJEB55296-16S.zip” are listed, you are ready to proceed.

Overview · Next →