cluster heatmap looks weird
Opened this issue · 3 comments
Hi Zuguang,
thank you for developing great R package!
I'm just running your vignette with random 500 GOterm IDs, and but it gives me weird heatmap.
library(simplifyEnrichment)
set.seed(888)
go_id = random_GO(500)
head(go_id)
[1] "GO:0050918" "GO:2000050" "GO:0060968" "GO:0070460" "GO:1900744" "GO:0002839"
mat = GO_similarity(go_id,ont = "BP")
df = simplifyGO(mat)
Cluster 500 terms by 'binary_cut'... 22 clusters, used 1.005519 secs.
Perform keywords enrichment for 9 GO lists...
keyword enrichment, 3259/3259...
keyword enrichment, 3259/3259...
keyword enrichment, 3259/3259...
keyword enrichment, 3259/3259...
keyword enrichment, 3259/3259...
keyword enrichment, 3259/3259...
keyword enrichment, 3259/3259...
keyword enrichment, 3259/3259...
keyword enrichment, 3259/3259...
clustering looks good, with 6 big clusters
table(df$cluster)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
103 60 80 125 38 50 2 9 8 1 2 4 2 5 1 1 1 2 2 2 1 1
with no rasterization
I checked the similarity score, it's not all the same for each GOterm, as shown in heatmap.
I don't understand why my heatmap looks like that, and I also attach my session info below.
Please advice. Thank you.
sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats4 grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] org.Hs.eg.db_3.14.0 AnnotationDbi_1.56.2 IRanges_2.28.0 S4Vectors_0.32.3
[5] Biobase_2.54.0 simplifyEnrichment_1.7.1 BiocGenerics_0.40.0
loaded via a namespace (and not attached):
[1] httr_1.4.2 pkgload_1.2.4 bit64_4.0.5 foreach_1.5.2
[5] RcppParallel_5.1.5 brio_1.1.3 blob_1.2.3 GenomeInfoDbData_1.2.7
[9] remotes_2.4.2 slam_0.1-50 sessioninfo_1.2.2 RSQLite_2.2.14
[13] lattice_0.20-45 glue_1.6.2 digest_0.6.29 RColorBrewer_1.1-3
[17] XVector_0.34.0 colorspace_2.0-3 Matrix_1.4-0 tm_0.7-8
[21] pkgconfig_2.0.3 devtools_2.4.3 GetoptLong_1.0.5 magick_2.7.3
[25] zlibbioc_1.40.0 purrr_0.3.4 GO.db_3.14.0 processx_3.5.3
[29] KEGGREST_1.34.0 usethis_2.1.5 ellipsis_0.3.2 cachem_1.0.6
[33] withr_2.5.0 NLP_0.2-1 cli_3.2.0 magrittr_2.0.2
[37] crayon_1.5.1 memoise_2.0.1 ps_1.6.0 fs_1.5.2
[41] doParallel_1.0.17 xml2_1.3.3 pkgbuild_1.3.1 tools_4.1.3
[45] prettyunits_1.1.1 GlobalOptions_0.1.2 lifecycle_1.0.1 matrixStats_0.61.0
[49] ComplexHeatmap_2.10.0 cluster_2.1.2 callr_3.7.0 Biostrings_2.62.0
[53] compiler_4.1.3 GenomeInfoDb_1.30.1 proxyC_0.2.4 rlang_1.0.2
[57] RCurl_1.98-1.6 iterators_1.0.14 rstudioapi_0.13 rjson_0.2.21
[61] circlize_0.4.15 bitops_1.0-7 testthat_3.1.3 codetools_0.2-18
[65] DBI_1.1.2 R6_2.5.1 fastmap_1.1.0 bit_4.0.4
[69] clue_0.3-61 rprojroot_2.0.3 shape_1.4.6 desc_1.4.1
[73] GOSemSim_2.20.0 parallel_4.1.3 Rcpp_1.0.8.3 vctrs_0.3.8
[77] png_0.1-7
The similarity heatmap should be symmetric... How about directly saving it in a pdf file?
Great R package for tidy GO enrichment results. I have encountered the same problem. The heatmap looks weird, with no rasterization. Could anyone help me with that? Thanks in advance. Here's my session information.`> sessionInfo()
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8 LC_CTYPE=Chinese (Simplified)_China.utf8
[3] LC_MONETARY=Chinese (Simplified)_China.utf8 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.utf8
time zone: Asia/Shanghai
tzcode source: internal
attached base packages:
[1] grid stats4 stats graphics grDevices utils datasets methods
[9] base
other attached packages:
[1] GO.db_3.18.0 AnnotationDbi_1.64.1 Biobase_2.62.0
[4] clusterProfiler_4.10.1 simplifyEnrichment_1.12.0 lubridate_1.9.3
[7] forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4
[10] purrr_1.0.2 readr_2.1.5 tidyr_1.3.0
[13] tibble_3.2.1 ggplot2_3.5.1 tidyverse_2.0.0
[16] methylKit_1.28.0 GenomicRanges_1.54.1 GenomeInfoDb_1.38.8
[19] IRanges_2.36.0 S4Vectors_0.40.2 BiocGenerics_0.48.1
loaded via a namespace (and not attached):
[1] splines_4.3.2 BiocIO_1.12.0 bitops_1.0-7
[4] ggplotify_0.1.2 R.oo_1.26.0 polyclip_1.10-6
[7] preprocessCore_1.64.0 XML_3.99-0.17 rpart_4.1.23
[10] lifecycle_1.0.4 fastcluster_1.2.6 doParallel_1.0.17
[13] NLP_0.3-0 lattice_0.22-5 MASS_7.3-60.0.1
[16] backports_1.5.0 magrittr_2.0.3 limma_3.58.1
[19] Hmisc_5.1-3 rmarkdown_2.28 yaml_2.3.9
[22] cowplot_1.1.3 DBI_1.2.3 RColorBrewer_1.1-3
[25] abind_1.4-8 zlibbioc_1.48.0 R.utils_2.12.3
[28] ggraph_2.1.0 RCurl_1.98-1.14 yulab.utils_0.1.7
[31] nnet_7.3-19 tweenr_2.0.2 circlize_0.4.16
[34] GenomeInfoDbData_1.2.11 enrichplot_1.22.0 tm_0.7-14
[37] ggrepel_0.9.5 tidytree_0.4.6 codetools_0.2-20
[40] DelayedArray_0.28.0 xml2_1.3.6 DOSE_3.28.2
[43] ggforce_0.4.1 shape_1.4.6.1 tidyselect_1.2.1
[46] aplot_0.2.3 farver_2.1.1 org.Crobusta.eg.db_0.2
[49] viridis_0.6.5 matrixStats_1.2.0 dynamicTreeCut_1.63-1
[52] base64enc_0.1-3 GenomicAlignments_1.38.2 jsonlite_1.8.8
[55] GetoptLong_1.0.5 tidygraph_1.3.0 Formula_1.2-5
[58] survival_3.6-4 iterators_1.0.14 bbmle_1.0.25.1
[61] foreach_1.5.2 tools_4.3.2 treeio_1.26.0
[64] snow_0.4-4 Rcpp_1.0.12 glue_1.7.0
[67] gridExtra_2.3 SparseArray_1.2.4 xfun_0.45
[70] DESeq2_1.42.1 qvalue_2.34.0 MatrixGenerics_1.14.0
[73] withr_3.0.1 numDeriv_2016.8-1.1 fastmap_1.1.1
[76] fansi_1.0.6 digest_0.6.34 timechange_0.3.0
[79] R6_2.5.1 gridGraphics_0.5-1 colorspace_2.1-0
[82] gtools_3.9.5 RSQLite_2.3.4 R.methodsS3_1.8.2
[85] UpSetR_1.4.0 utf8_1.2.4 generics_0.1.3
[88] data.table_1.14.10 rtracklayer_1.62.0 graphlayouts_1.0.2
[91] httr_1.4.7 htmlwidgets_1.6.4 S4Arrays_1.2.1
[94] scatterpie_0.2.4 pkgconfig_2.0.3 gtable_0.3.5
[97] blob_1.2.4 ComplexHeatmap_2.18.0 impute_1.76.0
[100] XVector_0.42.0 shadowtext_0.1.4 htmltools_0.5.7
[103] fgsea_1.28.0 clue_0.3-65 scales_1.3.0
[106] png_0.1-8 ggfun_0.1.6 knitr_1.48
[109] rstudioapi_0.16.0 tzdb_0.4.0 rjson_0.2.21
[112] reshape2_1.4.4 coda_0.19-4.1 checkmate_2.3.1
[115] nlme_3.1-164 org.Hs.eg.db_3.18.0 bdsmatrix_1.3-7
[118] GlobalOptions_0.1.2 cachem_1.0.8 parallel_4.3.2
[121] HDO.db_0.99.1 foreign_0.8-86 restfulr_0.0.15
[124] proxyC_0.4.1 pillar_1.9.0 vctrs_0.6.5
[127] slam_0.1-53 cluster_2.1.6 htmlTable_2.4.3
[130] evaluate_1.0.0 magick_2.8.4 mvtnorm_1.2-5
[133] cli_3.6.2 locfit_1.5-9.10 compiler_4.3.2
[136] Rsamtools_2.18.0 rlang_1.1.3 crayon_1.5.3
[139] mclust_6.1.1 emdbook_1.3.13 plyr_1.8.9
[142] fs_1.6.3 stringi_1.8.3 viridisLite_0.4.2
[145] WGCNA_1.72-5 BiocParallel_1.36.0 munsell_0.5.1
[148] Biostrings_2.70.1 lazyeval_0.2.2 GOSemSim_2.28.1
[151] Matrix_1.6-5 hms_1.1.3 patchwork_1.3.0
[154] bit64_4.0.5 KEGGREST_1.42.0 statmod_1.5.0
[157] SummarizedExperiment_1.32.0 fastseg_1.48.0 gridtext_0.1.5
[160] igraph_1.6.0 memoise_2.0.1 ggtree_3.10.1
[163] fastmatch_1.1-4 bit_4.0.5 ape_5.7-1
[166] gson_0.1.0 `