DESeq2 - Upgrade from 1.20.0 to 1.22.1 now gives warnings 'package:stats' may not be available when loading
2
3
Entering edit mode
Benoit.Fiset ▴ 30
@benoitfiset-18473
Last seen 4.5 years ago

Hi,

This week was the week to upgrade to Bioconductor version '3.8' (from 3.7) so DESeq2 also got a facelift.

So running SAME exact code with new upgraded DESeq2 now getting warnings when running DESeq()

> dds<-DESeq(ddsHTSeq,parallel = TRUE)
estimating size factors
estimating dispersions
gene-wise dispersion estimates: 6 workers
mean-dispersion relationship
final dispersion estimates, fitting model and testing: 6 workers
-- replacing outliers and refitting for 456 genes
-- DESeq argument 'minReplicatesForReplace' = 7
-- original counts are preserved in counts(dds)
estimating dispersions
fitting model and testing
There were 12 warnings (use warnings() to see them)

> summary(warnings())
12 identical warnings:
In serialize(data, node$con, xdr = FALSE) :
  'package:stats' may not be available when loading
> 

> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

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

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

other attached packages:
[1] DESeq2_1.22.1               SummarizedExperiment_1.12.0 DelayedArray_0.8.0          BiocParallel_1.16.0       
[5] matrixStats_0.54.0          Biobase_2.42.0              GenomicRanges_1.34.0        GenomeInfoDb_1.18.1       
[9] IRanges_2.16.0              S4Vectors_0.20.1            BiocGenerics_0.28.0        

loaded via a namespace (and not attached):
[1] bit64_0.9-7            splines_3.5.1          Formula_1.2-3          assertthat_0.2.0       latticeExtra_0.6-28  
[6] blob_1.1.1             GenomeInfoDbData_1.2.0 yaml_2.2.0             pillar_1.3.0           RSQLite_2.1.1        
[11] backports_1.1.2        lattice_0.20-38        glue_1.3.0             digest_0.6.18          RColorBrewer_1.1-2   
[16] XVector_0.22.0         checkmate_1.8.5        colorspace_1.3-2       htmltools_0.3.6        Matrix_1.2-15        
[21] plyr_1.8.4             XML_3.98-1.16          pkgconfig_2.0.2        genefilter_1.64.0      zlibbioc_1.28.0      
[26] purrr_0.2.5            xtable_1.8-3           scales_1.0.0           htmlTable_1.12         tibble_1.4.2         
[31] annotate_1.60.0        ggplot2_3.1.0          nnet_7.3-12            lazyeval_0.2.1         survival_2.43-1      
[36] magrittr_1.5           crayon_1.3.4           memoise_1.1.0          foreign_0.8-71         tools_3.5.1          
[41] data.table_1.11.8      stringr_1.3.1          locfit_1.5-9.1         munsell_0.5.0          cluster_2.0.7-1      
[46] AnnotationDbi_1.44.0   bindrcpp_0.2.2         compiler_3.5.1         rlang_0.3.0.1          grid_3.5.1           
[51] RCurl_1.95-4.11        rstudioapi_0.8         htmlwidgets_1.3        bitops_1.0-6           base64enc_0.1-3      
[56] gtable_0.2.0           DBI_1.0.0              R6_2.3.0               gridExtra_2.3          knitr_1.20           
[61] dplyr_0.7.8            bit_1.1-14             bindr_0.1.1            Hmisc_4.1-1            stringi_1.2.4        
[66] Rcpp_1.0.0             geneplotter_1.60.0     rpart_4.1-13           acepack_1.4.1          tidyselect_0.2.5

 

So to validate what is going on, downgraded back to Bioconductor version '3.7' and to DESeq 1.20.0

(BiocManager::install(version = '3.7')
if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("DESeq2", version = "3.7")

> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

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

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

other attached packages:
[1] DESeq2_1.20.0               SummarizedExperiment_1.10.1 DelayedArray_0.6.6          BiocParallel_1.14.2      
[5] matrixStats_0.54.0          Biobase_2.40.0              GenomicRanges_1.32.7        GenomeInfoDb_1.16.0      
[9] IRanges_2.14.12             S4Vectors_0.18.3            BiocGenerics_0.26.0       

loaded via a namespace (and not attached):
[1] bit64_0.9-7            splines_3.5.1          Formula_1.2-3          assertthat_0.2.0       latticeExtra_0.6-28 
[6] blob_1.1.1             GenomeInfoDbData_1.1.0 yaml_2.2.0             pillar_1.3.0           RSQLite_2.1.1       
[11] backports_1.1.2        lattice_0.20-38        glue_1.3.0             digest_0.6.18          RColorBrewer_1.1-2  
[16] XVector_0.20.0         checkmate_1.8.5        colorspace_1.3-2       htmltools_0.3.6        Matrix_1.2-15       
[21] plyr_1.8.4             XML_3.98-1.16          pkgconfig_2.0.2        genefilter_1.62.0      zlibbioc_1.26.0     
[26] purrr_0.2.5            xtable_1.8-3           scales_1.0.0           htmlTable_1.12         tibble_1.4.2        
[31] annotate_1.58.0        ggplot2_3.1.0          nnet_7.3-12            lazyeval_0.2.1         survival_2.43-1     
[36] magrittr_1.5           crayon_1.3.4           memoise_1.1.0          foreign_0.8-71         tools_3.5.1         
[41] data.table_1.11.8      stringr_1.3.1          locfit_1.5-9.1         munsell_0.5.0          cluster_2.0.7-1     
[46] AnnotationDbi_1.42.1   bindrcpp_0.2.2         compiler_3.5.1         rlang_0.3.0.1          grid_3.5.1          
[51] RCurl_1.95-4.11        rstudioapi_0.8         htmlwidgets_1.3        bitops_1.0-6           base64enc_0.1-3     
[56] gtable_0.2.0           DBI_1.0.0              R6_2.3.0               gridExtra_2.3          knitr_1.20          
[61] dplyr_0.7.8            bit_1.1-14             bindr_0.1.1            Hmisc_4.1-1            stringi_1.2.4       
[66] Rcpp_1.0.0             geneplotter_1.58.0     rpart_4.1-13           acepack_1.4.1          tidyselect_0.2.5

dds<-DESeq(ddsHTSeq,parallel = TRUE)
estimating size factors
estimating dispersions
gene-wise dispersion estimates: 6 workers
mean-dispersion relationship
final dispersion estimates, fitting model and testing: 6 workers
-- replacing outliers and refitting for 456 genes
-- DESeq argument 'minReplicatesForReplace' = 7
-- original counts are preserved in counts(dds)
estimating dispersions
fitting model and testing
>

Now more Warnings... all gone with DESeq2_1.20.0.

And idea what happened between DESeq2_1.20.0 and DESeq2_1.22.1 for these warnings, and how to fix ?

Thanks,

B.

deseq2 • 3.2k views
ADD COMMENT
0
Entering edit mode

Forgot to write that results(), now with DESeq2_1.22.1, also give the same warning...

> res<-results(dds,parallel = TRUE,contrast=c("condition",sampleLevels))
Warning messages:
1: In serialize(data, node$con, xdr = FALSE) :
  'package:stats' may not be available when loading
2: In serialize(data, node$con, xdr = FALSE) :
  'package:stats' may not be available when loading
3: In serialize(data, node$con, xdr = FALSE) :
  'package:stats' may not be available when loading
4: In serialize(data, node$con, xdr = FALSE) :
  'package:stats' may not be available when loading
5: In serialize(data, node$con, xdr = FALSE) :
  'package:stats' may not be available when loading
6: In serialize(data, node$con, xdr = FALSE) :
  'package:stats' may not be available when loading
ADD REPLY
0
Entering edit mode

Is this with RStudio, or from the command line? If from RStudio, is the same observed from the command line?

ADD REPLY
1
Entering edit mode
@martin-morgan-1513
Last seen 4 days ago
United States

This seems to be a complicated side-effect of a change to BiocParallel, where each param has a exportGlobals = option; set this to FALSE to avoid the warning, e.g.,

register(MulticoreParam(exportGlobals = FALSE))

UPDATE: a patched version should be available as BiocParallel 1.16.1 (Release 3.8) or 1.17.2 (devel).

ADD COMMENT
0
Entering edit mode

Thanks for hunting it down

ADD REPLY
0
Entering edit mode

Thanks Michael. 

So to fix  I set : register(MulticoreParam(exportGlobals = FALSE))

Or update  BiocParallel 1.16.1 ?

Thanks.

ADD REPLY
0
Entering edit mode

I haven't tried out generating this warning, but Martin's suggestion was to use that argument.

ADD REPLY
0
Entering edit mode

Either solution (upgrade or set the argument) should work; 1.16.1 is available now via BiocManager::install("BiocParallel").

ADD REPLY
0
Entering edit mode

Ok... updated to BiocParallel_1.16.1 and warnings are all gone :)

> dds<-DESeq(ddsHTSeq,parallel = TRUE)
estimating size factors
estimating dispersions
gene-wise dispersion estimates: 6 workers
mean-dispersion relationship
final dispersion estimates, fitting model and testing: 6 workers
>

Thanks for the fix.

ADD REPLY
0
Entering edit mode
@mikelove
Last seen 1 day ago
United States

I haven’t seen this. There wasn’t really any code change to DESeq2. I wonder if it has to do with the parallel setup you are using. What are you register()-ing before running the DESeq2 code?

ADD COMMENT

Login before adding your answer.

Traffic: 642 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6