Skip to content
Permalink
Browse files

Fixes #76

  • Loading branch information...
tjakobi committed Jun 10, 2019
1 parent 4eb1b32 commit e707e4785b408460ee00633e8d6939b61494d66c
Showing with 25 additions and 8 deletions.
  1. +25 −8 scripts/install_R_dependencies.R
@@ -15,12 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.


# set mirrors
source("https://bioconductor.statistik.tu-dortmund.de/biocLite.R")
options(repos = c(CRAN = "https://cran.uni-muenster.de/"))
biocLite()

# we need these packages
pkgs <- c(
"aod",
"ballgown",
@@ -48,10 +43,32 @@ pkgs <- c(
"EnsDb.Hsapiens.v86"
)

# set mirror
options(repos = c(CRAN = "https://cran.uni-muenster.de/"))

# check if devtools is already installed
pkgs <- pkgs[!pkgs %in% installed.packages()[,1]]
if (length(pkgs) > 0)
biocLite(pkgs)

print("R minor version:")

print(as.numeric(strsplit(version[['minor']], '')[[1]][[1]]) )

# new installer caller for R >3.6.0
if (as.numeric(strsplit(version[['minor']], '')[[1]][[1]]) >= 6){

if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")

if (length(pkgs) > 0)
BiocManager::install(pkgs)

} else {
source("https://bioconductor.statistik.tu-dortmund.de/biocLite.R")
biocLite()

if (length(pkgs) > 0)
biocLite(pkgs)
}

# load devtools library
library(devtools)

0 comments on commit e707e47

Please sign in to comment.
You can’t perform that action at this time.