Search
Question: How can I visualize Gene Set Enrichment Results from gseGo fun. (clusterProfiler)?
0
gravatar for thyagoleal
7 months ago by
thyagoleal20
thyagoleal20 wrote:

Hi, everyone.

I've been using the amazing package clusterProfiler and I have a question about visualizing the results. 

Well, I've been using the enrichGo() function and plotting its results (enrichResult obj.) with barplot() and dotplot() functions. Now, I'm using gseGo (another test, similar but not the same) and I'd like to plot the results via barplot() and dotplot() again, but I'm getting an error stating:

barplot(gsea_BP)
Error in barplot.default(gsea_BP) : 'height' must be a vector or a matrix

or..

dotplot(gsea_BP)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function 'dotplot' for signature '"gseaResult"'

The function works flawlessly for the enrichResult object.

Is there some way to tweak theses functions in order to ge them working? In any case, I thought about extracting the data from those objects and just use ggplot2 by itself.

Thank you all.

Thyago


> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=Portuguese_Brazil.1252  LC_CTYPE=Portuguese_Brazil.1252   
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C                      
[5] LC_TIME=Portuguese_Brazil.1252    

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

other attached packages:
[1] clusterProfiler_3.2.14 DOSE_3.0.10            affy_1.52.0           
[4] Biobase_2.34.0         BiocGenerics_0.20.0   

loaded via a namespace (and not attached):
  [1] Category_2.40.0               bitops_1.0-6                 
  [3] RColorBrewer_1.1-2            httr_1.2.1                   
  [5] GenomeInfoDb_1.10.3           tools_3.3.2                  
  [7] backports_1.0.5               affyio_1.44.0                
  [9] R6_2.2.0                      rpart_4.1-10                 
 [11] Hmisc_4.0-2                   DBI_0.6-1                    
 [13] lazyeval_0.2.0                colorspace_1.3-2             
 [15] nnet_7.3-12                   gridExtra_2.2.1              
 [17] GGally_1.3.0                  DESeq2_1.14.1                
 [19] preprocessCore_1.36.0         graph_1.52.0                 
 [21] htmlTable_1.9                 rtracklayer_1.34.2           
 [23] ggbio_1.22.4                  scales_0.4.1                 
 [25] checkmate_1.8.2               genefilter_1.56.0            
 [27] RBGL_1.50.0                   stringr_1.2.0                
 [29] digest_0.6.12                 Rsamtools_1.26.2             
 [31] foreign_0.8-67                R.utils_2.5.0                
 [33] AnnotationForge_1.16.1        XVector_0.14.1               
 [35] base64enc_0.1-3               dichromat_2.0-0              
 [37] htmltools_0.3.5               BSgenome_1.42.0              
 [39] ensembldb_1.6.2               limma_3.30.13                
 [41] htmlwidgets_0.8               PFAM.db_3.4.0                
 [43] RSQLite_1.1-2                 BiocInstaller_1.24.0         
 [45] shiny_1.0.1                   GOstats_2.40.0               
 [47] hwriter_1.3.2                 BiocParallel_1.8.2           
 [49] R.oo_1.21.0                   acepack_1.4.1                
 [51] GOSemSim_2.0.4                VariantAnnotation_1.20.3     
 [53] RCurl_1.95-4.8                magrittr_1.5                 
 [55] GO.db_3.4.0                   Formula_1.2-1                
 [57] Matrix_1.2-8                  Rcpp_0.12.10                 
 [59] munsell_0.4.3                 S4Vectors_0.12.2             
 [61] R.methodsS3_1.7.1             yaml_2.1.14                  
 [63] stringi_1.1.5                 edgeR_3.16.5                 
 [65] SummarizedExperiment_1.4.0    zlibbioc_1.20.0              
 [67] plyr_1.8.4                    qvalue_2.6.0                 
 [69] AnnotationHub_2.6.5           grid_3.3.2                   
 [71] DO.db_2.9                     ReportingTools_2.14.0        
 [73] lattice_0.20-35               Biostrings_2.42.1            
 [75] splines_3.3.2                 GenomicFeatures_1.26.4       
 [77] annotate_1.52.1               locfit_1.5-9.1               
 [79] knitr_1.15.1                  fgsea_1.0.2                  
 [81] igraph_1.0.1                  GenomicRanges_1.26.4         
 [83] geneplotter_1.52.0            reshape2_1.4.2               
 [85] biomaRt_2.30.0                stats4_3.3.2                 
 [87] fastmatch_1.1-0               XML_3.98-1.6                 
 [89] biovizBase_1.22.0             latticeExtra_0.6-28          
 [91] data.table_1.10.4             httpuv_1.3.3                 
 [93] tidyr_0.6.1                   gtable_0.2.0                 
 [95] reshape_0.8.6                 ggplot2_2.2.1                
 [97] mime_0.5                      xtable_1.8-2                 
 [99] survival_2.41-3               OrganismDbi_1.16.0           
[101] tibble_1.3.0                  GenomicAlignments_1.10.1     
[103] AnnotationDbi_1.36.2          memoise_1.0.0                
[105] IRanges_2.8.2                 cluster_2.0.6                
[107] interactiveDisplayBase_1.12.0 GSEABase_1.36.0     
ADD COMMENTlink modified 7 months ago by Guangchuang Yu800 • written 7 months ago by thyagoleal20
0
gravatar for Guangchuang Yu
7 months ago by
Hong Kong
Guangchuang Yu800 wrote:

Hi, you can use dotplot to visualize GSEA results.

I didn’t implement barplot for GSEA. If you really want this function, please open a feature request issue on github.

ADD COMMENTlink written 7 months ago by Guangchuang Yu800

please also checkout my blog post and also the homepage of clusterProfiler.

ADD REPLYlink modified 7 months ago • written 7 months ago by Guangchuang Yu800
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 139 users visited in the last hour