Chapter 3 Getting started
3.1 Checklist (before the workshop)
Install the following software in advance in order to avoid unnecessary delays and leaving more time for the workshop contents.
RStudio; choose “Rstudio Desktop” to download the latest version. Optional but preferred. For further details, check the Rstudio home page.
For Windows users: Rtools; Follow the instructions to install the toolkit. This might be required to compile some of the packages required on this course.
Install and load the required R packages
3.2 Support and resources
For online support on installation and other matters, you can join us at:
- Users: miaverse Gitter channel
- Developers: Bioconductor Slack #microbiomeexperiment channel (ask for an invitation)
3.3 Installing and loading the required R packages
This section shows how to install and load all required packages into the R session. Only uninstalled packages are installed.
if (!requireNamespace("BiocManager")) {
install.packages("BiocManager")
}
# List of packages that we need from cran and bioc
<- c("ggplot2", "pheatmap", "stringr", "igraph", "ANCOMBC",
packages "microbiome", "httpuv", "microbiomeDataSets", "mia", "caret", "ranger",
"dplyr", "miaViz", "knitr", "kableExtra", "vegan", "ecodist", "biclust",
"patchwork", "pdp", "MLmetrics", "precrec","reticulate", "MOFA2")
The following script tries to load all required packages, and if they are not available, installs them.
<- packages[!(packages %in% installed.packages()[, "Package"])]
new.pkgs
if (length(new.pkgs)) {
::install(new.pkgs, ask=T)
BiocManager
}
sapply(packages, require, character.only = TRUE)
## ggplot2 pheatmap stringr igraph
## TRUE TRUE TRUE TRUE
## ANCOMBC microbiome httpuv microbiomeDataSets
## TRUE TRUE TRUE TRUE
## mia caret ranger dplyr
## TRUE TRUE TRUE TRUE
## miaViz knitr kableExtra vegan
## TRUE TRUE TRUE TRUE
## ecodist biclust patchwork pdp
## TRUE TRUE TRUE TRUE
## MLmetrics precrec reticulate MOFA2
## TRUE TRUE TRUE TRUE