Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cyto_plot_gating_scheme() fails on interval gates #211

Open
rwbaer opened this issue Aug 8, 2024 · 0 comments
Open

cyto_plot_gating_scheme() fails on interval gates #211

rwbaer opened this issue Aug 8, 2024 · 0 comments
Labels
Bug Something isn't working

Comments

@rwbaer
Copy link

rwbaer commented Aug 8, 2024

Describe the bug
I constructed a gating scheme that included two interval gates. cyto_plot_gating_tree() seems to accurately recognize the gatin structure. However, cyto_plot_gating_scheme() seems to fail after showing the 2 gates based on density plots.

To Reproduce
Steps to reproduce the behavior:

# Create gates
# Gate (non-debris) Cells (gating template Samples.csv)
cyto_gate_draw(gsSamp,
               parent = "root",
               alias = "Non-Debris",
               channels = c("FSC-AREA", "SSC-AREA"))

# Gate Single Cells (gating template Samples.csv)
cyto_gate_draw(gsSamp,
               parent = "Non-Debris",
               alias = "Single Cells",
               channels = c("FSC-AREA", "FSC-HEIGHT"))

#=====================================
# Leaf gates (I think is terminology)
# -----------------------------------

# Gate Live Single Cells
# Gate SytoxAAD on Unstained
cyto_gate_draw(gsSamp,
               parent = "Single Cells",
               alias = c("Live", "Dead"),
               channels = "FL4-AREA",
               type = "interval",
               negate = TRUE)

# Gate Annexin-pos Cells
cyto_gate_draw(gsSamp,
               parent = "Single Cells",
               alias = c("Annexin+", "Annexin-"),
               channels = "FL2-AREA",
               type = "interval",
               negate = TRUE)

# display tree
cyto_plot_gating_tree(gsSamp)

image

cyto_plot_gating_scheme(gsSamp)
Error in cyto_gate_convert.rectangleGate(z, channels) : 
  Supplied gate must contain co-ordinates in the supplied channel.
In addition: Warning messages:
1: In par(pars) : argument 1 does not name a graphical parameter
2: In par(pars) : argument 1 does not name a graphical parameter

image

Expected behavior
It would plot all the gates involved, and it shcoul not end in an error.

Desktop (please complete the following information):

> sessionInfo()
R version 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)

Matrix products: default


locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8    LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                           LC_TIME=English_United States.utf8    

time zone: America/Chicago
tzcode source: internal

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

other attached packages:
[1] shiny_1.9.0          CytoExploreR_1.1.0   openCyto_2.16.1      flowWorkspace_4.16.0 flowCore_2.16.0     

loaded via a namespace (and not attached):
 [1] changepoint_2.2.4   tidyselect_1.2.1    dplyr_1.1.4         fastmap_1.2.0       EmbedSOM_2.1.2     
 [6] promises_1.3.0      XML_3.99-0.17       digest_0.6.36       rsvd_1.0.5          mime_0.12          
[11] lifecycle_1.0.4     magrittr_2.0.3      compiler_4.4.1      rlang_1.1.4         sass_0.4.9         
[16] tools_4.4.1         yaml_2.3.10         utf8_1.2.4          data.table_1.15.4   knitr_1.48         
[21] askpass_1.2.0       htmlwidgets_1.6.4   reticulate_1.38.0   plyr_1.8.9          RColorBrewer_1.1-3 
[26] KernSmooth_2.23-24  Rtsne_0.17          purrr_1.0.2         RProtoBufLib_2.16.0 BiocGenerics_0.50.0
[31] grid_4.4.1          stats4_4.4.1        fansi_1.0.6         xtable_1.8-4        colorspace_2.1-1   
[36] flowAI_1.34.0       ggplot2_3.5.1       scales_1.3.0        MASS_7.3-60.2       cli_3.6.3          
[41] rmarkdown_2.27      ncdfFlow_2.50.0     generics_0.1.3      umap_0.2.10.0       rstudioapi_0.16.0  
[46] robustbase_0.99-3   RSpectra_0.16-2     reshape2_1.4.4      visNetwork_2.1.2    cachem_1.1.0       
[51] stringr_1.5.1       zlibbioc_1.50.0     parallel_4.4.1      rhandsontable_0.3.8 matrixStats_1.3.0  
[56] vctrs_0.6.5         Matrix_1.7-0        jsonlite_1.8.8      cytolib_2.16.0      S4Vectors_0.42.0   
[61] RBGL_1.80.0         Rgraphviz_2.48.0    jquerylib_0.1.4     tidyr_1.3.1         glue_1.7.0         
[66] DEoptimR_1.1-3      stringi_1.8.4       gtable_0.3.5        later_1.3.2         munsell_0.5.1      
[71] tibble_3.2.1        pillar_1.9.0        htmltools_0.5.8.1   openssl_2.2.0       graph_1.82.0       
[76] R6_2.5.1            evaluate_0.24.0     Biobase_2.64.0      lattice_0.22-6      png_0.1-8          
[81] memoise_2.0.1       httpuv_1.6.15       bslib_0.8.0         Rcpp_1.0.13         flowClust_3.42.0   
[86] xfun_0.46           fs_1.6.4            zoo_1.8-12          pkgconfig_2.0.3

Additional context
Add any other context about the problem here.

@rwbaer rwbaer added the Bug Something isn't working label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant