bzhanglab / WebGestaltR

R package for WebGestalt
https://bzhanglab.github.io/WebGestaltR/
34 stars 14 forks source link

Error in !is.na(data) && !is.null(data) #27

Closed ErickMUO closed 1 year ago

ErickMUO commented 1 year ago

Dear WebGestaltR team,

I have recently encountered an error while attempting to run GSEA analysis using WebGestaltR. It's puzzling because the code I have been using was functioning correctly in the past months. I have also tried using a different .rnk file, and the issue persists. Interestingly, when I ran the same code with a previously validated .rnk file, I encountered the same error messages. The only notable difference is that I am currently running the analysis on a MacPro arm64 system, as indicated by the sessionInfo().

The full error message is: Loading the functional categories... Error in !is.na(data) && !is.null(data) : 'length = 70' in coercion to 'logical(1)'

R version 4.3.0 (2023-04-21) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Ventura 13.3.1

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Stockholm tzcode source: internal

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

other attached packages: [1] WebGestaltR_0.4.5 Biobase_2.60.0 BiocGenerics_0.46.0

loaded via a namespace (and not attached): [1] splines_4.3.0 later_1.3.1 bitops_1.0-7
[4] filelock_1.0.2 tibble_3.2.1 pcaExplorer_2.26.1
[7] graph_1.78.0 XML_3.99-0.14 lifecycle_1.0.3
[10] topGO_2.52.0 doParallel_1.0.17 lattice_0.21-8
[13] crosstalk_1.2.0 dendextend_1.17.1 magrittr_2.0.3
[16] limma_3.56.1 plotly_4.10.1 rmarkdown_2.21
[19] shinyBS_0.61.1 httpuv_1.6.11 NMF_0.26
[22] doRNG_1.8.6 DBI_1.1.3 RColorBrewer_1.1-3
[25] zlibbioc_1.46.0 GenomicRanges_1.52.0 purrr_1.0.1
[28] RCurl_1.98-1.12 rappdirs_0.3.3 seriation_1.4.2
[31] GenomeInfoDbData_1.2.10 IRanges_2.34.0 S4Vectors_0.38.1
[34] ggrepel_0.9.3 AnnotationForge_1.42.0 genefilter_1.82.1
[37] pheatmap_1.0.12 annotate_1.78.0 svglite_2.1.1
[40] codetools_0.2-19 DelayedArray_0.26.2 DT_0.27
[43] xml2_1.3.4 tidyselect_1.2.0 GOstats_2.66.0
[46] viridis_0.6.3 TSP_1.2-4 matrixStats_0.63.0
[49] stats4_4.3.0 BiocFileCache_2.8.0 base64enc_0.1-3
[52] webshot_0.5.4 jsonlite_1.8.4 ellipsis_0.3.2
[55] survival_3.5-5 iterators_1.0.14 systemfonts_1.0.4
[58] foreach_1.5.2 tools_4.3.0 progress_1.2.2
[61] Rcpp_1.0.10 glue_1.6.2 gridExtra_2.3
[64] xfun_0.39 DESeq2_1.40.1 MatrixGenerics_1.12.0
[67] GenomeInfoDb_1.36.0 dplyr_1.1.2 ca_0.71.1
[70] shinydashboard_0.7.2 BiocManager_1.30.20 Category_2.66.0
[73] fastmap_1.1.1 fansi_1.0.4 SparseM_1.81
[76] digest_0.6.31 R6_2.5.1 mime_0.12
[79] colorspace_2.1-0 GO.db_3.17.0 biomaRt_2.56.0
[82] RSQLite_2.3.1 threejs_0.3.3 utf8_1.2.3
[85] tidyr_1.3.0 generics_0.1.3 data.table_1.14.8
[88] prettyunits_1.1.1 httr_1.4.5 htmlwidgets_1.6.2
[91] S4Arrays_1.0.1 whisker_0.4.1 pkgconfig_2.0.3
[94] gtable_0.3.3 blob_1.2.4 registry_0.5-1
[97] XVector_0.40.0 htmltools_0.5.5 RBGL_1.76.0
[100] GSEABase_1.62.0 scales_1.2.1 png_0.1-8
[103] knitr_1.42 rstudioapi_0.14 tzdb_0.3.0
[106] reshape2_1.4.4 curl_5.0.0 shinyAce_0.4.2
[109] cachem_1.0.8 stringr_1.5.0 parallel_4.3.0
[112] AnnotationDbi_1.62.1 pillar_1.9.0 grid_4.3.0
[115] vctrs_0.6.2 promises_1.2.0.1 dbplyr_2.3.2
[118] xtable_1.8-4 cluster_2.1.4 Rgraphviz_2.44.0
[121] evaluate_0.21 readr_2.1.4 cli_3.6.1
[124] locfit_1.5-9.7 compiler_4.3.0 rlang_1.1.1
[127] crayon_1.5.2 rngtools_1.5.2 heatmaply_1.4.2
[130] plyr_1.8.8 stringi_1.7.12 viridisLite_0.4.2
[133] gridBase_0.4-7 BiocParallel_1.34.1 assertthat_0.2.1
[136] munsell_0.5.0 Biostrings_2.68.0 lazyeval_0.2.2
[139] Matrix_1.5-4 hms_1.1.3 bit64_4.0.5
[142] ggplot2_3.4.2 KEGGREST_1.40.0 shiny_1.7.4
[145] SummarizedExperiment_1.30.1 apcluster_1.4.10 igraph_1.4.2
[148] memoise_2.0.1 bit_4.0.5

fifdick commented 1 year ago

I have encountered the same error after updating to version WebGestaltR_0.4.5 traceback() shows that the error comes fromloadGeneSet ---> readGMT()

The error message was: 'length = 70' in coercion to 'logical(1)' The length depends on which enrichDatabse is used.

My function call:

WebGestaltR(enrichDatabase = db,
            interestGene = myGenes, 
        interestGeneType = "genesymbol",
        referenceGene = df$gene_name,
        referenceGeneType = "genesymbol",
    hostName="https://www.webgestalt.org/",
    isOutput = T,
    organism = "hsapiens")

R version 4.3.0 (2023-04-21)

yxngl commented 1 year ago

Can you try using the latest version on GitHub? I think it is related to newer versions of R, and https://github.com/bzhanglab/WebGestaltR/pull/23 is supposed to fix it. If it works, I will push it to CRAN.

fifdick commented 1 year ago

Fixed! Thanks

ErickMUO commented 1 year ago

Also worked for me thank you!