2 Checklist: preparing for the course
2.1 Questionnaire on the background of participants
Fill in the anonymous questionnaire.
This information will help us to understand the background of the participants better, and adjust teaching accordingly.
2.2 Installing the required R/Bioconductor packages
Install the required software in advance.
RStudio; choose “Rstudio Desktop” to download the latest version. For further details, check the Rstudio home page.
Install and load the required R packages (see below)
After a successful installation you can start with the case study examples in the training material
2.2.1 Required R/Bioconductor packages
This section shows how to install and load all required packages into the R session, if needed. Only uninstalled packages are installed.
# List of packages that we need from cran and bioc
<- c("BiocManager", "bookdown", "dplyr", "ecodist", "ggplot2",
cran_pkg "gridExtra", "kableExtra", "knitr", "scales", "vegan", "matrixStats")
<- c("yulab.utils","ggtree","ANCOMBC", "ape", "DESeq2", "DirichletMultinomial", "mia", "miaViz", "miaSim")
bioc_pkg <- c("miaTime")
github_pkg
# Get those packages that are already installed
<- cran_pkg[ cran_pkg %in% installed.packages() ]
cran_pkg_already_installed <- bioc_pkg[ bioc_pkg %in% installed.packages() ]
bioc_pkg_already_installed <- github_pkg[ github_pkg %in% installed.packages() ]
github_pkg_already_installed
# Get those packages that need to be installed
<- setdiff(cran_pkg, cran_pkg_already_installed)
cran_pkg_to_be_installed <- setdiff(bioc_pkg, bioc_pkg_already_installed)
bioc_pkg_to_be_installed <- setdiff(github_pkg, github_pkg_already_installed)
github_pkg_to_be_installed
# Reorders bioc packages, so that mia and miaViz are first
<- c(bioc_pkg[ bioc_pkg %in% c("mia", "miaViz") ],
bioc_pkg !bioc_pkg %in% c("mia", "miaViz") ] )
bioc_pkg[
# Combine to one vector
<- c(bioc_pkg, cran_pkg)
packages <- c( bioc_pkg_to_be_installed, cran_pkg_to_be_installed, cran_pkg_to_be_installed) packages_to_install
# If there are packages that need to be installed, install them
if( length(packages_to_install) ) {
::install(packages_to_install)
BiocManager }
Now all required packages are installed, so let’s load them into the session. Some function names occur in multiple packages. That is why miaverse’s packages mia and miaViz are prioritized. Packages that are loaded first have higher priority.
# Loading all packages into session. Returns true if package was successfully loaded.
<- sapply(packages, require, character.only = TRUE)
loaded as.data.frame(loaded)
2.3 Reading and support
View the short online videos on R/Bioconductor microbiome data science tools.
Check the Appendix chapter of the OMA book. In particular, read Chapter 15.3 on reproducible reporting.
You can run the workflows by simply copy-pasting the examples. For further, advanced material, you can test and modify further examples from the book, and apply these techniques to your own data.
Online support on installation and other matters, join us at Gitter