blasern / R-cytometry

1 stars 2 forks source link

Installation #2

Open mbr085 opened 6 years ago

mbr085 commented 6 years ago

I have struggled with the installation of packages. Some don't work for me. What works for me is the following:

  1. If I want to use my previous installation I jump directly to 7.

  2. Install docker on my machine

  3. Run the bioconductor/devel_base2 docker image: docker run -p 8787:8787 bioconductor/devel_base2

  4. Point my browser to the running rstudio server and log in with user: rstudio and password:rstudio

  5. Install packages with this script:

#CRAN
install.packages("ggplot2")

#Bioconductor
source("https://bioconductor.org/biocLite.R")

#Github

cran_pkgs <- c("CytobankAPI", 
               "data.table", "devtools", "dplyr", 
               "ggplot2", "glmnet",
               "MASS", 
               "pamr", 
               "readr", "reshape2", "Rtsne", 
               "samr", "scales", "shiny", "survival")

bio_pkgs <- c("flowClust", "flowCore", "FlowRepositoryR",
              "FlowSOM", "flowUtils",  
              "impute",
              "SamSPECTRAL")

github_pkgs <- c("nolanlab/Rclusterpp", "nolanlab/citrus")

install.packages(cran_pkgs)
biocLite(bio_pkgs, suppressUpdates=TRUE)

library("devtools")
install_github(github_pkgs)
  1. Save the docker container to an image by typing the following in a new terminal: docker commit dazzling_curie bioc

(The name dazzling_curie changes)

  1. Stop the running container by hitting CTRL-C in the terminal I used in 2.

  2. Test my new image by running it: docker run -p 8787:8787 bioc (or just run the version I have uploaded to dockerhub by running docker run -p 8787:8787 mbr085/dockerflow:version1.0) and pointing my browser to the running rstudio server and logging in with user: rstudio and password:rstudio

  3. Every time when I have been working with rstudio I save the changes by repeating step 5.

miriamsand commented 6 years ago

Hi, I've now managed to install most of the packages, but still having issues installing SPADE. Upon trying, this is the error message I get:

devtools::install_github("nolanlab/spade") Downloading GitHub repo nolanlab/spade@master from URL https://api.github.com/repos/nolanlab/spade/zipball/master Installing spade '/usr/local/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \ '/tmp/Rtmpz1qFAf/devtools129382aab59/nolanlab-spade-356955f' \ --library='/usr/local/lib/R/site-library' --install-tests

ERROR: failed to lock directory ‘/usr/local/lib/R/site-library’ for modifying Try removing ‘/usr/local/lib/R/site-library/00LOCK-nolanlab-spade-356955f’ Installation failed: Command failed (3)

I am unable to find the directory referred to, thus I can't remove it. Have you managed to install SPADE in docker?

Miriam

blasern commented 6 years ago

I have seen this error message before (not inside docker). After finding the directory specified and deleted it, everything worked fine. But I don't know what to do if you can't find the directory.