Problem with ggcyto/flowWorkspace from GitHub
2
1
Entering edit mode
@anderstondell-9441
Last seen 12 weeks ago
Norway

I have some problems installing ggcyto from GitHub.

I have used openCyto previously, and I am hoping to be able to integrate this with ggplot, which is my preferred plotting system in R.

sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=Norwegian (Bokmål)_Norway.1252 
[2] LC_CTYPE=Norwegian (Bokmål)_Norway.1252   
[3] LC_MONETARY=Norwegian (Bokmål)_Norway.1252
[4] LC_NUMERIC=C                              
[5] LC_TIME=Norwegian (Bokmål)_Norway.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] BiocInstaller_1.20.1

loaded via a namespace (and not attached):
 [1] httr_1.0.0     R6_2.1.1       magrittr_1.5   tools_3.2.3    curl_0.9.4    
 [6] memoise_0.2.1  stringi_1.0-1  stringr_1.0.0  digest_0.6.8   devtools_1.9.1

> devtools::install_github('RGLab/ggcyto', ref="trunk")
Downloading GitHub repo RGLab/ggcyto@trunk
Installing ggcyto
Skipping 2 packages ahead of CRAN: ggplot2, ncdfFlow
"C:/PROGRA~1/R/R-32~1.3/bin/x64/R" --no-site-file --no-environ --no-save  \
  --no-restore CMD INSTALL  \
  "C:/Users/anderto/AppData/Local/Temp/RtmpCgJbpX/devtoolsc24670d6f5b/RGLab-ggcyto-9f63ca9"  \
  --library="C:/Program Files/R/R-3.2.3/library" --install-tests 

* installing *source* package 'ggcyto' ...
** R
** inst
** preparing package for lazy loading
Note: the specification for S3 class "AsIs" in package 'jsonlite' seems equivalent to one from package 'BiocGenerics': not turning on duplicate class definitions for this class.
Warning: multiple methods tables found for 'lapply'
Warning: replacing previous import by 'grid::unit' when loading 'ggcyto'
Error in eval(expr, envir, enclos) : could not find function "eval"
Error : unable to load R code in package 'ggcyto'
ERROR: lazy loading failed for package 'ggcyto'
* removing 'C:/Program Files/R/R-3.2.3/library/ggcyto'
* restoring previous 'C:/Program Files/R/R-3.2.3/library/ggcyto'
Error: Command failed (1)

> traceback()
10: stop("Command failed (", status, ")", call. = FALSE)
9: system_check(r_path, options, c(r_profile(), r_env_vars(), env_vars), 
       ...)
8: force(code)
7: in_dir(path, system_check(r_path, options, c(r_profile(), r_env_vars(), 
       env_vars), ...))
6: R(paste("CMD INSTALL ", shQuote(built_path), " ", opts, sep = ""), 
       quiet = quiet)
5: install(source, ..., quiet = quiet)
4: FUN(X[[i]], ...)
3: vapply(remotes, install_remote, ..., FUN.VALUE = logical(1))
2: install_remotes(remotes, ...)
1: devtools::install_github("RGLab/ggcyto", ref = "trunk")

By upgrading ncdfFlow to the GitHub version I am able to install ggcyto branch="fast" or "ggplot1.1", but not the "trunk" version. The ggcyto package seems to work then, but flowWorkspace command GetGatingset() returns error:

gs <- GatingSet(fs)
Error in as.list.default(X) : 
  no method for coercing this S4 class to a vector
> traceback()
10: as.list.default(X)
9: as.list(X)
8: lapply(x, function(gh) {
       sampleName <- sampleNames(gh)
       if (verbose) 
           message(paste("gating", sampleName, "..."))
       else message(".", appendLF = FALSE)
       if (alwaysLoadData) 
           isloadData <- TRUE
       else {
           isAllBoolGate <- all(sapply(y, .isBoolGate, x = gh))
           if (isAllBoolGate) {
               isloadData <- all(sapply(y, function(i) {
                   pid <- getParent(gh, i)
                   isParentGated <- isGated(gh, pid)
                   bf <- getGate(gh, i)
                   refNodes <- filterObject(bf)$refs
                   isRefGated <- all(sapply(refNodes, isGated, obj = gh))
                   !(isParentGated && isRefGated)
               }))
           }
           else isloadData <- TRUE
       }
       if (isloadData) {
           data <- getData(gh)
           mat <- exprs(data)
       }
       else {
           mat <- matrix(nrow = 0, ncol = 1, dimnames = list(NULL, 
               "dummy"))
       }
       lapply(y, function(i) {
           nodeID <- .getNodeInd(gh, i)
           nodeInd <- as.integer(nodeID) - 1
           recompute <- TRUE
           res <- try(.Call("R_gating", gh@pointer, mat, sampleName, 
               gains, nodeInd, recompute, extend_val, ignore_case, 
               leaf.bool), silent = TRUE)
           if (class(res) == "try-error") {
               if (!isloadData && grepl("not found in flowData", 
                   res)) 
                   stop("Found ungated upstream population. Set 'alwaysLoadData = TRUE' for 'recompute' method, and try again!")
               else stop(res)
           }
       })
   })
7: lapply(x, function(gh) {
       sampleName <- sampleNames(gh)
       if (verbose) 
           message(paste("gating", sampleName, "..."))
       else message(".", appendLF = FALSE)
       if (alwaysLoadData) 
           isloadData <- TRUE
       else {
           isAllBoolGate <- all(sapply(y, .isBoolGate, x = gh))
           if (isAllBoolGate) {
               isloadData <- all(sapply(y, function(i) {
                   pid <- getParent(gh, i)
                   isParentGated <- isGated(gh, pid)
                   bf <- getGate(gh, i)
                   refNodes <- filterObject(bf)$refs
                   isRefGated <- all(sapply(refNodes, isGated, obj = gh))
                   !(isParentGated && isRefGated)
               }))
           }
           else isloadData <- TRUE
       }
       if (isloadData) {
           data <- getData(gh)
           mat <- exprs(data)
       }
       else {
           mat <- matrix(nrow = 0, ncol = 1, dimnames = list(NULL, 
               "dummy"))
       }
       lapply(y, function(i) {
           nodeID <- .getNodeInd(gh, i)
           nodeInd <- as.integer(nodeID) - 1
           recompute <- TRUE
           res <- try(.Call("R_gating", gh@pointer, mat, sampleName, 
               gains, nodeInd, recompute, extend_val, ignore_case, 
               leaf.bool), silent = TRUE)
           if (class(res) == "try-error") {
               if (!isloadData && grepl("not found in flowData", 
                   res)) 
                   stop("Found ungated upstream population. Set 'alwaysLoadData = TRUE' for 'recompute' method, and try again!")
               else stop(res)
           }
       })
   })
6: .recompute(x, ...)
5: recompute(G)
4: recompute(G)
3: .local(x, ...)
2: GatingSet(fs)
1: GatingSet(fs)

 

I am very thankfull for any help from this excellent community,

 

Anders Tøndell, PhD molecular medicine, NTNU, Norway

 

"" 

 

software error flowworkspace opencyto • 3.5k views
ADD COMMENT
0
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 3.1 years ago
(Private Address)

Given the the latest release of ggplot 2.0, I've merged 'ggplot1.1' branch to 'trunk', which is the version you should use. Don't use 'fast' branch since it is at the experimental stage.

Your 'GatingSet' error is a separate issue, without the context, I can't tell where went wrong. You want to check if 'fs' is a valid 'flowSet' or 'ncdfFlowSet' object.

 

ADD COMMENT
0
Entering edit mode
@anderstondell-9441
Last seen 12 weeks ago
Norway

Thank you for responding!

It now turns out that I was able to solve the issue. It seems that the binary version of flowCore was 'old', and I was unable to install the source version(1.36.5).

However, by upgrading flowCore to the RGLab-version: 'devtools::install_github('RGLab/flowCore', ref="trunk")'

and ncdfFlow:

'devtools::install_github('RGLab/ncdfFlow', ref="trunk")'

finally, 

'devtools::install_github('RGLab/ggcyto', ref="trunk")'

went through without errors!

The problem with 'GatingSet()' and several commands in flowWorkspace (Error in as.list.default(X) : 
  no method for coercing this S4 class to a vector) was also fixed, and everything is now working fine, apart from some warnings, (For example when installing ggcyto: Warning: multiple methods tables found for 'lapply').

 

I look forward to exploring openCyto and ggcyto further!

 

Anders Tøndell

 

 

ADD COMMENT
0
Entering edit mode

Glad the problem is resolved. Just a side note, all the packages (both release and development versions) are available through bioconductor site and 'biocLite' is the recommended way of installing these tools (because the package dependencies are taken care of automatically as well as some other checking.)

ggcyto is in the process of submission and should appear in bioconductor soon.

 

ADD REPLY
0
Entering edit mode

It seems I am still struggling with installing ggcyto after a reinstall of R. In addition, I have not been able to install it on a Remote Desctop- application in my office (I have to use a personal library, and cannot upgrade to the latest release of R (currently we have R 3.2.2).

The problem now relates to a error as the flowWorkspace package is too old (this seem to have come after dependency for ggcyto was changed to the newer version of flowWorkspace recently?), and I am not able to install the github version, due to errors.

So, I was wondering what is the recommended way of installing these tools by the biocLite-command, as you were referring to? And do I have to/should I use the devel version of R and Bioconductor to be able to install these packages? And, lastly: when do you expect the package to appear in Bioconductor?

Mostly, I have found the installing instructions referred to 'devtools::install_github'-command on the web.

With regards, 

ADD REPLY
0
Entering edit mode

It seems I am still struggling with installing ggcyto after a reinstall of R. In addition, I have not been able to install it on a Remote Desctop- application in my office (I have to use a personal library, and cannot upgrade to the latest release of R (currently we have R 3.2.2).

The problem now relates to a error as the flowWorkspace package is too old (this seem to have come after dependency for ggcyto was changed to the newer version of flowWorkspace recently?), and I am not able to install the github version, due to errors.

So, I was wondering what is the recommended way of installing these tools by the biocLite-command, as you were referring to? And do I have to/should I use the devel version of R and Bioconductor to be able to install these packages? And, lastly: when do you expect the package to appear in Bioconductor?

Mostly, I have found the installing instructions referred to 'devtools::install_github'-command on the web.

With regards, 

ADD REPLY
0
Entering edit mode

Read http://bioconductor.org/install/ for details on how to install bioconductor R packages. ggcyto is under final stages of review and may take another week or two to be available on bioconductor development branch.

So at this moment, you should first switch to bioconductor development branch.

> BiocInstaller::useDevel()

Then install flowWorkspace development version from there

> biocLite("flowWorkspace")

Then install ggcyto from github 

> devtools::install_github("RGLab/ggcyto", ref = "trunk")
ADD REPLY
0
Entering edit mode
Thank you very much for excellent help and quick reply! Finally, I have got it right. The problem, I think, was that I did not realize that I should use R devel (this may not be emphasized sufficiently in the http://bioconductor.org/install/ site?) Now I am looking forward to playing around with these tools! In the future: Support for 3d gating and visualization in the openCyto framework? With regards,
ADD REPLY
0
Entering edit mode

Regarding to 3d gating, I haven't seen any real use case so far. If you really need that,  try to submit the feature request through the github issue page https://github.com/RGLab/openCyto/issues, where we can discuss more specifics.

ADD REPLY
0
Entering edit mode
Yes, I will consider that. I think simultaneous gating on FSC, SSC and CD45 for lymphocytes would be handy, for example with a flowClust in three dimensions. 2016-01-11 22:10 GMT+01:00 Jiang, Mike [bioc] <noreply@bioconductor.org>: > Activity on a post you are following on support.bioconductor.org > > User Jiang, Mike <https: support.bioconductor.org="" u="" 4886=""/> wrote Comment: > Problem with ggcyto/flowWorkspace from GitHub > <https: support.bioconductor.org="" p="" 76426="" #76807="">: > > Regarding to 3d gating, I haven't seen any real use case so far. If you > really need that, try to submit the feature request through the github > issue page https://github.com/RGLab/openCyto/issues, where we can discuss > more specifics. > > ------------------------------ > > Post tags: software error, flowworkspace, opencyto > > You may reply via email or visit > C: Problem with ggcyto/flowWorkspace from GitHub > -- Anders Tøndell Sildråpeveien 42A 7048 Trondheim Tlf: 73797167
ADD REPLY

Login before adding your answer.

Traffic: 592 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6