lazappi / clustree

Visualise Clusterings at Different Resolutions
https://lazappi.github.io/clustree/
GNU General Public License v3.0
218 stars 15 forks source link

Error in `guide_geom()`: <Guide> classes have been rewritten as <ggproto> classes. #102

Closed mariavam closed 8 months ago

mariavam commented 8 months ago

Hello, I've just tried to execute the clustree package on my dataset and encountered the following error:

Error in `guide_geom()`:
! <Guide> classes have been rewritten as <ggproto> classes.
The old S3 guide methods have been superseded.
Run `rlang::last_trace()` to see where the error occurred.

To ensure it wasn't a problem specific to my dataset, I also attempted to execute the example data nba_clusts, as indicated in the tutorial. However, the same error occurred:

library(clustree)
Loading required package: ggraph
Loading required package: ggplot2
Warning message:
R graphics engine version 15 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed. 
data("nba_clusts")
clustree(nba_clusts, prefix = "K")
Error in `guide_geom()`:
! <Guide> classes have been rewritten as <ggproto> classes.
The old S3 guide methods have been superseded.
Run `rlang::last_trace()` to see where the error occurred.

Just in case it is necessary, here is the metadata columns of my data and my session info:

sessionInfo() ``` "orig.ident" "nCount_RNA" "nFeature_RNA" "percent.mt" "Region" "Group" "Sex" "nCount_SCT" "nFeature_SCT" "SCT_snn_res.0.5" "seurat_clusters" "SCT_snn_res.0.8" R version 4.2.1 (2022-06-23) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 19.04 Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.8.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.8.0 locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 [4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C [10] 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] clustree_0.5.1 ggraph_2.0.6 ggplot2_3.5.0 loaded via a namespace (and not attached): [1] Seurat_5.0.1 Rtsne_0.17 colorspace_2.0-3 [4] deldir_1.0-6 ellipsis_0.3.2 ggridges_0.5.6 [7] RcppHNSW_0.4.1 rstudioapi_0.15.0 spatstat.data_3.0-4 [10] farver_2.1.1 leiden_0.4.3.1 listenv_0.9.1 [13] graphlayouts_0.8.1 ggrepel_0.9.1 RSpectra_0.16-1 [16] fansi_1.0.4 codetools_0.2-19 splines_4.2.1 [19] polyclip_1.10-0 spam_2.9-1 jsonlite_1.8.8 [22] ica_1.0-3 cluster_2.1.4 png_0.1-7 [25] uwot_0.1.14 ggforce_0.3.4 shiny_1.7.2 [28] sctransform_0.4.1 spatstat.sparse_3.0-2 compiler_4.2.1 [31] httr_1.4.7 backports_1.4.1 SeuratObject_5.0.1 [34] Matrix_1.6-4 fastmap_1.1.0 lazyeval_0.2.2 [37] cli_3.6.2 tweenr_2.0.2 later_1.3.0 [40] htmltools_0.5.4 tools_4.2.1 igraph_2.0.1.1 [43] dotCall64_1.0-1 gtable_0.3.4 glue_1.6.2 [46] RANN_2.6.1 reshape2_1.4.4 dplyr_1.1.4 [49] Rcpp_1.0.12 scattermore_1.2 vctrs_0.6.5 [52] spatstat.explore_3.2-3 nlme_3.1-159 progressr_0.14.0 [55] lmtest_0.9-40 spatstat.random_3.1-6 stringr_1.5.1 [58] globals_0.16.3 mime_0.12 miniUI_0.1.1.1 [61] lifecycle_1.0.4 irlba_2.3.5.1 goftest_1.2-3 [64] future_1.33.1 MASS_7.3-58.1 zoo_1.8-12 [67] scales_1.3.0 tidygraph_1.2.2 promises_1.2.0.1 [70] spatstat.utils_3.0-3 parallel_4.2.1 RColorBrewer_1.1-3 [73] reticulate_1.26 pbapply_1.7-2 gridExtra_2.3 [76] stringi_1.7.8 fastDummies_1.7.3 checkmate_2.1.0 [79] rlang_1.1.3 pkgconfig_2.0.3 matrixStats_0.62.0 [82] lattice_0.20-45 ROCR_1.0-11 purrr_1.0.2 [85] tensor_1.5 labeling_0.4.3 patchwork_1.2.0.9000 [88] htmlwidgets_1.5.4 cowplot_1.1.3 tidyselect_1.2.1 [91] parallelly_1.36.0 RcppAnnoy_0.0.19 plyr_1.8.7 [94] magrittr_2.0.3 R6_2.5.1 generics_0.1.3 [97] DBI_1.2.2 pillar_1.9.0 withr_3.0.0 [100] fitdistrplus_1.1-11 survival_3.4-0 abind_1.4-5 [103] sp_1.5-0 tibble_3.2.1 future.apply_1.11.1 [106] KernSmooth_2.23-20 utf8_1.2.3 spatstat.geom_3.2-5 [109] plotly_4.10.4 viridis_0.6.5 grid_4.2.1 [112] data.table_1.14.2 digest_0.6.34 xtable_1.8-4 [115] tidyr_1.3.1 httpuv_1.6.6 munsell_0.5.0 [118] viridisLite_0.4.2 ```
lazappi commented 8 months ago

Hi @mariavam. Please try updating the {ggraph} package, I see no error with v2.2.1.

mschilli87 commented 8 months ago

I can confirm that fixing our igraph/ggraph installation enables me to run that code.

Here the corresponding sessionInfo(). ``` R version 4.3.3 (2024-02-29) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 19.04 Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.8.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.8.0 locale: [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C time zone: Europe/Madrid tzcode source: system (glibc) attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] clustree_0.5.1 ggraph_2.2.0 ggplot2_3.5.0 loaded via a namespace (and not attached): [1] gtable_0.3.4 dplyr_1.1.4 compiler_4.3.3 tidyselect_1.2.0 [5] Rcpp_1.0.12 gridExtra_2.3 tidyr_1.3.1 scales_1.3.0 [9] fastmap_1.1.1 R6_2.5.1 generics_0.1.3 igraph_2.0.3 [13] viridis_0.6.5 graphlayouts_1.1.0 MASS_7.3-60.0.1 polyclip_1.10-6 [17] ggrepel_0.9.5 tibble_3.2.1 munsell_0.5.0 pillar_1.9.0 [21] rlang_1.1.3 utf8_1.2.4 cachem_1.0.8 viridisLite_0.4.2 [25] memoise_2.0.1 cli_3.6.2 withr_3.0.0 magrittr_2.0.3 [29] tweenr_2.0.3 grid_4.3.3 ggforce_0.4.2 lifecycle_1.0.4 [33] vctrs_0.6.5 glue_1.7.0 farver_2.1.1 tidygraph_1.3.1 [37] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 tools_4.3.3 [41] pkgconfig_2.0.3 ```