Setup

Complete these steps before the fourth episode. If you run into problems, please open an issue on the GitHub repository or ask your instructor.

Software

R and RStudio

This lesson requires R ≥ 4.2 and RStudio ≥ 2023.06 (or another IDE of your choice).

R packages

Install the required packages by running the following in your R console:

# Use this code to install the custom R package r-dwc-writer
remotes::install_github("pieterprovoost/r-dwca-writer")

install.packages(c(
  "tidyverse",
  "here",
  "dplyr",
  "readxl",
  "rmarkdown",
  "lubridate",
  "tidyr",
  "purrr",
  "leaflet",
  "Biostrings",
  "dwcawriter"
))

Verify installation:

# Replace with the actual packages needed for this lesson
library(tidyverse)
library(here)
library(dplyr)
library(readxl)
library(rmarkdown)
library(lubridate)
library(tidyr)
library(purrr)
library(leaflet)
library(Biostrings)
library(dwcawriter)

cat("All packages loaded successfully.\n")

Example data

The dataset we will work with is an eDNA metabarcoding dataset, obtained from eDNA Expeditions. This example is adapted from training resources developed for OBON in 2024, created by Pieter Provoost and can be found in https://github.com/iobis/obon-2024-dna-training.

You can either download the dataset files directly from https://github.com/iobis/edna-training-beginner-track/tree/main/data, or use the following code to download them:

# Replace with the actual data download for this lesson
download.file(
  url = "https://github.com/iobis/edna-training-beginner-track/tree/main/data",   # replace with actual URL
  destfile = here("data", "edna-data.csv")
)
NoteAbout the example dataset

There are six files in the \data folder, four output files from the DNA pipeline (samples.csv, seqtab.csv, sequences.fasta, and taxonomy.txt), a data dictionary file we have created to provide definitions of each column in the samples file, and a methods.txt file which provides free text you may commonly encounter that contains important metadata and information we will record in the DNA Derived Data extension table.

Verify your setup

Run the following chunk to confirm everything is working before Episode 1:

# Replace with a meaningful check for this lesson
cat("R version:", R.version$major, ".", R.version$minor, "\n", sep = "")
# add further checks as needed

If all checks pass, you are ready to begin Episode 4.