enrichplot icon indicating copy to clipboard operation
enrichplot copied to clipboard

Treeplot displaying incorrect simplified terms if nCluster is increased

Open TJonCooper opened this issue 2 years ago • 2 comments

If nCluster is set to = 5 (as default), treeplot behaves as expected:

Screenshot-20220317132401-1395x925

However, if nCluster is increased to 10 or higher, treeplot now misassigns both the cluster colour and the simplified label:

Screenshot-20220317132419-1394x923

Notice how, for example, the group containing 'hemostasis, blood coagulation, platelet activation' etc. is blue in font colour, but has been assigned to the purple cluster.

This happens with any data - including the example datasets included in clusterProfiler.

R version 4.1.3 (2022-03-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_IL.UTF-8       LC_NUMERIC=C               LC_TIME=en_IL.UTF-8        LC_COLLATE=en_IL.UTF-8     LC_MONETARY=en_IL.UTF-8   
 [6] LC_MESSAGES=en_IL.UTF-8    LC_PAPER=en_IL.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_IL.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] enrichplot_1.15.3     org.Hs.eg.db_3.13.0   AnnotationDbi_1.56.2  IRanges_2.28.0        S4Vectors_0.32.3      Biobase_2.54.0       
[7] BiocGenerics_0.40.0   clusterProfiler_4.3.3

loaded via a namespace (and not attached):
 [1] nlme_3.1-155           bitops_1.0-7           ggtree_3.2.1           bit64_4.0.5            RColorBrewer_1.1-2     httr_1.4.2            
 [7] GenomeInfoDb_1.30.1    tools_4.1.3            utf8_1.2.2             R6_2.5.1               lazyeval_0.2.2         DBI_1.1.2             
[13] colorspace_2.0-3       tidyselect_1.1.2       gridExtra_2.3          bit_4.0.4              compiler_4.1.3         cli_3.2.0             
[19] scatterpie_0.1.7       labeling_0.4.2         shadowtext_0.1.1       scales_1.1.1           yulab.utils_0.0.4      stringr_1.4.0         
[25] digest_0.6.29          DOSE_3.20.1            XVector_0.34.0         pkgconfig_2.0.3        fastmap_1.1.0          rlang_1.0.2           
[31] rstudioapi_0.13        RSQLite_2.2.10         gridGraphics_0.5-1     generics_0.1.2         farver_2.1.0           jsonlite_1.8.0        
[37] BiocParallel_1.28.3    GOSemSim_2.20.0        dplyr_1.0.8            RCurl_1.98-1.6         magrittr_2.0.2         ggplotify_0.1.0       
[43] GO.db_3.14.0           GenomeInfoDbData_1.2.7 patchwork_1.1.1        Matrix_1.4-0           Rcpp_1.0.8.3           munsell_0.5.0         
[49] fansi_1.0.2            ggnewscale_0.4.6       ape_5.6-2              viridis_0.6.2          lifecycle_1.0.1        stringi_1.7.6         
[55] ggraph_2.0.5           MASS_7.3-55            zlibbioc_1.40.0        plyr_1.8.6             qvalue_2.26.0          grid_4.1.3            
[61] blob_1.2.2             parallel_4.1.3         ggrepel_0.9.1          DO.db_2.9              crayon_1.5.0           lattice_0.20-45       
[67] graphlayouts_0.8.0     Biostrings_2.62.0      splines_4.1.3          KEGGREST_1.34.0        pillar_1.7.0           fgsea_1.20.0          
[73] igraph_1.2.11          reshape2_1.4.4         fastmatch_1.1-3        glue_1.6.2             ggfun_0.0.5            downloader_0.4        
[79] data.table_1.14.2      treeio_1.18.1          png_0.1-7              vctrs_0.3.8            tweenr_1.0.2           gtable_0.3.0          
[85] purrr_0.3.4            polyclip_1.10-0        tidyr_1.2.0            assertthat_0.2.1       cachem_1.0.6           ggplot2_3.3.5         
[91] ggforce_0.3.3          tidygraph_1.2.0        tidytree_0.3.9         viridisLite_0.4.0      tibble_3.1.6           aplot_0.1.2           
[97] memoise_2.0.1          ellipsis_0.3.2      

TJonCooper avatar Mar 17 '22 11:03 TJonCooper

I have the same problem!!!!

SDU-LST avatar May 06 '23 09:05 SDU-LST

Same issue is not fixed...

CyrusWang57 avatar May 10 '24 07:05 CyrusWang57