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

Error after converting XCMSnEXP to xcmsSet #482

Closed MetabolomicsSA closed 4 years ago

MetabolomicsSA commented 4 years ago

Hi team,

I am experiencing a number of errors which could be (maybe) possibly related to the conversion of XCMSnEXP objects to xcmsSet objects. After performing peak picking and gruoping on my dataset using 'findChromPeaks' and 'groupChromPeaks' I have reverted the object to the old xcmsSet to perfrom retention time alignment and peak filling using 'fillPeaks'.

Peak filling is not completed and this error is returned.

"Error: BiocParallel errors element index: 1, 2, 3, 4, 5, 6 first error: invalid class “xcmsFileSource” object: superclass "characterORconnection" not defined in the environment of the object's class"

I have experienced another issue when I proceed with the data processing keeping the XCMSnEXP object and reverting it to the xcmsSet after performing peak filling using "fillChromPeaks". In this case, after reverting the object to the xcmsSet and using the function xsAnnotate (CAMERA) the error I get is the following :

"Error in round(groupmat[, "mzmed"], 1) : non-numeric argument to mathematical function"

I would greatly appreciate if you could be of any help with this. I am wondering where I'm going wrong, since this dataset has been previously processed using the same workflow and no errors were displayed.

Thanks for your attention and your time

sessionInfo() R version 4.0.0 (2020-04-24) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18363)

Matrix products: default

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

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

other attached packages: [1] CAMERA_1.45.1 MStractor_0.1.0 xcms_3.11.0 MSnbase_2.15.0
[5] ProtGenerics_1.21.0 S4Vectors_0.27.11 mzR_2.23.0 Rcpp_1.0.4.6
[9] BiocParallel_1.23.0 Biobase_2.49.0 BiocGenerics_0.35.3

loaded via a namespace (and not attached): [1] colorspace_1.4-1 ellipsis_0.3.1 htmlTable_1.13.3
[4] XVector_0.29.1 GenomicRanges_1.41.3 base64enc_0.1-3
[7] rmutil_1.1.4 clue_0.3-57 rstudioapi_0.11
[10] affyio_1.59.0 statip_0.2.3 codetools_0.2-16
[13] splines_4.0.0 ncdf4_1.17 doParallel_1.0.15
[16] impute_1.63.0 robustbase_0.93-6 knitr_1.28
[19] Formula_1.2-3 cluster_2.1.0 vsn_3.57.0
[22] png_0.1-7 stabledist_0.7-1 graph_1.67.1
[25] BiocManager_1.30.10 compiler_4.0.0 backports_1.1.7
[28] Matrix_1.2-18 limma_3.45.0 acepack_1.4.1
[31] htmltools_0.4.0 tools_4.0.0 igraph_1.2.5
[34] modeest_2.4.0 gtable_0.3.0 glue_1.4.1
[37] GenomeInfoDbData_1.2.3 affy_1.67.0 RANN_2.6.1
[40] dplyr_1.0.0 MALDIquant_1.19.3 vctrs_0.3.0
[43] preprocessCore_1.51.0 iterators_1.0.12 timeDate_3043.102
[46] stringr_1.4.0 xfun_0.14 spatial_7.3-12
[49] lifecycle_0.2.0 gtools_3.8.2 XML_3.99-0.3
[52] DEoptimR_1.0-8 zlibbioc_1.35.0 MASS_7.3-51.6
[55] scales_1.1.1 timeSeries_3062.100 pcaMethods_1.81.0
[58] SummarizedExperiment_1.19.4 RBGL_1.65.0 MassSpecWavelet_1.55.0
[61] RColorBrewer_1.1-2 gridExtra_2.3 ggplot2_3.3.1
[64] fBasics_3042.89.1 rpart_4.1-15 stringi_1.4.6
[67] latticeExtra_0.6-29 foreach_1.5.0 checkmate_2.0.0
[70] stable_1.1.4 svGUI_1.0.0 GenomeInfoDb_1.25.1
[73] svDialogs_1.0.0 rlang_0.4.6 pkgconfig_2.0.3
[76] matrixStats_0.56.0 bitops_1.0-6 mzID_1.27.0
[79] fda_5.1.4 lattice_0.20-41 purrr_0.3.4
[82] htmlwidgets_1.5.1 tidyselect_1.1.0 plyr_1.8.6
[85] magrittr_1.5 R6_2.4.1 IRanges_2.23.7
[88] snow_0.4-3 generics_0.0.2 Hmisc_4.4-0
[91] DelayedArray_0.15.1 sm_2.2-5.6 pillar_1.4.4
[94] foreign_0.8-80 berryFunctions_1.18.2 survival_3.1-12
[97] abind_1.4-5 RCurl_1.98-1.2 nnet_7.3-14
[100] tibble_3.0.1 crayon_1.3.4 jpeg_0.1-8.1
[103] grid_4.0.0 data.table_1.12.8 digest_0.6.25
[106] tidyr_1.1.0 munsell_0.5.0 tcltk_4.0.0

jorainer commented 4 years ago

This error might be related to issue #471 and should be fixed in xcms version 3.11.1 (or 3.10.1). Could you please update xcms (ideally with BiocManager::install("xcms") or alternatively with devtools::install_github("sneumann/xcms")) and try again?

Note that I would not do the gap-filling with xcmsSet,fillPeaks but always with XCMSnExp,fillChromPeaks.

MetabolomicsSA commented 4 years ago

Thanks for your help, the bug was fixed by reinstalling the updated xcms version. Thank you for your advice as well! I would normally not use "fillPeaks" , but i wanted to test if the error was on my end. Feel free to close the issue. Thanks again!

sneumann commented 4 years ago

Great, and have a good day! Yours, Steffen