install.packages("BiocManager")
BiocManager::install(
"RforMassSpectrometry/MsIO@a669fa1303a023161581b7a16caed3ed20a43299",
ask = FALSE, dependencies = TRUE)
BiocManager::install("RforMassSpectrometry/Metabonaut",
dependencies = TRUE, ask = FALSE, update = TRUE)For manual installation, an R version >= 4.6.0 is required.
Running workflows in the cloud
No installation is needed to run the workflows: Metabonaut is available as a Curated Workshop on the Bioconductor Workshop platform, a Galaxy-based service hosted on the Jetstream2 academic cloud (NSF-ACCESS).
- Log in on workshop.bioconductor.org with a Bioconductor account.
- Launch the Metabonaut workshop. This starts a private RStudio session, based on the same docker image as below, with all required packages and the example data already installed.
- Open any of the Quarto files in the vignettes folder and evaluate the R code blocks.
Note that these sessions are ephemeral: all data and progress are erased when the workshop is stopped, so download a local copy of anything you want to keep.
Running workflows locally
To install all the packages required to run the workflows locally run the code as follow in an R session (R >= 4.6.0):
If you get some error message when downloading form GitHub it might be due to an expired token. Remove them using this code below and try to install again:
#See if any token is there:
gitcreds::gitcreds_get()
# Delete them:
gitcreds::gitcreds_delete()The workflow source files (quarto and Rmarkdown documents) can be downloaded from Metabonaut’s GitHub repository (download either individual files from the vignettes folder, or the full repository).
Docker image
The vignettes files along with an R runtime environment including all required packages and data as well as the RStudio (Posit) editor are all bundled in a Docker container.
After installation, this Docker container can be run on the computer and the code and examples from the vignettes can be evaluated within this environment (without the need to install any additional packages or files).
- If you don’t already have, install docker. Find installation information here.
- Get the docker image of this tutorial e.g. from the command line with:
docker pull rformassspectrometry/metabonaut:v1.6.2@sha256:e17ab1dd7b397798d70c1bf03c923dfa4ea6f7b96263d79d92eb748f47e38ef2
Note
ℹ️ the tag v1.6.2 selects the docker image for Metabonaut version 1.6.2 and the
@sha256:sha256:e17ab1dd7b397798d70c1bf03c923dfa4ea6f7b96263d79d92eb748f47e38ef2ensures that a specific archived image is loaded from Dockerhub. This is the exact same docker image that was used to render these vignettes. Docker images for upcoming versions releases will be made available using a different tag (e.g. v1.6.3) hence images from older versions will also be available in future.
- Start the docker container, either through the Docker Desktop, or on the command line with
docker run -e PASSWORD=bioc -p 8787:8787 rformassspectrometry/metabonaut:v1.6.2@sha256:e17ab1dd7b397798d70c1bf03c923dfa4ea6f7b96263d79d92eb748f47e38ef2
- Enter
http://localhost:8787in a web browser and log in with usernamerstudioand passwordbioc. - In the RStudio server version: open any of the Quarto files in the vignettes folder and evaluate the R code blocks in that document.
Note
ℹ️ The Metabonaut Docker image could also be build with the Dockerfile included in this repository. The resulting Docker image will however not have the identical software stack than the archived image on Dockerhub, but will include R packages available at build time. This will mostly affect packages from CRAN, while Bioconductor packages are supposed to be stable within the same release. Results from the vignettes are therefore not expected to differ, even if run using a Docker container that was newly built from the Dockerfile. To guarantee reproducibility it is suggested to use the archived Docker image, identified by the tag and digest above.
