Simplify - clusterProfiler
Entering edit mode
Last seen 8 days ago
United States

I have been trying to use simplify() on the enrichment object I got from enrichGO. It was working well till yesterday, and today it shows me this error -

Error in as.list.default(X) : no method for coercing this S4 class to a vector

I haven't made any changes in the script, so I don't know why am I getting this error.

Code should be placed in three backticks as shown below

RKO_BV2_GOBP = enrichGO(gene = names(GO2), OrgDb =, universe = uni, readable = T, ont = "BP", pvalueCutoff= 0.05, qvalueCutoff = 0.1) #Performaing the enrichment analysis for Biological processes
RKO_BV2_GOBP = simplify(RKO_BV2_GOBP) #removing redundancy by using the simplify function.

The names(GO2) is basically a vector of the ENTREZ ID's of the genes.

sessionInfo( )

R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

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

other attached packages:
 [1] heatmaply_1.3.0             viridis_0.6.2               viridisLite_0.4.0           plotly_4.10.0              
 [5] pheatmap_1.0.12             edgeR_3.36.0                limma_3.50.3                GO.db_3.14.0               
 [9] DESeq2_1.34.0               SummarizedExperiment_1.24.0 MatrixGenerics_1.6.0        matrixStats_0.62.0         
[13] GenomicRanges_1.46.1        GenomeInfoDb_1.30.1         enrichplot_1.14.2           forcats_0.5.1              
[17] stringr_1.4.0               dplyr_1.0.9                 purrr_0.3.4                 readr_2.1.2                
[21] tidyr_1.2.0                 tibble_3.1.8                ggplot2_3.3.6               tidyverse_1.3.2            
[25]         AnnotationDbi_1.56.2        IRanges_2.28.0              S4Vectors_0.32.4           
[29] Biobase_2.54.0              BiocGenerics_0.40.0         clusterProfiler_4.2.2      

loaded via a namespace (and not attached):
  [1] readxl_1.4.0           shadowtext_0.1.2       backports_1.4.1        fastmatch_1.1-3        plyr_1.8.7            
  [6] igraph_1.3.4           lazyeval_0.2.2         splines_4.1.2          BiocParallel_1.28.3    digest_0.6.29         
 [11] foreach_1.5.2          yulab.utils_0.0.5      htmltools_0.5.2        GOSemSim_2.20.0        fansi_1.0.3           
 [16] magrittr_2.0.3         memoise_2.0.1          googlesheets4_1.0.0    tzdb_0.3.0             annotate_1.72.0       
 [21] Biostrings_2.62.0      graphlayouts_0.8.0     modelr_0.1.8           colorspace_2.0-3       blob_1.2.3            
 [26] rvest_1.0.2            ggrepel_0.9.1          haven_2.5.0            xfun_0.29              crayon_1.5.1          
 [31] RCurl_1.98-1.8         jsonlite_1.8.0         scatterpie_0.1.7       genefilter_1.76.0      iterators_1.0.14      
 [36] survival_3.2-13        ape_5.6-2              glue_1.6.2             polyclip_1.10-0        registry_0.5-1        
 [41] gtable_0.3.0           gargle_1.2.0           zlibbioc_1.40.0        XVector_0.34.0         webshot_0.5.3         
 [46] DelayedArray_0.20.0    scales_1.2.0           DOSE_3.20.1            DBI_1.1.3              Rcpp_1.0.9            
 [51] xtable_1.8-4           gridGraphics_0.5-1     tidytree_0.3.9         bit_4.0.4              htmlwidgets_1.5.4     
 [56] httr_1.4.3             fgsea_1.20.0           RColorBrewer_1.1-3     ellipsis_0.3.2         XML_3.99-0.10         
 [61] pkgconfig_2.0.3        farver_2.1.1           dbplyr_2.2.1           locfit_1.5-9.6         utf8_1.2.2            
 [66] labeling_0.4.2         ggplotify_0.1.0        tidyselect_1.1.2       rlang_1.0.4            reshape2_1.4.4        
 [71] munsell_0.5.0          cellranger_1.1.0       tools_4.1.2            cachem_1.0.6           downloader_0.4        
 [76] cli_3.3.0              generics_0.1.3         RSQLite_2.2.15         broom_1.0.0            evaluate_0.15         
 [81] fastmap_1.1.0          yaml_2.2.1             ggtree_3.2.1           knitr_1.39             bit64_4.0.5           
 [86] fs_1.5.2               tidygraph_1.2.1        dendextend_1.16.0      KEGGREST_1.34.0        ggraph_2.0.5          
 [91] nlme_3.1-153           aplot_0.1.6            DO.db_2.9              xml2_1.3.3             compiler_4.1.2        
 [96] rstudioapi_0.13        png_0.1-7              reprex_2.0.1           treeio_1.18.1          geneplotter_1.72.0    
[101] tweenr_1.0.2           stringi_1.7.6          lattice_0.20-45        Matrix_1.3-4           vctrs_0.4.1           
[106] pillar_1.8.0           lifecycle_1.0.1        data.table_1.14.2      bitops_1.0-7           seriation_1.3.6       
[111] patchwork_1.1.1        qvalue_2.26.0          R6_2.5.1               TSP_1.2-1              gridExtra_2.3         
[116] codetools_0.2-18       MASS_7.3-54            assertthat_0.2.1       withr_2.5.0            GenomeInfoDbData_1.2.7
[121] parallel_4.1.2         hms_1.1.1              grid_4.1.2             ggfun_0.0.6            rmarkdown_2.14        
[126] googledrive_2.0.0      ggforce_0.3.3          lubridate_1.8.0
RNASeq simplify clusterProfiler enrichGO simplifyEnrichment • 48 views

Login before adding your answer.

Traffic: 428 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6