clusterProfiler icon indicating copy to clipboard operation
clusterProfiler copied to clipboard

Different behaviour of gseGO upon setting nPerm=1000

Open olgabaranov opened this issue 1 month ago • 0 comments

On my attempt to increase the number of permutations in gseGO I am faced with an unexpected behaviour of the function:

> set.seed(1)
> gse <- gseGO(fullist,
        ont = "BP",
        keyType = "ENSEMBL",
        OrgDb = "org.Hs.eg.db"
)
> dim(gse)

[1] 7 11

When repeating it with nPerm = 1000 actively set:

> set.seed(1)
> gse <- gseGO(fullist,
        ont = "BP",
        keyType = "ENSEMBL",
        OrgDb = "org.Hs.eg.db",
        nPerm = 1000
)
> dim(gse)

[1] 0 11

But as far as I know, nPerm=1000 is the default so I would expect same results for both. The result is the same (0) regardless of the exact value of nPerm.

Apologies for not providing a reproducible example as I can't find a public dataset to use for it. I can try to make it work later...

R version 4.4.0 (2024-04-24)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.4 LTS

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

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

time zone: Europe/Berlin
tzcode source: system (glibc)

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

other attached packages:
 [1] GSEABase_1.66.0             graph_1.82.0               
 [3] annotate_1.82.0             XML_3.99-0.16.1            
 [5] BiocManager_1.30.23         biomaRt_2.60.0             
 [7] org.Hs.eg.db_3.19.1         AnnotationDbi_1.66.0       
 [9] pathfindR_2.4.1.9000        pathfindR.data_2.1.0       
[11] EnhancedVolcano_1.22.0      ggrepel_0.9.5              
[13] clusterProfiler_4.12.0      sva_3.52.0                 
[15] BiocParallel_1.38.0         genefilter_1.86.0          
[17] mgcv_1.8-41                 nlme_3.1-162               
[19] DESeq2_1.44.0               SummarizedExperiment_1.34.0
[21] Biobase_2.64.0              MatrixGenerics_1.16.0      
[23] matrixStats_1.3.0           GenomicRanges_1.56.0       
[25] GenomeInfoDb_1.40.0         IRanges_2.38.0             
[27] S4Vectors_0.42.0            BiocGenerics_0.50.0        
[29] lubridate_1.9.3             forcats_1.0.0              
[31] stringr_1.5.1               dplyr_1.1.4                
[33] purrr_1.0.2                 readr_2.1.5                
[35] tidyr_1.3.1                 tibble_3.2.1               
[37] ggplot2_3.5.1               tidyverse_2.0.0            

olgabaranov avatar May 17 '24 10:05 olgabaranov