Error when running parallelized process: Warning in serialize... package:stats may not be available when loading

Hi,

I'm running a GSEA analysis using the fgsea package (GitHub - ctlab/fgsea: Fast Gene Set Enrichment Analysis) which has a function that utilizes the "BiocParallel" function to use more than 1 core at a time to accelerate the calculation.

While running the function 'fgseaMultilevel() ' in RStudio, the calculation completes, but I get a series of warnings (the first of which is expected). BUT, when I run the code directly in the R Console, I don't get the warnings.

The function correctly identifies that SnowParam() (rather than MulticoreParam() ) should be used, as I'm on windows, without my needing to explicity specificy it.

Here is my sessionInfo() and the warnings.

sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)

Matrix products: default

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

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

other attached packages:
[1] fgsea_1.19.2 tidyr_1.1.3 ggplot2_3.3.5 dplyr_1.0.7 here_1.0.1

loaded via a namespace (and not attached):
[1] Rcpp_1.0.7 pillar_1.6.1 compiler_4.1.0 tools_4.1.0 digest_0.6.27
[6] evaluate_0.14 lifecycle_1.0.0 tibble_3.1.2 gtable_0.3.0 lattice_0.20-44
[11] pkgconfig_2.0.3 rlang_0.4.11 fastmatch_1.1-0 Matrix_1.3-3 DBI_1.1.1
[16] patchwork_1.1.1 parallel_4.1.0 yaml_2.2.1 xfun_0.24 gridExtra_2.3
[21] withr_2.4.2 knitr_1.33 generics_0.1.0 vctrs_0.3.8 htmlwidgets_1.5.3
[26] rprojroot_2.0.2 DT_0.18 grid_4.1.0 tidyselect_1.1.1 data.table_1.14.0
[31] glue_1.4.2 R6_2.5.0 fansi_0.5.0 BiocParallel_1.26.1 rmarkdown_2.9
[36] purrr_0.3.4 magrittr_2.0.1 scales_1.1.1 ellipsis_0.3.2 htmltools_0.5.1.1
[41] assertthat_0.2.1 colorspace_2.0-2 utf8_1.2.1 munsell_0.5.0 crayon_1.4.1

fgseaMultiLevel(pathway, stats, eps = 0, minSize = 15, maxSize = 200)

warnings:
Warning in preparePathwaysAndStats(pathways, stats, minSize, maxSize, gseaParam, :
There are ties in the preranked stats (11.52% of the list).
The order of those tied genes will be arbitrary, which may produce unexpected results.
Warning in serialize(data, node$con) :
'package:stats' may not be available when loading
Warning in serialize(data, node$con) :
'package:stats' may not be available when loading
Warning in serialize(data, node$con) :
'package:stats' may not be available when loading
Warning in serialize(data, node$con) :
'package:stats' may not be available when loading
Warning in serialize(data, node$con) :
'package:stats' may not be available when loading
Warning in serialize(data, node$con) :
'package:stats' may not be available when loading
Warning in serialize(data, node$con) :
'package:stats' may not be available when loading
Warning in serialize(data, node$con) :
'package:stats' may not be available when loading
Warning in serialize(data, node$con) :
'package:stats' may not be available when loading
Warning in serialize(data, node$con) :
'package:stats' may not be available when loading

I'm on a 6-core hyperthreaded Intel CPU, and SnowParam sets the nworkers = 10, and there are 10 of the 'serialize' warnings, so I'm assuming there is 1 per worker.

Interestingly, if I Knit the document, the serialize warnings aren't showing up, while the "ties" warnings do.

Any ideas what might be going on?

Thanks!
Robert

Hi,

As read in the post below, it seems that this is a know bug in RStudio you should not worry about too much...

Hope this helps,
PJ

Hi Peter,

Thanks for the link! I won't worry about it since it should be getting resolved in a future update.

Robert

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.