biocswirl-dev-team / BiocSwirl

BiocSwirl is a series of in-depth swirlify generated courses used to teach bioinformatics workflows in R/Bioconductor using an interactive and easy to digest format. This project was the People's Choice Award for the Vancouver Bioinformatics Hackathon Hackseq2019.
30 stars 3 forks source link

Workaround for package loading + install #24

Closed lisancao closed 4 years ago

lisancao commented 4 years ago

Currently bioconductor package installs and autoloads is not compatible with swirl's base functionality- we would like a way to resolve this

juliaphilipp commented 4 years ago

installing Bioconductor packages in initLesson.R works!

I like to test if the package is installed first, like so: if (!requireNamespace("Rsubread", quietly = TRUE)) BiocManager::install("Rsubread")

2 important things: a) the Bioconductor packages that are installed like that, will also have to be loaded in the initLesson.R withlibrary() or require() b) the Bioconductor packages that are installed like that, cannot be listed in dependson.txt - I think that file is run first and it will throw an error because the packages aren't installed yet and it will try to install with install.packages()