TranslationalBioinformaticsUnit / GeneSetCluster

a tool for summarizing and integrating gene-set analysis results
GNU General Public License v3.0
16 stars 4 forks source link

Tutorial Step 4 error in ORAGeneSets and GetSTRINGdbPerGeneSets #4

Closed PilarBas closed 4 years ago

PilarBas commented 4 years ago

Hi, thanks for your amazing work. I found really interesting your publications and I was trying to follow the tutorial in the wiki but I have found an error and I don't know how to continue.

I am very new to R and everything was going smoothly until the Step 4. Here is the code that I ran without success even though I just copied the extract script from the tutorial. The R session details are also attacked below.

> IPA.KOvsWT.ORA.all <- ORAGeneSets(Object = IPA.KOvsWT, ORA.returned = 10, unique.per.cluster = F)
[=========================================================]
[<<<<               ORAGeneSets START                >>>>>]
-----------------------------------------------------------
Loading the functional categories...
Loading the ID list...
Loading the reference list...
Performing the enrichment analysis...
Loading the functional categories...
Loading the ID list...
Loading the reference list...
Performing the enrichment analysis...
Loading the functional categories...
Loading the ID list...
Loading the reference list...
Performing the enrichment analysis...
Loading the functional categories...
Loading the ID list...
ERROR: No IDs are mapped. Please check your input.Error in idMappingGene(organism = organism, dataType = dataType, inputGeneFile = inputGeneFile,  : 
  ERROR: No IDs are mapped. Please check your input.

R session

R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=es_ES.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=es_ES.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=es_ES.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] org.Mm.eg.db_3.11.4  AnnotationDbi_1.50.3 IRanges_2.22.2       S4Vectors_0.26.1     Biobase_2.48.0       BiocGenerics_0.34.0 
 [7] WebGestaltR_0.4.4    ggplot2_3.3.2        limma_3.44.3         readxl_1.3.1         GeneSetCluster_1.2.1

loaded via a namespace (and not attached):
  [1] backports_1.1.10       fastmatch_1.1-0        systemfonts_0.3.2      plyr_1.8.6             igraph_1.2.6          
  [6] splines_4.0.3          BiocParallel_1.22.0    urltools_1.7.3         digest_0.6.26          foreach_1.5.1         
 [11] GOSemSim_2.14.2        viridis_0.5.1          GO.db_3.11.4           rle_0.9.2              magrittr_1.5          
 [16] memoise_1.1.0          cluster_2.1.0          doParallel_1.0.16      openxlsx_4.2.2         sna_2.6               
 [21] readr_1.4.0            graphlayouts_0.7.0     svglite_1.2.3.2        enrichplot_1.8.1       prettyunits_1.1.1     
 [26] colorspace_1.4-1       blob_1.2.1             ggrepel_0.8.2          haven_2.3.1            dplyr_1.0.2           
 [31] crayon_1.3.4           RCurl_1.98-1.2         jsonlite_1.7.1         scatterpie_0.1.5       iterators_1.0.13      
 [36] glue_1.4.2             hash_2.2.6.1           polyclip_1.10-0        gtable_0.3.0           car_3.0-10            
 [41] apcluster_1.4.8        abind_1.4-5            scales_1.1.1           DOSE_3.14.0            pheatmap_1.0.12       
 [46] DBI_1.1.0              GGally_2.0.0           rngtools_1.5           rstatix_0.6.0          Rcpp_1.0.5            
 [51] plotrix_3.7-8          viridisLite_0.3.0      progress_1.2.2         gridGraphics_0.5-0     foreign_0.8-79        
 [56] bit_4.0.4              europepmc_0.4          sqldf_0.4-11           httr_1.4.2             fgsea_1.14.0          
 [61] gplots_3.1.0           RColorBrewer_1.1-2     ellipsis_0.3.1         factoextra_1.0.7       pkgconfig_2.0.3       
 [66] reshape_0.8.8          farver_2.0.3           STRINGdb_2.0.2         labeling_0.4.2         ggplotify_0.0.5       
 [71] tidyselect_1.1.0       rlang_0.4.8            reshape2_1.4.4         munsell_0.5.0          cellranger_1.1.0      
 [76] tools_4.0.3            downloader_0.4         gsubfn_0.7             generics_0.0.2         RSQLite_2.2.1         
 [81] statnet.common_4.4.1   broom_0.7.2            ggridges_0.5.2         stringr_1.4.0          org.Hs.eg.db_3.11.4   
 [86] bit64_4.0.5            tidygraph_1.2.0        zip_2.1.1              caTools_1.18.0         purrr_0.3.4           
 [91] ggraph_2.0.3           doRNG_1.8.2            whisker_0.4            clustree_0.4.3         DO.db_2.9             
 [96] xml2_1.3.2             compiler_4.0.3         rstudioapi_0.11        curl_4.3               png_0.1-7             
[101] ggsignif_0.6.0         tibble_3.0.4           tweenr_1.0.1           stringi_1.5.3          forcats_0.5.0         
[106] gdtools_0.2.2          lattice_0.20-41        Matrix_1.2-18          vctrs_0.3.4            pillar_1.4.6          
[111] lifecycle_0.2.0        BiocManager_1.30.10    triebeard_0.3.0        data.table_1.13.2      cowplot_1.1.0         
[116] bitops_1.0-6           qvalue_2.20.0          R6_2.4.1               network_1.16.1         KernSmooth_2.23-17    
[121] gridExtra_2.3          rio_0.5.16             codetools_0.2-16       MASS_7.3-53            gtools_3.8.2          
[126] chron_2.3-56           proto_1.0.0            withr_2.3.0            hms_0.5.3              clusterProfiler_3.16.1
[131] grid_4.0.3             coda_0.19-4            tidyr_1.1.2            rvcheck_0.1.8          carData_3.0-4         
[136] ggpubr_0.4.0           ggforce_0.3.2         
EwoudEwing commented 4 years ago

Hej Pilar,

Thank you for trying out the tool!

Using the ORA plugin from webgestalt is a little finicky.

In this case if you want to run it for all the clusters and a cluster doesn’t have any results the function stops. The solution is using the check.error=T option of the function. This simply checks to see if the plugin for that cluster can be run. If not it skips it. This basically means running the function 2x and only save the results if it runs. This slows down the code but does mean it can run.

So the code would be: IPA.KOvsWT.ORA.all <- ORAGeneSets(Object = IPA.KOvsWT, ORA.returned = 10, unique.per.cluster = F, check.error=T )

Hope this helps :)

Best, Ewoud

PilarBas commented 4 years ago

Thanks for providing the solution for the previous issue, everything worked perfectly afterwards. However, another Error appeared later that I wasn´t able to solve.

IPA.KOvsWT.String.all <- GetSTRINGdbPerGeneSets(Object = IPA.KOvsWT, unique.per.cluster = F, plot.input="All")
[==================================================================]
[<<<<             GetSTRINGdbPerGeneSets START                >>>>>]
--------------------------------------------------------------------
ERROR: Currently STRINGdb only supports the most recent version of STRING:  11.0Error in .Object$initialize(...) : 

The R session is the same as in the previous issue.

Thank you in advance, Pilar

EwoudEwing commented 4 years ago

Hej Hej,

It seems that StringDB package has been updated since I wrote the function (I based the plugin on version 1.18) and you have version 2.0.2 installed (According to Bioconducter that is the latest version). I assume that is why the function wont run. I will see what the differences are between the versions and update the package accordingly.

Best, Ewoud

EwoudEwing commented 4 years ago

Hej Pilar,

StringDB has updated from version 10 to 11, and that needs to be set in the R plugin as well. I updated the package so that it connects to the right version. Furthermore there was a little change later in the plugin as well in Version 2.0.2. But everything should work now.

Let me know if this works :)

Best, Ewoud

PilarBas commented 4 years ago

Thank you again!

Now I could complete all the tutorial without any error