General information

Field Proposed specification
Course code MLB7052.LT
Course title Kaasaegsed meetodid molekulaarses ökoloogias / Modern Molecular Methods in Ecology
Semester 2026/2027 autumn
Language Estonian teaching; English reading and software documentation
Lecturer Peeter Laas
Assessment Graded: A, B, C, D, E, F
Intended audience Advanced undergraduate and master’s students in molecular ecology, biology, biotechnology, and related fields

Empty folder → 35 slides → shinyapps.io · 14.9°C in Tartu at render time

Course purpose

  1. understand the molecular principles behind DNA, RNA, proteins, genomes, gene expression, and molecular phenotypes;
  2. understand the strengths, weaknesses, and appropriate uses of major molecular methods in ecology and evolutionary biology;
  3. develop practical competence in sample design, nucleic-acid extraction, quantification, PCR, electrophoresis, sequencing, and basic computational analysis;
  4. learn to connect molecular observations with ecological interactions, population structure, phylogeny, and environmental change;
  5. develop reproducible habits for controls, contamination prevention, metadata, quality assessment, and scientific reporting;
  6. design an end-to-end molecular study and defend the limitations of the proposed inference.

The main aim

The course develops a working understanding of molecular biology and its use in ecological and evolutionary research. Students move from the molecular basis of information to a defensible study design:

biological question -> sample -> molecule -> assay -> sequence or measurement -> computation -> inference

The course

Course content

Contact

Mõned kasulikud raamatud

Tähtis

email: peeter.laas@ut.ee; peeter.laas@taltech.ee; peeter.laas@gmail.com

Everything for the course — schedule, slides, seminar register, attendance — lives at peeterlaas.github.io/MolEcoMeth.

Live data in slides — weather example

Slides fetch real data at render time. No manual updates ever.

library(httr2)

resp <- request("https://api.open-meteo.com/v1/forecast") |>
  req_url_query(
    latitude  = 58.38,   # Tartu
    longitude = 26.72,
    current   = "temperature_2m,wind_speed_10m",
    timezone  = "Europe/Tallinn"
  ) |>
  req_perform() |>
  resp_body_json()

temp <- resp$current$temperature_2m
wind <- resp$current$wind_speed_10m

Then in slide text:

Temperature in Tartu right now: **14.9°C**, wind 15.5 km/h

This title slide already does this — look at the subtitle line.

Practical exercises

Getting the dataset

The EEA bathing water dataset (1990–2024) is 99 MB — too large to embed in these slides.

Scan to download:

bw_assessment_eea_datahub_1990_2024_data.csv 672,630 rows · 13 columns · all European bathing waters

Demo — downloadable table

Demo — interactive map

Exercise 1 — Explore the data (15 min)

library(readr)
library(dplyr)

bw <- read_csv("bw_assessment_eea_datahub_1990_2024_data.csv",
               show_col_types = FALSE)

glimpse(bw)
count(bw, countryCode, sort = TRUE)
count(bw, quality)

Answer from the output, not from memory:

  • how many bathing waters does Estonia report, and over which years?
  • which quality categories exist, and how are they distributed?
  • which columns would you need to put a site on a map?

Exercise 2 — Filter and summarise (15 min)

bw_ee <- bw |>
  filter(countryCode == "EE", season == 2024)

bw_ee |>
  count(quality) |>
  mutate(share = round(100 * n / sum(n), 1)) |>
  arrange(desc(n))

Then plot how the ratings have moved over time:

library(ggplot2)

bw |>
  filter(countryCode == "EE") |>
  count(season, quality) |>
  ggplot(aes(season, n, fill = quality)) +
  geom_col(position = "fill") +
  labs(x = NULL, y = "share of sites", fill = NULL)

Exercise 3 — A searchable, downloadable table (15 min)

A large data frame can be made browsable and downloadable:

library(DT)

bw_ee |>
  select(bathingWaterName, bathingWaterType,
         lon, lat, quality, season) |>
  datatable(
    extensions = "Buttons",
    options = list(
      dom       = "Bfrtip",
      buttons   = c("csv", "excel"),
      pageLength = 15
    ),
    filter    = "top",      # per-column filter boxes
    rownames  = FALSE
  )

This renders as an interactive HTML table with search, sort, and download — it works in any self-contained .html and in a Shiny app.

Exercise 4 — Build the report (25 min)

Put the three previous steps into one report.qmd:

---
title: "Estonian bathing waters, 1990-2024"
format:
  html:
    toc: true
    embed-resources: true
execute:
  echo: false
---
  1. read the data;
  2. filter to Estonia;
  3. show the searchable table;
  4. plot the quality trend as a stacked bar chart;
  5. quarto render report.qmd.

The output is a single HTML file you can email, and the .qmd beside it says exactly how every number in it was produced.

Key takeaways

  • _quarto.yml = set your identity and style once, reuse forever
  • Live data at render time — slides and reports that never go stale
  • DT turns a 600,000-row table into something searchable and downloadable
  • leaflet puts sampling sites on a map in a dozen lines
  • Self-contained HTML travels as one file — no folder of assets to lose
  • Commit first — you cannot break what is already in git

Resources

Learning:

R packages:

  • install.packages("DT")
  • install.packages("httr2")
  • install.packages("leaflet")

Thank you

peeter.laas@ut.ee