-
Notifications
You must be signed in to change notification settings - Fork 76
Description
Hi, I'm testing code in your web tutorial here: https://yulab-smu.top/biomedical-knowledge-mining-book/enrichplot.html, and I ran into some error. When I try to make emapplot with parameter showCategory of less than or equal to 4, everything is fine. But for any higher value, it would report the following error:
Error in
geom_edge_link():
! Problem while converting geom to grob.
ℹ Error occurred in the 1st layer.
Caused by error inpathAttr():
! 'names' attribute [6141255744] must be the same length as the vector [2]
Runrlang::last_trace()to see where the error occurred.
Below is my code:
library(ggplot2)
library(enrichplot)
library(DOSE)
data(geneList)
de <- names(geneList)[abs(geneList) > 2]
edo <- enrichDGN(de)
edo <- pairwise_termsim(edo)
p1 <- emapplot(edo, showCategory=5, cex.params=list(category_label=0.5))
p1
And below is my R session information:
R version 4.4.1 (2024-06-14)
Platform: aarch64-apple-darwin20
Running under: macOS Monterey 12.5.1Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8time zone: America/Los_Angeles
tzcode source: internalattached base packages:
[1] stats graphics grDevices utils datasets methods baseother attached packages:
[1] DOSE_3.30.5 enrichplot_1.24.4 ggplot2_3.5.1loaded via a namespace (and not attached):
[1] DBI_1.2.3 shadowtext_0.1.4 gridExtra_2.3 httr2_1.1.0
[5] rlang_1.1.5 magrittr_2.0.3 compiler_4.4.1 RSQLite_2.3.9
[9] png_0.1-8 vctrs_0.6.5 reshape2_1.4.4 stringr_1.5.1
[13] pkgconfig_2.0.3 crayon_1.5.3 fastmap_1.2.0 XVector_0.44.0
[17] labeling_0.4.3 ggraph_2.2.1 UCSC.utils_1.0.0 purrr_1.0.2
[21] bit_4.5.0.1 zlibbioc_1.50.0 cachem_1.1.0 aplot_0.2.4
[25] GenomeInfoDb_1.40.1 jsonlite_1.8.9 blob_1.2.4 BiocParallel_1.38.0
[29] tweenr_2.0.3 parallel_4.4.1 R6_2.5.1 stringi_1.8.4
[33] RColorBrewer_1.1-3 GOSemSim_2.30.2 Rcpp_1.0.14 R.utils_2.12.3
[37] IRanges_2.38.1 Matrix_1.7-2 splines_4.4.1 igraph_2.1.4
[41] tidyselect_1.2.1 qvalue_2.36.0 viridis_0.6.5 codetools_0.2-20
[45] lattice_0.22-6 tibble_3.2.1 plyr_1.8.9 Biobase_2.64.0
[49] treeio_1.28.0 withr_3.0.2 KEGGREST_1.44.1 gridGraphics_0.5-1
[53] scatterpie_0.2.4 polyclip_1.10-7 Biostrings_2.72.1 pillar_1.10.1
[57] ggtree_3.12.0 stats4_4.4.1 ggfun_0.1.8 generics_0.1.3
[61] S4Vectors_0.42.1 munsell_0.5.1 scales_1.3.0 tidytree_0.4.6
[65] glue_1.8.0 lazyeval_0.2.2 tools_4.4.1 ggnewscale_0.5.0
[69] data.table_1.16.4 fgsea_1.30.0 fs_1.6.5 graphlayouts_1.2.2
[73] fastmatch_1.1-6 tidygraph_1.3.1 cowplot_1.1.3 grid_4.4.1
[77] tidyr_1.3.1 ape_5.8-1 AnnotationDbi_1.66.0 colorspace_2.1-1
[81] nlme_3.1-167 GenomeInfoDbData_1.2.12 patchwork_1.3.0 ggforce_0.4.2
[85] cli_3.6.3 rappdirs_0.3.3 viridisLite_0.4.2 dplyr_1.1.4
[89] gtable_0.3.6 R.methodsS3_1.8.2 yulab.utils_0.2.0 digest_0.6.37
[93] BiocGenerics_0.50.0 ggrepel_0.9.6 ggplotify_0.1.2 farver_2.1.2
[97] memoise_2.0.1 R.oo_1.27.0 lifecycle_1.0.4 httr_1.4.7
[101] GO.db_3.19.1 bit64_4.6.0-1 MASS_7.3-64
Any help is appreciated. Thanks!