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
""
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.
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,
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,
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.
Then install flowWorkspace development version from there
Then install ggcyto from github
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.