Rebecca Ansorge
Rebecca Ansorge Researcher on metagenomics at the Quadram Institute Bioscience, Norwich.

Metabarcoding workshop (day 3)

Metabarcoding workshop (day 3)

From the Command line to R

In your RStudio you will need two libraries:

  • PhyloSeq
  • ggplot2

Installing packages

:bulb: If you have PhyloSeq installed, skip this section.

The repository for bioinformatics libraries for R is called Bioconductor (we can think of it as the bioconda channel for the Miniconda package manager.). To install the Bioconductor package manager we can run this command:

if (!requireNamespace("BiocManager", quietly = TRUE))
BiocManager::install(version = "3.13")

To install one or more (bioconductor) package:

BiocManager::install( c("phyloseq", "microbiome") )

Phyloseq object

Phyloseq is a great package that brings to life a single object that integrates:

  • Metadata (mapping file)
  • A feature table (OTU table)
  • The taxonomy assignments
  • The feature tree

A single PhyloSeq object contains our whole metabarcoding experiment!

As different tools will generate different files, a great source of information is the importing phyloseq data tutorial.

In our case we have two options:

  • Importing data from the Qiime 2 artifacts
  • Using the PhyloSeq object automatically generated by Dadaist2

A preliminary exploration of the phyloseq object

Once that we have our PhyloSeq object, we can use the many functions that PhyloSeq (and other PhyloSeq-based libraries, like microbiome) provide.

Here we provide an example based on the dataset analysed in the workshop (“MiSeq SOP”), available as an R markdown script made by Rebecca Ansorge.

:bulb: If you need the phyloseq object, you can download it from here.