dieterich-lab / circtools

circtools: a modular, python-based framework for circRNA-related tools that unifies several functionalities in a single, command line driven software.
http://circ.tools
GNU General Public License v3.0
25 stars 20 forks source link

R install script fails on fresh R 3.4.0 install #19

Closed tjakobi closed 7 years ago

tjakobi commented 7 years ago

Normally the lib dir is not writable, the installation does not check for this (or sets an alternative path). Therefore the install fails:

Rscript install.R
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning in install.packages("BiocInstaller", repos = a["BioCsoft", "URL"]) :
  'lib = "/usr/local/lib/R/site-library"' is not writable
Error in install.packages("BiocInstaller", repos = a["BioCsoft", "URL"]) :
  unable to install packages
Calls: source ... eval.parent -> eval -> eval -> eval -> eval -> install.packages
Execution halted
tjakobi commented 7 years ago

What are possible options? Installation via sudo is out of question since it's not available on clusters. We could use custom library paths, but those would have to be set in all R scripts correctly.

alexey0308 commented 7 years ago

A user can create/edit file .Renviron at his home dir to update the location:

## Linux
R_LIBS=~/R/library

## Windows
R_LIBS=C:/R/library

The home dir can be found from R itself irregardless of the platform:

path.expand("~")

tjakobi commented 7 years ago

I know that, but that has to go in the documentation. We could create the file automatically, but have to make sure to not overwrite any files the user may already have. That's a similar problem with the .bashrc file and the $PATH variable.

alexey0308 commented 7 years ago

I will add it to the doc, but this is a general problem of any R libs on servers, which is not about the package itself.