Parsing geoms to enrichplot
0
1
Entering edit mode
@francois-marchildon-14131
Last seen 10 days ago
Rockefeller University, New York City

Dear Bioconductor community,

I am trying to change the node text (something like geom_node_text) with the emapplot function of the enrichplot package.

This is what I have unsuccessfully tried from an enrichResult object that is fine:

> ggoBP@result %>% names()
[1] "ID"          "Description" "GeneRatio"   "BgRatio"     "pvalue"     
[6] "p.adjust"    "qvalue"      "geneID"      "Count"      

> p <- emapplot(ggoBP, layout = "kk", line_scale = 0.2)
> p + geom_node_label(size = 9, repel = T)

Error: geom_label_repel requires the following missing aesthetics: label

Any suggestion would be welcome!

    > sessionInfo()
    R version 4.0.2 (2020-06-22)
    Platform: x86_64-apple-darwin17.0 (64-bit)
    Running under: macOS Mojave 10.14.6
    other attached packages:
     [1] ggraph_2.0.3                circlize_0.4.10            
     [3] DOSE_3.14.0                 msigdbr_7.1.1              
     [5] ggcorrplot_0.1.3            plyr_1.8.6                 
     [7] tidyr_1.1.1                 ReactomePA_1.32.0          
     [9] dplyr_1.0.1                 ComplexHeatmap_2.4.3       
    [11] stringr_1.4.0               colorRamps_2.3             
    [13] VennDiagram_1.6.20          futile.logger_1.4.3        
    [15] clusterProfiler_3.16.0      reactome.db_1.70.0         
    [17] org.Mm.eg.db_3.11.4         AnnotationDbi_1.50.3       
    [19] ggrepel_0.8.2               gageData_2.26.0            
    [21] pathview_1.28.1             gage_2.38.3                
    [23] biomaRt_2.44.1              ggplot2_3.3.2              
    [25] pheatmap_1.0.12             RColorBrewer_1.1-2         
    [27] DESeq2_1.28.1               SummarizedExperiment_1.18.2
    [29] DelayedArray_0.14.1         matrixStats_0.56.0         
    [31] Biobase_2.48.0              GenomicRanges_1.40.0       
    [33] GenomeInfoDb_1.24.2         IRanges_2.22.2             
    [35] S4Vectors_0.26.1            BiocGenerics_0.34.0        
loaded via a namespace (and not attached):
  [1] backports_1.1.8        fastmatch_1.1-0        BiocFileCache_1.12.0  
  [4] igraph_1.2.5           splines_4.0.2          BiocParallel_1.22.0   
  [7] urltools_1.7.3         digest_0.6.25          GOSemSim_2.14.1       
 [10] viridis_0.5.1          GO.db_3.11.4           checkmate_2.0.0       
 [13] magrittr_1.5           memoise_1.1.0          cluster_2.1.0         
 [16] Biostrings_2.56.0      annotate_1.66.0        graphlayouts_0.7.0    
 [19] askpass_1.1            enrichplot_1.8.1       prettyunits_1.1.1     
 [22] colorspace_1.4-1       blob_1.2.1             rappdirs_0.3.1        
 [25] xfun_0.16              crayon_1.3.4           RCurl_1.98-1.2        
 [28] jsonlite_1.7.0         graph_1.66.0           scatterpie_0.1.4      
 [31] genefilter_1.70.0      survival_3.2-3         glue_1.4.1            
 [34] polyclip_1.10-0        gtable_0.3.0           zlibbioc_1.34.0       
 [37] XVector_0.28.0         GetoptLong_1.0.2       graphite_1.34.0       
 [40] Rgraphviz_2.32.0       shape_1.4.4            scales_1.1.1          
 [43] futile.options_1.0.1   DBI_1.1.0              Rcpp_1.0.5            
 [46] viridisLite_0.3.0      xtable_1.8-4           progress_1.2.2        
 [49] clue_0.3-57            gridGraphics_0.5-0     bit_4.0.3             
 [52] europepmc_0.4          httr_1.4.2             fgsea_1.14.0          
 [55] ellipsis_0.3.1         pkgconfig_2.0.3        XML_3.99-0.5          
 [58] farver_2.0.3           dbplyr_1.4.4           locfit_1.5-9.4        
 [61] ggplotify_0.0.5        tidyselect_1.1.0       rlang_0.4.7           
 [64] reshape2_1.4.4         munsell_0.5.0          tools_4.0.2           
 [67] downloader_0.4         generics_0.0.2         RSQLite_2.2.0         
 [70] ggridges_0.5.2         org.Hs.eg.db_3.11.4    bit64_4.0.2           
 [73] tidygraph_1.2.0        purrr_0.3.4            KEGGREST_1.28.0       
 [76] formatR_1.7            KEGGgraph_1.48.0       DO.db_2.9             
 [79] xml2_1.3.2             compiler_4.0.2         rstudioapi_0.11       
 [82] curl_4.3               png_0.1-7              tibble_3.0.3          
 [85] tweenr_1.0.1           geneplotter_1.66.0     stringi_1.4.6         
 [88] lattice_0.20-41        Matrix_1.2-18          vctrs_0.3.2           
 [91] pillar_1.4.6           lifecycle_0.2.0        BiocManager_1.30.10   
 [94] triebeard_0.3.0        GlobalOptions_0.1.2    data.table_1.13.0     
 [97] cowplot_1.0.0          bitops_1.0-6           qvalue_2.20.0         
[100] R6_2.4.1               gridExtra_2.3          lambda.r_1.2.4        
[103] MASS_7.3-51.6          assertthat_0.2.1       rjson_0.2.20          
[106] openssl_1.4.2          withr_2.2.0            GenomeInfoDbData_1.2.3
[109] hms_0.5.3              rvcheck_0.1.8          ggforce_0.3.2         
[112] tinytex_0.25
enrichplot • 168 views
ADD COMMENT
1
Entering edit mode

Just curious: Why is enrichPlot not on your sessionInfo() output?

Also, you might want to edit your post and add code formatting so geom_node_text doesn't show up as geomnodetext - markdown turns the underscores into markers for italicization.

ADD REPLY

Login before adding your answer.

Traffic: 202 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6