Entering edit mode
While using cnetplot to plot enrichGo results, I am getting the following error. It used to work before, but now I am constantly getting this error. I am using clusterprofiler package
gse <- enrichGO(gene = deGenes, ont = "BP",
OrgDb ="org.Dm.eg.db",
universe = geneUniverse,
readable=TRUE,
pvalueCutoff = 0.05)
cnetplot(gse, categorySize="pvalue", foldChange=gene_list, showCategory =20, font.size=12,label_format=30,cex_line =1,colorEdge = TRUE)
Error in UseMethod("rescale") : no applicable method for 'rescale' applied to an object of class "AsIs"
Session info ()
Matrix products: default
attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] DOSE_3.20.1 enrichplot_1.14.2 clusterProfiler_4.2.2 org.Dm.eg.db_3.14.0 AnnotationDbi_1.56.2
[6] IRanges_2.28.0 S4Vectors_0.32.4 Biobase_2.54.0 BiocGenerics_0.40.0 reshape2_1.4.4
[11] MASS_7.3-58.1 ggplot2_3.4.0 gplots_3.1.3
loaded via a namespace (and not attached):
[1] fgsea_1.20.0 ggnewscale_0.4.8 colorspace_2.0-3 ggtree_3.2.1 qvalue_2.26.0
[6] XVector_0.34.0 aplot_0.1.8 rstudioapi_0.14 farver_2.1.1 graphlayouts_0.8.3
[11] ggrepel_0.9.2 bit64_4.0.5 fansi_1.0.3 scatterpie_0.1.8 splines_4.1.2
[16] cachem_1.0.6 GOSemSim_2.20.0 polyclip_1.10-4 jsonlite_1.8.3 broom_1.0.1
[21] GO.db_3.14.0 png_0.1-7 ggforce_0.4.1 compiler_4.1.2 httr_1.4.4
[26] backports_1.4.1 assertthat_0.2.1 Matrix_1.4-0 fastmap_1.1.0 lazyeval_0.2.2
[31] cli_3.1.1 tweenr_2.0.2 tools_4.1.2 igraph_1.3.5 gtable_0.3.1
[36] glue_1.6.2 GenomeInfoDbData_1.2.7 DO.db_2.9 dplyr_1.0.10 fastmatch_1.1-3
[41] Rcpp_1.0.9 vctrs_0.5.0 Biostrings_2.62.0 ape_5.6-2 nlme_3.1-155
[46] ggraph_2.1.0 stringr_1.4.1 lifecycle_1.0.3 gtools_3.9.3 zlibbioc_1.40.0
[51] scales_1.2.1 tidygraph_1.2.2 parallel_4.1.2 RColorBrewer_1.1-3 memoise_2.0.1
[56] gridExtra_2.3 downloader_0.4 ggfun_0.0.8 yulab.utils_0.0.5 stringi_1.7.6
[61] RSQLite_2.2.18 tidytree_0.4.1 caTools_1.18.2 BiocParallel_1.28.3 GenomeInfoDb_1.30.1
[66] rlang_1.0.6 pkgconfig_2.0.3 bitops_1.0-7 lattice_0.20-45 purrr_0.3.5
[71] treeio_1.18.1 patchwork_1.1.2 labeling_0.4.2 shadowtext_0.1.2 bit_4.0.4
[76] tidyselect_1.2.0 plyr_1.8.7 magrittr_2.0.3 R6_2.5.1 snow_0.4-4
[81] generics_0.1.3 DBI_1.1.3 pillar_1.8.1 withr_2.5.0 KEGGREST_1.34.0
[86] RCurl_1.98-1.9 tibble_3.1.8 crayon_1.5.2 KernSmooth_2.23-20 utf8_1.2.2
[91] viridis_0.6.2 grid_4.1.2 data.table_1.14.4 blob_1.2.3 digest_0.6.30
[96] tidyr_1.2.1 gridGraphics_0.5-1 munsell_0.5.0 viridisLite_0.4.1 ggplotify_0.1.0
You need to check that enrichGO correctly worked, otherwise there may be an issue in creating your data. Look closely at each step of your code and the resulting objects
To add to Basti's comment: you may also need to update, since it is working in my hands using the latest version of R/Bioconductor.