Import and analyse ASV portal data with R

This tutorial walks through the main steps needed to integrate ASV portal data in R and explore biodiversity patterns. As a case study, we examine microbial diversity along the Baltic Sea salinity gradient using data from two published studies (see references below).

In the first study, 21 surface-water samples collected during a research cruise in summer 2013 were analyzed using 16S and 18S rRNA gene metabarcoding. In the second study, 331 surface samples (16S) and 333 surface samples (18S) were sequenced from 22 stations over a 13-month period (2019–2020).

Sections 1–6 focus on the 16S data. Because the same PCR primers were used in both datasets, many ASVs are shared, enabling direct integration of the data even at the ASV level. Section 7 examines the 18S data and demonstrates how datasets can be co-analyzed even when different primers were used and no ASVs overlap.

  1. Set up the environment — Access the workshop RStudio environment (or run locally)
  2. Prepare data — Load, merge and aggregate data sourced from the ASV portal
  3. Map samples — Explore sampling coverage across season and salinity
  4. Community structure — Bray–Curtis distances and PCoA across samples
  5. Taxonomic composition — Taxonomic barplots across salinity basins
  6. Predict environmental parameters — Random Forest prediction from community composition
  7. Analyse 18S data — Genus-level Bray–Curtis and PCoA on 18S data

Get started →


References

Hu, Y.O.O., Karlson, B., Charvet, S., Andersson, A.F. (2016). Diversity of pico- to mesoplankton along the 2000 km salinity gradient of the Baltic Sea. Frontiers in Microbiology, 7:679: 16S rRNA, 18S rDNA

Latz, M.A.C., Andersson, A., Brugel, S., Hedblom, M., Jurdzinski, K., Karlson, B., Lindh, M., Lycken, J., Torstenson, A., Andersson, A.F. (2024). A comprehensive dataset on spatiotemporal variation of microbial plankton communities in the Baltic Sea. Scientific Data, 11:18: 16S rRNA, 18S rDNA