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.

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 
cran_pkg <- c("BiocManager", "bookdown", "dplyr", "ecodist", "ggplot2", 
              "gridExtra", "kableExtra",  "knitr", "scales", "vegan", "matrixStats")
bioc_pkg <- c("yulab.utils","ggtree","ANCOMBC", "ape", "DESeq2", "DirichletMultinomial", "mia", "miaViz", "miaSim")
github_pkg <- c("miaTime")


# Get those packages that are already installed
cran_pkg_already_installed <- cran_pkg[ cran_pkg %in% installed.packages() ]
bioc_pkg_already_installed <- bioc_pkg[ bioc_pkg %in% installed.packages() ]
github_pkg_already_installed <- github_pkg[ github_pkg %in% installed.packages() ]

# Get those packages that need to be installed
cran_pkg_to_be_installed <- setdiff(cran_pkg, cran_pkg_already_installed)
bioc_pkg_to_be_installed <- setdiff(bioc_pkg, bioc_pkg_already_installed)
github_pkg_to_be_installed <- setdiff(github_pkg, github_pkg_already_installed)

# Reorders bioc packages, so that mia and miaViz are first
bioc_pkg <- c(bioc_pkg[ bioc_pkg %in% c("mia", "miaViz") ], 
              bioc_pkg[ !bioc_pkg %in% c("mia", "miaViz") ] ) 

# Combine to one vector
packages <- c(bioc_pkg, cran_pkg)
packages_to_install <- c( bioc_pkg_to_be_installed, cran_pkg_to_be_installed, cran_pkg_to_be_installed)
# If there are packages that need to be installed, install them 
if( length(packages_to_install) ) {
   BiocManager::install(packages_to_install)
}

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.
loaded <- sapply(packages, require, character.only = TRUE)
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