sneumann / xcms

This is the git repository matching the Bioconductor package xcms: LC/MS and GC/MS Data Analysis
Other
183 stars 80 forks source link

xcms::xcmsSet broken on Bioc Devel (3.12) branch, "invalid class “xcmsFileSource” object: superclass "characterORconnection" " #486

Closed andzajan closed 4 years ago

andzajan commented 4 years ago

Hi, I was getting strange message when trying to load xcmsSet object created with xcms 3.10.1 in Bioconductor development version.

Output for data("MTBLS404_xset", package = "qcrmsData"):
    Warning message:
    multiple methods tables found for 'which' 

Forcing Github action to use Bioc 3.11 did solve the problem: https://github.com/computational-metabolomics/qcrmsData/actions

I find it strange that Github actions build was working fine with xcms 3.11 on Linux, but failed on MS Windows and MAC: https://github.com/computational-metabolomics/qcrmsData/runs/761968676?check_suite_focus=true

I did try to investigate using Windows OS and did run this example:

library(xcms)
library(faahKO)

cdfs <- dir(system.file("cdf", package="faahKO"), full.names=TRUE,
    recursive=TRUE)
xset <- xcmsSet(cdfs, method='centWave', ppm=25, peakwidth=c(20, 80),
    snthresh=10, prefilter=c(3,100), integrate=1, mzdiff=-0.001,
    verbose.columns=FALSE, fitgauss=FALSE, noise=5000)

I am getting this error message:

Loading required package: xcms
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap, parApply, parCapply,
    parLapply, parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from ‘package:stats’:

    IQR, mad, sd, var, xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames, dirname, do.call, duplicated, eval,
    evalq, Filter, Find, get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget, order,
    paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind, Reduce, rownames, sapply, setdiff, sort,
    table, tapply, union, unique, unsplit, which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with 'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: BiocParallel
Loading required package: MSnbase
Loading required package: mzR
Loading required package: Rcpp
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: ‘S4Vectors’

The following object is masked from ‘package:base’:

    expand.grid

Loading required package: ProtGenerics

Attaching package: ‘ProtGenerics’

The following object is masked from ‘package:stats’:

    smooth

This is MSnbase version 2.15.2 
  Visit https://lgatto.github.io/MSnbase/ to get started.

Attaching package: ‘MSnbase’

The following object is masked from ‘package:base’:

    trimws

This is xcms version 3.11.0 

Attaching package: ‘xcms’

The following object is masked from ‘package:stats’:

    sigma

Error in xcmsSet(cdfs, method = "centWave", ppm = 25, peakwidth = c(20,  : 
  Chromatographic peak detection failed for all files! The first error was: Error in validObject(.Object): invalid class “xcmsFileSource” object: superclass "characterORconnection" not defined in the environment of the object's class
In addition: Warning messages:
1: In serialize(data, node$con) :
  'package:stats' may not be available when loading
2: In serialize(data, node$con) :
  'package:stats' may not be available when loading
3: In serialize(data, node$con) :
  'package:stats' may not be available when loading
4: In serialize(data, node$con) :
  'package:stats' may not be available when loading
5: In serialize(data, node$con) :
  'package:stats' may not be available when loading
6: In serialize(data, node$con) :
  'package:stats' may not be available when loading
7: In serialize(data, node$con) :
  'package:stats' may not be available when loading
8: In serialize(data, node$con) :
  'package:stats' may not be available when loading
9: In serialize(data, node$con) :
  'package:stats' may not be available when loading
10: In serialize(data, node$con) :
  'package:stats' may not be available when loading
> BiocManager::install()
Bioconductor version 3.12 (BiocManager 1.30.10), R 4.0.1 (2020-06-06)

> BiocManager::valid()
[1] TRUE
> sessionInfo()
R version 4.0.1 (2020-06-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

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

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

other attached packages:
 [1] faahKO_1.29.0       xcms_3.11.0         MSnbase_2.15.2      ProtGenerics_1.21.0 S4Vectors_0.27.12  
 [6] mzR_2.23.0          Rcpp_1.0.4.6        BiocParallel_1.23.0 Biobase_2.49.0      BiocGenerics_0.35.4

loaded via a namespace (and not attached):
 [1] SummarizedExperiment_1.19.5 lattice_0.20-41             colorspace_1.4-1            vctrs_0.3.1                
 [5] snow_0.4-3                  usethis_1.6.1               vsn_3.57.0                  XML_3.99-0.3               
 [9] rlang_0.4.6                 pillar_1.4.4                glue_1.4.1                  affy_1.67.0                
[13] RColorBrewer_1.1-2          matrixStats_0.56.0          affyio_1.59.0               GenomeInfoDbData_1.2.3     
[17] foreach_1.5.0               lifecycle_0.2.0             plyr_1.8.6                  mzID_1.27.0                
[21] robustbase_0.93-6           zlibbioc_1.35.0             munsell_0.5.0               pcaMethods_1.81.0          
[25] gtable_0.3.0                codetools_0.2-16            IRanges_2.23.9              doParallel_1.0.15          
[29] GenomeInfoDb_1.25.1         MassSpecWavelet_1.55.0      preprocessCore_1.51.0       DEoptimR_1.0-8             
[33] scales_1.1.1                BiocManager_1.30.10         limma_3.45.5                DelayedArray_0.15.1        
[37] XVector_0.29.2              fs_1.4.1                    RANN_2.6.1                  impute_1.63.0              
[41] ggplot2_3.3.1               digest_0.6.25               ncdf4_1.17                  GenomicRanges_1.41.5       
[45] grid_4.0.1                  tools_4.0.1                 bitops_1.0-6                magrittr_1.5               
[49] RCurl_1.98-1.2              tibble_3.0.1                crayon_1.3.4                pkgconfig_2.0.3            
[53] MASS_7.3-51.6               ellipsis_0.3.1              Matrix_1.2-18               rstudioapi_0.11            
[57] iterators_1.0.12            R6_2.4.1                    MALDIquant_1.19.3           compiler_4.0.1
andzajan commented 4 years ago

Has been fixed in xcms 3.11.2.

> sessionInfo()
R version 4.0.1 (2020-06-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

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

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

other attached packages:
 [1] faahKO_1.29.0       xcms_3.11.2         MSnbase_2.15.2     
 [4] ProtGenerics_1.21.0 S4Vectors_0.27.12   mzR_2.23.0         
 [7] Rcpp_1.0.4.6        BiocParallel_1.23.0 Biobase_2.49.0     
[10] BiocGenerics_0.35.4

loaded via a namespace (and not attached):
 [1] vsn_3.57.0                  pkgload_1.1.0              
 [3] foreach_1.5.0               assertthat_0.2.1           
 [5] BiocManager_1.30.10         affy_1.67.0                
 [7] GenomeInfoDbData_1.2.3      robustbase_0.93-6          
 [9] remotes_2.1.1               impute_1.63.0              
[11] sessioninfo_1.1.1           pillar_1.4.4               
[13] backports_1.1.7             lattice_0.20-41            
[15] glue_1.4.1                  limma_3.45.6               
[17] digest_0.6.25               XVector_0.29.2             
[19] GenomicRanges_1.41.5        RColorBrewer_1.1-2         
[21] colorspace_1.4-1            Matrix_1.2-18              
[23] preprocessCore_1.51.0       plyr_1.8.6                 
[25] MALDIquant_1.19.3           XML_3.99-0.3               
[27] pkgconfig_2.0.3             devtools_2.3.0             
[29] rcmdcheck_1.3.3             zlibbioc_1.35.0            
[31] snow_0.4-3                  scales_1.1.1               
[33] RANN_2.6.1                  processx_3.4.2             
[35] affyio_1.59.0               tibble_3.0.1               
[37] IRanges_2.23.9              ggplot2_3.3.1              
[39] usethis_1.6.1               ellipsis_0.3.1             
[41] withr_2.2.0                 SummarizedExperiment_1.19.5
[43] MassSpecWavelet_1.55.0      cli_2.0.2                  
[45] magrittr_1.5                crayon_1.3.4               
[47] memoise_1.1.0               ps_1.3.3                   
[49] fs_1.4.1                    ncdf4_1.17                 
[51] fansi_0.4.1                 doParallel_1.0.15          
[53] MASS_7.3-51.6               pkgbuild_1.0.8             
[55] tools_4.0.1                 prettyunits_1.1.1          
[57] matrixStats_0.56.0          lifecycle_0.2.0            
[59] xopen_1.0.0                 munsell_0.5.0              
[61] DelayedArray_0.15.3         callr_3.4.3                
[63] GenomeInfoDb_1.25.1         pcaMethods_1.81.0          
[65] compiler_4.0.1              mzID_1.27.0                
[67] rlang_0.4.6                 RCurl_1.98-1.2             
[69] grid_4.0.1                  iterators_1.0.12           
[71] rstudioapi_0.11             bitops_1.0-6               
[73] testthat_2.3.2              gtable_0.3.0               
[75] codetools_0.2-16            R6_2.4.1                   
[77] rprojroot_1.3-2             desc_1.2.0                 
[79] vctrs_0.3.1                 DEoptimR_1.0-8             
> BiocManager::valid()
[1] TRUE
> BiocManager::install()
Bioconductor version 3.12 (BiocManager 1.30.10), R 4.0.1 (2020-06-06)