simplifyEnrichment
simplifyEnrichment copied to clipboard
Error message when running simplifyEnrichment function with clusterProfiler::GSEA() output
Hi. I'm trying to run simplifyEnrichment with enriched pathways from clusterProfiler GSEA function, but it gives me an error message. Below is an example with a similar analysis and the same error. I tried to provide the term names or descriptions by the term argument, but it didn't work.
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(msigdbr))
suppressPackageStartupMessages(library(clusterProfiler))
suppressPackageStartupMessages(library(simplifyEnrichment))
data(geneList, package="DOSE")
C2reactome_t2g <- msigdbr(species = "Homo sapiens", category = "C2",
subcategory = "REACTOME") %>%
select(gs_name, entrez_gene)
em2 <- GSEA(geneList, TERM2GENE = C2reactome_t2g, eps = 0)
#> preparing geneSet collections...
#> GSEA analysis...
#> leading edge analysis...
#> done...
mat <- term_similarity_from_enrichResult(em2)
mat.clust <- simplifyEnrichment(mat)
#> Cluster 264 terms by 'binary_cut'...
#> 51 clusters, used 0.6444671 secs.
#> Error in .local(object, ...): unused argument (term = NULL)
Created on 2022-10-19 with reprex v2.0.2
Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.2.1 (2022-06-23)
#> os macOS Big Sur ... 10.16
#> system x86_64, darwin17.0
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz America/New_York
#> date 2022-10-19
#> pandoc 2.18 @ /Applications/RStudio.app/Contents/MacOS/quarto/bin/tools/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> AnnotationDbi 1.58.0 2022-04-26 [1] Bioconductor
#> ape 5.6-2 2022-03-02 [1] CRAN (R 4.2.0)
#> aplot 0.1.8 2022-10-09 [1] CRAN (R 4.2.0)
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.2.0)
#> babelgene 22.9 2022-09-29 [1] CRAN (R 4.2.0)
#> Biobase 2.56.0 2022-04-26 [1] Bioconductor
#> BiocGenerics * 0.42.0 2022-04-26 [1] Bioconductor
#> BiocParallel 1.30.4 2022-10-11 [1] Bioconductor
#> Biostrings 2.64.1 2022-08-18 [1] Bioconductor
#> bit 4.0.4 2020-08-04 [1] CRAN (R 4.2.0)
#> bit64 4.0.5 2020-08-30 [1] CRAN (R 4.2.0)
#> bitops 1.0-7 2021-04-24 [1] CRAN (R 4.2.0)
#> blob 1.2.3 2022-04-10 [1] CRAN (R 4.2.0)
#> cachem 1.0.6 2021-08-19 [1] CRAN (R 4.2.0)
#> Cairo 1.6-0 2022-07-05 [1] CRAN (R 4.2.0)
#> circlize 0.4.15 2022-05-10 [1] CRAN (R 4.2.0)
#> cli 3.4.1 2022-09-23 [1] CRAN (R 4.2.1)
#> clue 0.3-62 2022-10-18 [1] CRAN (R 4.2.1)
#> cluster 2.1.4 2022-08-22 [1] CRAN (R 4.2.1)
#> clusterProfiler * 4.4.4 2022-06-21 [1] Bioconductor
#> codetools 0.2-18 2020-11-04 [1] CRAN (R 4.2.1)
#> colorspace 2.0-3 2022-02-21 [1] CRAN (R 4.2.0)
#> ComplexHeatmap 2.12.1 2022-08-09 [1] Bioconductor
#> crayon 1.5.2 2022-09-29 [1] CRAN (R 4.2.0)
#> data.table 1.14.4 2022-10-17 [1] CRAN (R 4.2.1)
#> DBI 1.1.3 2022-06-18 [1] CRAN (R 4.2.0)
#> digest 0.6.30 2022-10-18 [1] CRAN (R 4.2.1)
#> DO.db 2.9 2022-05-12 [1] Bioconductor
#> doParallel 1.0.17 2022-02-07 [1] CRAN (R 4.2.0)
#> DOSE 3.22.1 2022-08-30 [1] Bioconductor
#> downloader 0.4 2015-07-09 [1] CRAN (R 4.2.0)
#> dplyr * 1.0.10 2022-09-01 [1] CRAN (R 4.2.1)
#> enrichplot 1.16.2 2022-08-30 [1] Bioconductor
#> evaluate 0.17 2022-10-07 [1] CRAN (R 4.2.0)
#> fansi 1.0.3 2022-03-24 [1] CRAN (R 4.2.0)
#> farver 2.1.1 2022-07-06 [1] CRAN (R 4.2.0)
#> fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.2.0)
#> fastmatch 1.1-3 2021-07-23 [1] CRAN (R 4.2.0)
#> fgsea 1.22.0 2022-04-26 [1] Bioconductor
#> foreach 1.5.2 2022-02-02 [1] CRAN (R 4.2.0)
#> fs 1.5.2 2021-12-08 [1] CRAN (R 4.2.0)
#> generics 0.1.3 2022-07-05 [1] CRAN (R 4.2.0)
#> GenomeInfoDb 1.32.4 2022-09-06 [1] Bioconductor
#> GenomeInfoDbData 1.2.8 2022-05-02 [1] Bioconductor
#> GetoptLong 1.0.5 2020-12-15 [1] CRAN (R 4.2.0)
#> ggforce 0.4.1 2022-10-04 [1] CRAN (R 4.2.0)
#> ggfun 0.0.7 2022-08-31 [1] CRAN (R 4.2.1)
#> ggplot2 3.3.6 2022-05-03 [1] CRAN (R 4.2.0)
#> ggplotify 0.1.0 2021-09-02 [1] CRAN (R 4.2.0)
#> ggraph 2.1.0 2022-10-09 [1] CRAN (R 4.2.0)
#> ggrepel 0.9.1 2021-01-15 [1] CRAN (R 4.2.0)
#> ggtree 3.4.4 2022-09-27 [1] Bioconductor
#> GlobalOptions 0.1.2 2020-06-10 [1] CRAN (R 4.2.0)
#> glue 1.6.2 2022-02-24 [1] CRAN (R 4.2.0)
#> GO.db 3.15.0 2022-05-12 [1] Bioconductor
#> GOSemSim 2.22.0 2022-04-26 [1] Bioconductor
#> graphlayouts 0.8.2 2022-09-29 [1] CRAN (R 4.2.0)
#> gridExtra 2.3 2017-09-09 [1] CRAN (R 4.2.0)
#> gridGraphics 0.5-1 2020-12-13 [1] CRAN (R 4.2.0)
#> gtable 0.3.1 2022-09-01 [1] CRAN (R 4.2.1)
#> highr 0.9 2021-04-16 [1] CRAN (R 4.2.0)
#> htmltools 0.5.3 2022-07-18 [1] CRAN (R 4.2.1)
#> httr 1.4.4 2022-08-17 [1] CRAN (R 4.2.1)
#> igraph 1.3.5 2022-09-22 [1] CRAN (R 4.2.1)
#> IRanges 2.30.1 2022-08-18 [1] Bioconductor
#> iterators 1.0.14 2022-02-05 [1] CRAN (R 4.2.0)
#> jsonlite 1.8.2 2022-10-02 [1] CRAN (R 4.2.0)
#> KEGGREST 1.36.3 2022-07-12 [1] Bioconductor
#> knitr 1.40 2022-08-24 [1] CRAN (R 4.2.1)
#> lattice 0.20-45 2021-09-22 [1] CRAN (R 4.2.1)
#> lazyeval 0.2.2 2019-03-15 [1] CRAN (R 4.2.0)
#> lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.2.0)
#> magick 2.7.3 2021-08-18 [1] CRAN (R 4.2.0)
#> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.2.0)
#> MASS 7.3-58.1 2022-08-03 [1] CRAN (R 4.2.1)
#> Matrix 1.5-1 2022-09-13 [1] CRAN (R 4.2.0)
#> matrixStats 0.62.0 2022-04-19 [1] CRAN (R 4.2.0)
#> memoise 2.0.1 2021-11-26 [1] CRAN (R 4.2.0)
#> msigdbr * 7.5.1 2022-03-30 [1] CRAN (R 4.2.0)
#> munsell 0.5.0 2018-06-12 [1] CRAN (R 4.2.0)
#> nlme 3.1-160 2022-10-10 [1] CRAN (R 4.2.0)
#> NLP 0.2-1 2020-10-14 [1] CRAN (R 4.2.0)
#> org.Hs.eg.db 3.15.0 2022-05-30 [1] Bioconductor
#> patchwork 1.1.2 2022-08-19 [1] CRAN (R 4.2.0)
#> pillar 1.8.1 2022-08-19 [1] CRAN (R 4.2.0)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.2.0)
#> plyr 1.8.7 2022-03-24 [1] CRAN (R 4.2.0)
#> png 0.1-7 2013-12-03 [1] CRAN (R 4.2.0)
#> polyclip 1.10-0 2019-03-14 [1] CRAN (R 4.2.0)
#> proxyC 0.3.3 2022-10-06 [1] CRAN (R 4.2.0)
#> purrr 0.3.5 2022-10-06 [1] CRAN (R 4.2.0)
#> qvalue 2.28.0 2022-04-26 [1] Bioconductor
#> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.2.0)
#> R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.2.0)
#> R.oo 1.25.0 2022-06-12 [1] CRAN (R 4.2.0)
#> R.utils 2.12.0 2022-06-28 [1] CRAN (R 4.2.0)
#> R6 2.5.1 2021-08-19 [1] CRAN (R 4.2.0)
#> RColorBrewer 1.1-3 2022-04-03 [1] CRAN (R 4.2.0)
#> Rcpp 1.0.9 2022-07-08 [1] CRAN (R 4.2.0)
#> RcppParallel 5.1.5 2022-01-05 [1] CRAN (R 4.2.0)
#> RCurl 1.98-1.9 2022-10-03 [1] CRAN (R 4.2.0)
#> reprex 2.0.2 2022-08-17 [1] CRAN (R 4.2.0)
#> reshape2 1.4.4 2020-04-09 [1] CRAN (R 4.2.0)
#> rjson 0.2.21 2022-01-09 [1] CRAN (R 4.2.0)
#> rlang 1.0.6 2022-09-24 [1] CRAN (R 4.2.0)
#> rmarkdown 2.17 2022-10-07 [1] CRAN (R 4.2.0)
#> RSQLite 2.2.18 2022-10-04 [1] CRAN (R 4.2.0)
#> rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.2.0)
#> S4Vectors 0.34.0 2022-04-26 [1] Bioconductor
#> scales 1.2.1 2022-08-20 [1] CRAN (R 4.2.0)
#> scatterpie 0.1.8 2022-09-03 [1] CRAN (R 4.2.1)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.2.0)
#> shadowtext 0.1.2 2022-04-22 [1] CRAN (R 4.2.0)
#> shape 1.4.6 2021-05-19 [1] CRAN (R 4.2.0)
#> simplifyEnrichment * 1.6.1 2022-06-12 [1] Bioconductor
#> slam 0.1-50 2022-01-08 [1] CRAN (R 4.2.0)
#> stringi 1.7.8 2022-07-11 [1] CRAN (R 4.2.0)
#> stringr 1.4.1 2022-08-20 [1] CRAN (R 4.2.1)
#> styler 1.7.0 2022-03-13 [1] CRAN (R 4.2.0)
#> tibble 3.1.8 2022-07-22 [1] CRAN (R 4.2.1)
#> tidygraph 1.2.2 2022-08-22 [1] CRAN (R 4.2.1)
#> tidyr 1.2.1 2022-09-08 [1] CRAN (R 4.2.0)
#> tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.2.0)
#> tidytree 0.4.1 2022-09-26 [1] CRAN (R 4.2.1)
#> tm 0.7-9 2022-10-19 [1] CRAN (R 4.2.1)
#> treeio 1.20.2 2022-08-14 [1] Bioconductor
#> tweenr 2.0.2 2022-09-06 [1] CRAN (R 4.2.0)
#> utf8 1.2.2 2021-07-24 [1] CRAN (R 4.2.0)
#> vctrs 0.4.2 2022-09-29 [1] CRAN (R 4.2.0)
#> viridis 0.6.2 2021-10-13 [1] CRAN (R 4.2.0)
#> viridisLite 0.4.1 2022-08-22 [1] CRAN (R 4.2.1)
#> withr 2.5.0 2022-03-03 [1] CRAN (R 4.2.0)
#> xfun 0.34 2022-10-18 [1] CRAN (R 4.2.1)
#> xml2 1.3.3 2021-11-30 [1] CRAN (R 4.2.0)
#> XVector 0.36.0 2022-04-26 [1] Bioconductor
#> yaml 2.3.6 2022-10-18 [1] CRAN (R 4.2.1)
#> yulab.utils 0.0.5 2022-06-30 [1] CRAN (R 4.2.0)
#> zlibbioc 1.42.0 2022-04-26 [1] Bioconductor
#>
#> [1] /Library/Frameworks/R.framework/Versions/4.2/Resources/library
#>
#> ──────────────────────────────────────────────────────────────────────────────
Very old issue at this point, but for others encountering this error with custom gene sets, I precluded it by supplying the argument plot = FALSE
to simplifyEnrichment()