using flowIncubator package's function
1
0
Entering edit mode
anara92 • 0
@anara92-10628
Last seen 7.8 years ago

Dear all,

I was not successful in installing the flowIncubator package on Windows, however it was installed on my Mac through install_github("RGLab/flowIncubator").

I tried the function of flowIncubator tmix2DGate on my data and it seems that the flowClustFast function of openCyto that the flowIncubator is referring to is non-existent? When I compare my flowIncubator package files in the library on Windows vs Mac, they have a bit different number of files. Especially, there are no tmix2DGate.R in flowIncubator's R file. So, I tried to change the constituents of my flowIncubator on Mac, adding all missing files and still R does give this error:
my code: add_pop(gs, alias = "cd41,cd42,cd43", pop = "*", parent = "root", dims = "CD25,CD127", gating_method = "tmix2DGate.wrapper", gating_args = "K = 3, quantile = 0.6, trans = 0")

Error in (function (fs, pp_res, gFunc, popAlias, channels, gFunc_args)  : 
  failed at Alcina TregMAIT_AV 10-1974 P1.fcs
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : 
  object '.flowClustFast' not found

when I do traceback()

 traceback()
15: stop("failed at ", paste0(sn), "\n", filterRes)
14: (function (fs, pp_res, gFunc, popAlias, channels, gFunc_args) 
    {
        require(openCyto)
        sn <- sampleNames(fs)
        fr <- as(fs, "flowFrame")
        total <- nrow(fr)
        subSample <- gFunc_args[["subSample"]]
        gFunc_args[["subSample"]] <- NULL
        if (!is.null(subSample)) {
            if (is.numeric(subSample)) {
                if (subSample > 1) {
                    samp.ind <- sample.int(total, subSample)
                    fr <- fr[samp.ind]
                }
                else if (subSample > 0) {
                    samp.ind <- sample.int(total, subSample * total)
                    fr <- fr[samp.ind]
                }
                else stop("invalid 'subSample' argument: ", subSample)
            }
            else stop("invalid 'subSample' argument: ", subSample)
        }
        openCyto.options <- getOption("openCyto")
        minEvents <- openCyto.options[["gating"]][["minEvents"]]
        if (is.null(minEvents)) 
            minEvents <- 0
        if (nrow(fr) <= minEvents) {
            warning(paste(sn, collapse = ","), ": Not enough events to proceed the data-driven gating!Returning a dummy gate instead.")
            channels <- as.vector(na.omit(channels))
            nDim <- length(channels)
            if (nDim == 1) 
                gate_coordinates <- list(c(-Inf, -Inf))
            else if (nDim == 2) 
                gate_coordinates <- list(c(-Inf, -Inf), c(-Inf, -Inf))
            else stop(nDim, " dimensional gating is not supported yet!")
            names(gate_coordinates) <- channels
            filterRes <- rectangleGate(gate_coordinates)
            if (grepl("flowClust\\.[12]d", gFunc)) 
                filterRes <- fcRectangleGate(filterRes, priors = list(), 
                    posts = list())
            nPop <- length(popAlias)
            filterResType <- ifelse(nPop == 1, "filter", "filters")
            if (filterResType == "filters") {
                filterRes <- filters(lapply(1:nPop, function(i) filterRes))
            }
        }
        else {
            if (!.isRegistered(gFunc)) {
                stop(sprintf("Can't gate using unregistered method %s", 
                    gFunc))
            }
            thisCall <- substitute(f(fr = fr, pp_res = pp_res, channels = channels), 
                list(f = as.symbol(gFunc)))
            filterRes <- try(do.call(gFunc, c(list(fr = fr, pp_res = pp_res, 
                channels = channels), gFunc_args)), silent = TRUE)
        }
        if (extends(class(filterRes), "filter") || extends(class(filterRes), 
            "filters")) {
            list(sapply(sampleNames(fs), function(i) filterRes, simplify = FALSE))
        }
        else {
            stop("failed at ", paste0(sn), "\n", filterRes)
        }
    })(dots[[1L]][[1L]], dots[[2L]][[1L]], gFunc = ".tmix2DGate.wrapper", 
        popAlias = c("cd41", "cd42", "cd43"), channels = c("Green-E-582/15-A", 
        "Violet-C-670/30-A"), gFunc_args = list(K = 3, quantile = 0.6, 
            trans = 0))
13: mapply(list(`Alcina TregMAIT_AV 10-1974 P1.fcs` = <S4 object of class "flowSet">, 
        `Alcina TregMAIT_BV 08-1966.fcs` = <S4 object of class "flowSet">, 
        `Alcina TregMAIT_CM 06-1955.fcs` = <S4 object of class "flowSet">, 
        `Alcina TregMAIT_GG 08-1951.fcs` = <S4 object of class "flowSet">, 
        `Alcina TregMAIT_LM 04-1938 P1.fcs` = <S4 object of class "flowSet">, 
        `Alcina TregMAIT_RM 01-1951.fcs` = <S4 object of class "flowSet">, 
        `Alcina TregMAIT_TA 09-1949 P1.fcs` = <S4 object of class "flowSet">), 
        list(`Alcina TregMAIT_AV 10-1974 P1.fcs` = NULL, `Alcina TregMAIT_BV 08-1966.fcs` = NULL, 
            `Alcina TregMAIT_CM 06-1955.fcs` = NULL, `Alcina TregMAIT_GG 08-1951.fcs` = NULL, 
            `Alcina TregMAIT_LM 04-1938 P1.fcs` = NULL, `Alcina TregMAIT_RM 01-1951.fcs` = NULL, 
            `Alcina TregMAIT_TA 09-1949 P1.fcs` = NULL), FUN = .gating_adaptor, 
        MoreArgs = list(gFunc = ".tmix2DGate.wrapper", popAlias = c("cd41", 
        "cd42", "cd43"), channels = c("Green-E-582/15-A", "Violet-C-670/30-A"
        ), gFunc_args = list(K = 3, quantile = 0.6, trans = 0)))
12: eval(expr, envir, enclos)
11: eval(thisCall)
10: .gating_gtMethod(x, y, ...)
9: gating(x = this_gate, y, parent = parent, gtPop = gt_node_pop, 
       pp_res = pp_res, ...)
8: gating(x = this_gate, y, parent = parent, gtPop = gt_node_pop, 
       pp_res = pp_res, ...)
7: .gating_gatingTemplate(x, y, env_fct, ...)
6: .local(x, y, ...)
5: gating(gt, gs, ...)
4: gating(gt, gs, ...)
3: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
2: suppressMessages(gating(gt, gs, ...))
1: add_pop(gs, alias = "cd41,cd42,cd43", pop = "*", parent = "root", 
       dims = "CD25,CD127", gating_method = "tmix2DGate.wrapper", 
       gating_args = "K = 3, quantile = 0.6, trans = 0")
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.4 (El Capitan)

Sessioninfo()

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.4 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] devtools_1.12.0           flowClust_3.10.1          clue_0.3-51              
 [4] corpcor_1.6.8             mnormt_1.5-4              ellipse_0.3-8            
 [7] RBGL_1.48.1               graph_1.50.0              Biobase_2.32.0           
[10] BiocGenerics_0.18.0       rgl_0.95.1441             flowIncubator_0.99.9     
[13] ggplot2_2.1.0             data.table_1.9.6          flowStats_3.30.1         
[16] cluster_2.0.4             fda_2.4.4                 Matrix_1.2-6             
[19] flowWorkspaceData_2.8.0   openCyto_1.10.3           flowWorkspace_3.18.8     
[22] gridExtra_2.2.1           ncdfFlow_2.18.0           BH_1.60.0-2              
[25] RcppArmadillo_0.7.100.3.1 flowViz_1.36.2            lattice_0.20-33          
[28] flowCore_1.38.2          

Could it also be due to the RStudio version that I have? They suggest updating the RStudio, however I have the newest one for Mac.

opencyto flow cytometry R package installation • 1.2k views
ADD COMMENT
0
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 2.6 years ago
(Private Address)

flowIncubaor is not a bioconductor package, so let's keep the conversations on github instead

ADD COMMENT

Login before adding your answer.

Traffic: 655 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