Hello everyone,
I would like to automagically install an R package when installing my tool. So I wrote this in my "tool_dependencies.xml": --- <package name="R_PACKAGES" version="1.0"> <install version="1.0"> <actions> <action type="shell_command">R --slave --no-save --no-restore --quiet -e 'if("Hmisc" %in% rownames(installed.packages()) == FALSE){install.packages("Hmisc", repos = c("http://cran.rstudio.com/"), dependencies = TRUE)}'</action> </actions> </install> </package> ---
This does not seem to work and the problem is: --- /bin/sh: 1: cd: can't cd to ./database/tmp/tmpI6RcEu/R_PACKAGES ---
What is true is that I have this in the Galaxy log: --- Warning: local() encountered an error (return code 2) while executing 'R --slave --no-save --no-restore --quiet -e 'if("Hmisc" %in% rownames(installed.packages()) == FALSE){install.packages("Hmisc", repos = c("http://cran.rstudio.com/"), dependencies = TRUE)}''
[localhost] local: rm -rf ./database/tmp/tmpI6RcEu ---
I do not think that the local error is related (I have it everywhere), but a premature "rm -rf ./database/tmp/tmpI6RcEu" might explain the problem. I tried another install (e.g. package_samtools_0_1_16), which downloads and makes the samtools: no problem.
Does anyone have a suggestion?
Many thanks,
Matthias.