Closed schevrie closed 6 years ago
I can't reproduce your error with the same code below
library(openCyto)
library(ggcyto)
gs <- load_gs(system.file("extdata/gs_bcell_auto", package = "flowWorkspaceData"))
fr <- getData(gs[[1]], "root")
chnl <- c("FSC-A", "SSC-A")
g <- openCyto:::.boundary(fr, channels = chnl, min = c(0, 0), max=c(2.5e5,2.5e5))
p <- autoplot(fr, x = chnl[1], y = chnl[2])
p + geom_gate(g)
Bioc release also runs and builds the vignette ok (that contains the same code) http://bioconductor.org/packages/3.7/bioc/vignettes/openCyto/inst/doc/HowToAutoGating.html
Can you double check it?
I don't see the error either on R 3.6.0 .
Thanks for your feedback. We tried it in different environments and eventually it worked. Unfortunately we couldn't identify the reason why it didn't work in the beginning...
I'm new to OpenCyto and try to use it to apply automatic gates to cytof data.
When I tried to apply a boundary gate using the following code:
g <- openCyto:::.boundary(ff_QC, channels = chnl, min = c(5, 0), max=c(7.5,2)) p <- autoplot(ff_QC, x = chnl[1], y = chnl[2], bins = 128) p + geom_gate(g)
I got this error message:
Error in sum(edges.lengths) : invalid 'type' (list) of argument
I reproduced the same error when using the dataset and code available here: https://www.bioconductor.org/packages/devel/bioc/vignettes/openCyto/inst/doc/HowToAutoGating.html
gs <- load_gs(system.file("extdata/gs_bcell_auto", package = "flowWorkspaceData"))
fr <- getData(gs[[1]], "root") chnl <- c("FSC-A", "SSC-A") g <- openCyto:::.boundary(fr, channels = chnl, min = c(0, 0), max=c(2.5e5,2.5e5)) p <- autoplot(fr, x = chnl[1], y = chnl[2]) p + geom_gate(g)
The 1D gating methods based on mindensity works well and the plot is correctly displayed as in the tutorial.
Here is my session info & thanks in advance for your help
Matrix products: default BLAS: /usr/lib/libblas/libblas.so.3.6.0 LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8
[8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] hexbin_1.27.2 ggcyto_1.8.2 openCyto_1.18.0 flowWorkspace_3.28.1 ncdfFlow_2.26.0 BH_1.66.0-1 RcppArmadillo_0.9.100.5.0 [8] flowViz_1.44.0 lattice_0.20-35 dplyr_0.7.6 bbRtools_0.5 ggplot2_3.0.0 flowCore_1.46.1 CATALYST_1.4.2
loaded via a namespace (and not attached): [1] shinydashboard_0.7.0 R.utils_2.6.0 ks_1.11.3 tidyselect_0.2.4 htmlwidgets_1.2 grid_3.5.0 BiocParallel_1.14.2
[8] Rtsne_0.13 munsell_0.5.0 destiny_2.10.2 codetools_0.2-15 DT_0.4 miniUI_0.1.1.1 withr_2.1.2
[15] colorspace_1.3-2 Biobase_2.40.0 rstudioapi_0.7 stats4_3.5.0 flowClust_3.18.0 robustbase_0.93-2 vcd_1.4-4
[22] cytofkit_1.12.0 VIM_4.7.0 TTR_0.23-3 labeling_0.3 GenomeInfoDbData_1.1.0 mnormt_1.5-5 MCMCpack_1.4-3
[29] coda_0.19-1 TH.data_1.0-9 ggthemes_4.0.0 doParallel_1.0.11 R6_2.2.2 GenomeInfoDb_1.16.0 clue_0.3-55
[36] pdist_1.2 RcppEigen_0.3.3.4.0 VGAM_1.0-5 bitops_1.0-6 DelayedArray_0.6.5 assertthat_0.2.0 promises_1.0.1
[43] scales_1.0.0 multcomp_1.4-8 nnet_7.3-12 gtable_0.2.0 mcmc_0.9-5 sandwich_2.4-0 rlang_0.2.2
[50] MatrixModels_0.4-1 scatterplot3d_0.3-41 GlobalOptions_0.1.0 splines_3.5.0 lazyeval_0.2.1 shinyBS_0.61 reshape2_1.4.3
[57] abind_1.4-5 httpuv_1.4.5 IDPmisc_1.1.17 RBGL_1.56.0 tools_3.5.0 tcltk_3.5.0 gplots_3.0.1
[64] RColorBrewer_1.1-2 proxy_0.4-22 BiocGenerics_0.26.0 Rcpp_0.12.18 plyr_1.8.4 zlibbioc_1.26.0 purrr_0.2.5
[71] RCurl_1.95-4.11 FlowSOM_1.12.0 GetoptLong_0.1.7 S4Vectors_0.18.3 zoo_1.8-3 SummarizedExperiment_1.10.1 haven_1.1.2
[78] ggrepel_0.8.0 cluster_2.0.7-1 fda_2.4.8 magrittr_1.5 data.table_1.11.4 openxlsx_4.1.0 SparseM_1.77
[85] circlize_0.4.4 colourpicker_1.0 lmtest_0.9-36 RANN_2.6 mvtnorm_1.0-8 matrixStats_0.54.0 hms_0.4.2
[92] shinyjs_1.0 mime_0.5 xtable_1.8-2 smoother_1.1 XML_3.98-1.15 rio_0.5.10 mclust_5.4.1
[99] readxl_1.1.0 IRanges_2.14.10 gridExtra_2.3 shape_1.4.4 compiler_3.5.0 tibble_1.4.2 flowStats_3.38.0
[106] KernSmooth_2.23-15 crayon_1.3.4 R.oo_1.22.0 htmltools_0.3.6 mgcv_1.8-24 corpcor_1.6.9 pcaPP_1.9-73
[113] later_0.7.3 tidyr_0.8.1 rrcov_1.4-4 ComplexHeatmap_1.18.1 MASS_7.3-50 boot_1.3-20 Matrix_1.2-14
[120] car_3.0-0 permute_0.9-4 gdata_2.18.0 R.methodsS3_1.7.1 parallel_3.5.0 bindr_0.1.1 igraph_1.2.2
[127] Rtsne.multicore_0.0.99 GenomicRanges_1.32.6 forcats_0.3.0 pkgconfig_2.0.2 foreign_0.8-71 laeken_0.4.6 sp_1.3-1
[134] plotly_4.8.0 foreach_1.4.4 XVector_0.20.0 drc_3.0-1 stringr_1.3.1 digest_0.6.15 tsne_0.1-3
[141] ConsensusClusterPlus_1.44.0 vegan_2.5-2 graph_1.58.0 cellranger_1.1.0 curl_3.2 shiny_1.1.0 gtools_3.8.1
[148] quantreg_5.36 rjson_0.2.20 nlme_3.1-137 jsonlite_1.5 bindrcpp_0.2.2 carData_3.0-1 viridisLite_0.3.0
[155] limma_3.36.2 pillar_1.3.0 shinyFiles_0.7.0 httr_1.3.1 plotrix_3.7-2 DEoptimR_1.0-8 survival_2.42-6
[162] glue_1.3.0 xts_0.11-0 zip_1.0.0 iterators_1.0.10 Rgraphviz_2.24.0 class_7.3-14 stringi_1.2.4
[169] nnls_1.4 caTools_1.17.1.1 latticeExtra_0.6-28 e1071_1.7-0