xcms
xcms copied to clipboard
bugs in the findChromPeaks functions
Hi
I used the demo code in the help page of findChromPeaks. The error has happened. Do anyone give some helps?
library(faahKO) library(xcms) fls <- dir(system.file("cdf/KO", package = "faahKO"), recursive = TRUE, full.names = TRUE) raw_data <- readMSData(fls[1:2], mode = "onDisk")
Perform the peak detection using the settings defined above.
res <- findChromPeaks(raw_data, param = cwp)
Detecting mass traces at 25 ppm ... OK Detecting chromatographic peaks in 937 regions of interest ... OK: 292 found. Detecting mass traces at 25 ppm ... OK Detecting chromatographic peaks in 1025 regions of interest ... OK: 405 found. Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘msLevel’ for signature ‘"XProcessHistory"’
Hees
Hi, I can't reproduce that here, and it does work at the BioC build farm
http://bioconductor.org/checkResults/devel/bioc-LATEST/xcms/
-> What is your operating system, which packages are you using ? Can you provide the output of
sessionInfo()
? Yours, Steffen
Hi Steffen,
The sessionInfo is here. This error happened today, although it could be works well last week under the same code.
sessionInfo() R version 3.6.0 (2019-04-26) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.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.6/Resources/lib/libRlapack.dylib
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] faahKO_1.25.0 shinylogs_0.1.6 ptw_1.9-13 cpvaExtend_0.0.1
[5] data.table_1.12.2 signal_0.7-6 reshape2_1.4.3 forcats_0.4.0
[9] stringr_1.4.0 dplyr_0.8.3 purrr_0.3.2 readr_1.3.1
[13] tidyr_0.8.3 tibble_2.1.3 tidyverse_1.2.1 CAMERA_1.41.1
[17] xcms_3.6.1 MSnbase_2.11.2 ProtGenerics_1.17.2 S4Vectors_0.23.17
[21] mzR_2.19.2 Rcpp_1.0.2 BiocParallel_1.19.0 Biobase_2.44.0
[25] BiocGenerics_0.31.5 DT_0.7 ggthemr_1.1.0 shinycssloaders_0.2.0
[29] plotly_4.9.0 ggplot2_3.2.0 shinythemes_1.1.2 shinyjs_1.0
[33] shiny_1.3.2
loaded via a namespace (and not attached):
[1] readxl_1.3.1 backports_1.1.4 Hmisc_4.2-0 plyr_1.8.4
[5] igraph_1.2.4.1 lazyeval_0.2.2 splines_3.6.0 crosstalk_1.0.0
[9] digest_0.6.20 foreach_1.4.7 htmltools_0.3.6 memoise_1.1.0
[13] magrittr_1.5 checkmate_1.9.4 cluster_2.0.9 doParallel_1.0.14
[17] limma_3.41.15 modelr_0.1.4 anytime_0.3.4 colorspace_1.4-1
[21] blob_1.2.0 rvest_0.3.4 haven_2.1.1 xfun_0.8
[25] crayon_1.3.4 jsonlite_1.6 graph_1.63.0 zeallot_0.1.0
[29] impute_1.59.0 zoo_1.8-6 survival_2.44-1.1 iterators_1.0.12
[33] glue_1.3.1 RcppCCTZ_0.2.5 gtable_0.3.0 zlibbioc_1.31.0
[37] DEoptimR_1.0-8 scales_1.0.0 vsn_3.53.0 DBI_1.0.0
[41] viridisLite_0.3.0 xtable_1.8-4 htmlTable_1.13.1 foreign_0.8-71
[45] bit_1.1-14 preprocessCore_1.47.1 Formula_1.2-3 htmlwidgets_1.3
[49] httr_1.4.0 RColorBrewer_1.1-2 acepack_1.4.1 pkgconfig_2.0.2
[53] XML_3.98-1.20 nnet_7.3-12 tidyselect_0.2.5 rlang_0.4.0
[57] later_0.8.0 munsell_0.5.0 cellranger_1.1.0 tools_3.6.0
[61] cli_1.1.0 generics_0.0.2 RSQLite_2.1.2 broom_0.5.2
[65] mzID_1.23.0 yaml_2.2.0 knitr_1.23 bit64_0.9-7
[69] robustbase_0.93-5 RANN_2.6.1 ncdf4_1.16.1 RBGL_1.61.0
[73] nlme_3.1-140 mime_0.7 xml2_1.2.0 compiler_3.6.0
[77] rstudioapi_0.10 affyio_1.55.0 MassSpecWavelet_1.51.0 nanotime_0.2.4
[81] stringi_1.4.3 lattice_0.20-38 Matrix_1.2-17 markdown_1.0
[85] psych_1.8.12 nloptr_1.2.1 multtest_2.41.0 vctrs_0.2.0
[89] pillar_1.4.2 BiocManager_1.30.4 MALDIquant_1.19.3 httpuv_1.5.1
[93] RApiDatetime_0.0.4 R6_2.4.0 latticeExtra_0.6-28 pcaMethods_1.77.0
[97] affy_1.63.0 promises_1.0.1 gridExtra_2.3 IRanges_2.19.10
[101] codetools_0.2-16 MASS_7.3-51.4 assertthat_0.2.1 withr_2.1.2
[105] mnormt_1.5-5 hms_0.5.0 grid_3.6.0 rpart_4.1-15
[109] lubridate_1.7.4 base64enc_0.1-3
Seems you have a mixture of Bioconductor developmental and release packages. This will lead to unexpected errors (like the one you experienced). You have xcms
package version 3.6.1 which is from Bioconductor release 3.9, but MSnbase
version 2.11.2 and ProtGenerics
1.17.2 which are the current developmental versions. You could install also the xcms
developmental versions (e.g. with devtools::install_github("sneumann/xcms")
and try again.
In general you should however ensure not to mix developmental and release version packages. I always install all packages exclusively with BiocManager::install
(where you can use e.g. version = "3.9"
to install packages from the current release, or version = "3.10"
to get the current developmental packages) and also update them by calling BiocManager::install()
from time to time.
Hi,
I ran into the same issue with the exampledata in the Metaboseek package and I could reproduce the error described by @13479776. I tried to fix it by updating everything to Bioc version 3.10. The problem still persisted at first (running xcms 3.7.0), but after getting 3.7.2 from GitHub, it works now, so this seems to be fixed :thumbsup: , at least on my system (can't speak for OP of course).
library(faahKO)
library(xcms)
fls <- dir(system.file("cdf/KO", package = "faahKO"), recursive = TRUE,
full.names = TRUE)
raw_data <- readMSData(fls[1:2], mode = "onDisk")
res <- findChromPeaks(raw_data, param = CentWaveParam() )
> res <- findChromPeaks(raw_data, param = CentWaveParam() )
Detecting mass traces at 25 ppm ... OK
Detecting chromatographic peaks in 39815 regions of interest ... OK: 2262 found.
Detecting mass traces at 25 ppm ... OK
Detecting chromatographic peaks in 39434 regions of interest ... OK: 2408 found.
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] faahKO_1.25.0 xcms_3.7.2 MSnbase_2.11.5
[4] ProtGenerics_1.17.4 S4Vectors_0.23.20 mzR_2.19.3
[7] Rcpp_1.0.2 BiocParallel_1.19.2 Biobase_2.45.0
[10] BiocGenerics_0.31.5
loaded via a namespace (and not attached):
[1] tidyselect_0.2.5 purrr_0.3.2 splines_3.6.1
[4] lattice_0.20-38 colorspace_1.4-1 vsn_3.53.0
[7] XML_3.98-1.20 survival_2.44-1.1 rlang_0.4.0
[10] pillar_1.4.2 glue_1.3.1 affy_1.63.0
[13] RColorBrewer_1.1-2 affyio_1.55.0 foreach_1.4.7
[16] plyr_1.8.4 mzID_1.23.0 robustbase_0.93-5
[19] zlibbioc_1.31.0 munsell_0.5.0 pcaMethods_1.77.0
[22] gtable_0.3.0 codetools_0.2-16 IRanges_2.19.14
[25] doParallel_1.0.15 MassSpecWavelet_1.51.0 preprocessCore_1.47.1
[28] DEoptimR_1.0-8 scales_1.0.0 BiocManager_1.30.4
[31] limma_3.41.15 RANN_2.6.1 impute_1.59.0
[34] ggplot2_3.2.1 digest_0.6.20 dplyr_0.8.3
[37] ncdf4_1.16.1 grid_3.6.1 magrittr_1.5
[40] lazyeval_0.2.2 tibble_2.1.3 crayon_1.3.4
[43] pkgconfig_2.0.2 MASS_7.3-51.4 Matrix_1.2-17
[46] assertthat_0.2.1 iterators_1.0.12 R6_2.4.0
[49] MALDIquant_1.19.3 multtest_2.41.0 compiler_3.6.1
>
Thanks @mjhelf for the feedback - yes, we're a little slow in pushing changes from github to Bioconductor, especially during development. For xcms
development versions is usually faster to install directly from github.
I just ran into the same issue with the 3.7.0-dev from bioconductor. The recent github version fixes the error for me, too. Thanks, guys!
sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.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.6/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] stringr_1.4.0 pcaMethods_1.77.0 CAMERA_1.41.1 xcms_3.7.2 BiocParallel_1.19.2
[6] MSnbase_2.11.6 ProtGenerics_1.17.4 S4Vectors_0.23.20 mzR_2.19.4 Rcpp_1.0.2
[11] Biobase_2.45.0 BiocGenerics_0.31.5
loaded via a namespace (and not attached):
[1] vsn_3.53.0 splines_3.6.1 foreach_1.4.7 Formula_1.2-3 assertthat_0.2.1
[6] BiocManager_1.30.4 affy_1.63.0 latticeExtra_0.6-28 RBGL_1.61.0 robustbase_0.93-5
[11] impute_1.59.0 pillar_1.4.2 backports_1.1.4 lattice_0.20-38 glue_1.3.1
[16] limma_3.41.15 digest_0.6.20 RColorBrewer_1.1-2 checkmate_1.9.4 colorspace_1.4-1
[21] htmltools_0.3.6 preprocessCore_1.47.1 Matrix_1.2-17 plyr_1.8.4 MALDIquant_1.19.3
[26] XML_3.98-1.20 pkgconfig_2.0.2 zlibbioc_1.31.0 purrr_0.3.2 scales_1.0.0
[31] RANN_2.6.1 affyio_1.55.0 tibble_2.1.3 htmlTable_1.13.1 IRanges_2.19.14
[36] ggplot2_3.2.1 nnet_7.3-12 lazyeval_0.2.2 MassSpecWavelet_1.51.0 survival_2.44-1.1
[41] magrittr_1.5 crayon_1.3.4 ncdf4_1.16.1 doParallel_1.0.15 MASS_7.3-51.4
[46] foreign_0.8-72 graph_1.63.0 data.table_1.12.2 tools_3.6.1 munsell_0.5.0
[51] cluster_2.1.0 compiler_3.6.1 mzID_1.23.0 rlang_0.4.0 grid_3.6.1
[56] iterators_1.0.12 rstudioapi_0.10 htmlwidgets_1.3 igraph_1.2.4.1 base64enc_0.1-3
[61] gtable_0.3.0 codetools_0.2-16 multtest_2.41.0 R6_2.4.0 gridExtra_2.3
[66] knitr_1.24 dplyr_0.8.3 Hmisc_4.2-0 stringi_1.4.3 rpart_4.1-15
[71] acepack_1.4.1 xfun_0.9 DEoptimR_1.0-8 tidyselect_0.2.5
By the way, the findChromPeaks generates error messages in the output now, but I get a XCMSnExp object with data back:
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 77979 regions of interest ... OK: 1700 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 61102 regions of interest ... OK: 1150 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 69176 regions of interest ... OK: 1399 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 74089 regions of interest ... OK: 1628 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 94852 regions of interest ... OK: 2188 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 104812 regions of interest ... OK: 2800 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 80982 regions of interest ... OK: 1705 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 87697 regions of interest ... OK: 1820 found.
Error in (function (x) : attempt to apply non-function
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 97705 regions of interest ... OK: 2140 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 94967 regions of interest ... OK: 2478 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 92317 regions of interest ... OK: 2285 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 122701 regions of interest ... OK: 4664 found.
Error in (function (x) : attempt to apply non-function
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 101437 regions of interest ... OK: 3071 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 108824 regions of interest ... OK: 3474 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 108786 regions of interest ... OK: 3448 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 104522 regions of interest ... OK: 2671 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 58047 regions of interest ... OK: 1748 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 115999 regions of interest ... OK: 3876 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 109743 regions of interest ... OK: 3748 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 119927 regions of interest ... OK: 4672 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 82970 regions of interest ... OK: 2336 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 124989 regions of interest ... OK: 5268 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 121456 regions of interest ... OK: 3711 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 115903 regions of interest ... OK: 3592 found.
Error in (function (x) : attempt to apply non-function
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 94997 regions of interest ... OK: 2378 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 120648 regions of interest ... OK: 5694 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 113454 regions of interest ... OK: 3776 found.
Detecting mass traces at 500 ppm ... OK
Detecting chromatographic peaks in 117146 regions of interest ... OK: 4141 found.