rietho / IPO

A Tool for automated Optimization of XCMS Parameters
http://bioconductor.org/packages/IPO/
Other
34 stars 20 forks source link

Unloading snow namespace #40

Closed mheiser-md closed 7 years ago

mheiser-md commented 8 years ago

If I load IPO together with another package that Depends on snow, I can't perform the following script:

library(doSNOW)
library(IPO)
mzdatapath <- system.file("mzData", package = "mtbls2")
mzdatafiles <- list.files(mzdatapath, recursive = TRUE, full.names=TRUE)

peakpickingParameters <- getDefaultXcmsSetStartingParams('centWave')
#setting levels for min_peakwidth to 10 and 20 (hence 15 is the center point)
peakpickingParameters$min_peakwidth <- c(10,20) 
peakpickingParameters$max_peakwidth <- c(26,42)
#setting only one value for ppm therefore this parameter is not optimized
peakpickingParameters$ppm <- 20 
resultPeakpicking <- 
  optimizeXcmsSet(files = mzdatafiles[1:4], 
                  params = peakpickingParameters, 
                  nSlaves = 2, 
                  subdir = 'rsmDirectory')

It fails with the following:

Error: package ‘snow’ is required by ‘doSNOW’ so will not be detached

The obvious work around is to not load the offending packages when doing IPO, but I was wondering if this is an IPO problem or a e.g. doSNOW problem?

> devtools::session_info()
Session info --------------------------------------------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.3.0 (2016-05-03)
 system   x86_64, linux-gnu           
 ui       RStudio (0.99.896)          
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       <NA>                        
 date     2016-06-06                  

Packages ------------------------------------------------------------------------------------------------------------------------------------------------------
 package      * version date       source                          
 acepack        1.3-3.3 2014-11-24 CRAN (R 3.3.0)                  
 Biobase      * 2.32.0  2016-05-17 Bioconductor                    
 BiocGenerics * 0.18.0  2016-05-17 Bioconductor                    
 CAMERA       * 1.28.0  2016-05-17 Bioconductor                    
 chron          2.3-47  2015-06-24 CRAN (R 3.0.2)                  
 cluster        2.0.4   2016-04-18 CRAN (R 3.2.5)                  
 codetools      0.2-14  2015-07-15 CRAN (R 3.2.2)                  
 colorspace     1.2-6   2015-03-11 CRAN (R 3.3.0)                  
 data.table     1.9.6   2015-09-19 CRAN (R 3.3.0)                  
 devtools       1.11.1  2016-04-21 CRAN (R 3.0.2)                  
 digest         0.6.9   2016-01-08 CRAN (R 3.0.2)                  
 doSNOW       * 1.0.14  2015-10-14 CRAN (R 3.3.0)                  
 foreach      * 1.4.3   2015-10-13 CRAN (R 3.3.0)                  
 foreign        0.8-66  2015-08-19 CRAN (R 3.2.2)                  
 Formula        1.2-1   2015-04-07 CRAN (R 3.3.0)                  
 ggplot2        2.1.0   2016-03-01 CRAN (R 3.3.0)                  
 graph          1.50.0  2016-05-17 Bioconductor                    
 gridExtra      2.2.1   2016-02-29 CRAN (R 3.3.0)                  
 gtable         0.2.0   2016-02-26 CRAN (R 3.3.0)                  
 Hmisc          3.17-4  2016-05-02 CRAN (R 3.3.0)                  
 igraph         1.0.1   2015-06-26 CRAN (R 3.3.0)                  
 IPO          * 1.7.5   2016-05-17 Github (glibiseller/IPO@a0798ea)
 iterators    * 1.0.8   2015-10-13 CRAN (R 3.3.0)                  
 lattice        0.20-33 2015-07-14 CRAN (R 3.2.1)                  
 latticeExtra   0.6-28  2016-02-09 CRAN (R 3.3.0)                  
 magrittr       1.5     2014-11-22 CRAN (R 3.0.2)                  
 Matrix         1.2-6   2016-05-02 CRAN (R 3.3.0)                  
 memoise        1.0.0   2016-01-29 CRAN (R 3.0.2)                  
 munsell        0.4.3   2016-02-13 CRAN (R 3.3.0)                  
 mzR          * 2.5.8   2016-05-04 Bioconductor                    
 nnet           7.3-12  2016-02-02 CRAN (R 3.2.3)                  
 plyr           1.8.3   2015-06-12 CRAN (R 3.3.0)                  
 ProtGenerics * 1.4.0   2016-05-17 Bioconductor                    
 RBGL           1.48.0  2016-05-17 Bioconductor                    
 RColorBrewer   1.1-2   2014-12-07 CRAN (R 3.3.0)                  
 Rcpp         * 0.12.5  2016-05-14 CRAN (R 3.3.0)                  
 rpart          4.1-10  2015-06-29 CRAN (R 3.2.1)                  
 rsm          * 2.7-4   2015-10-07 CRAN (R 3.3.0)                  
 scales         0.4.0   2016-02-26 CRAN (R 3.3.0)                  
 snow         * 0.4-1   2015-10-31 CRAN (R 3.3.0)                  
 survival       2.39-2  2016-04-16 CRAN (R 3.2.5)                  
 withr          1.0.1   2016-02-04 CRAN (R 3.0.2)                  
 xcms         * 1.48.0  2016-05-17 Bioconductor 
rietho commented 8 years ago

We already know about this issue (see #35). It is known to occur on linux when using FORK clustering, which IPO automatically does. Thus we unload the namespace of snow to avoid errors. In your case we run into an error, but the error message is clear.

mheiser-md commented 7 years ago

got it, thank you for clarifying!