sneumann / xcms

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

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘findChromPeaks’ for signature ‘"XMLDocument", "MatchedFilterParam"’ #710

Closed RbWick closed 10 months ago

RbWick commented 10 months ago

Hi, can someone help me? I encountered the following error while using the xcms package's findChromPeaks function to process XML-type data:The error message is: "Error in (function (classes, fdef, mtable): unable to find an inherited method for function 'findChromPeaks' for signature '"XMLDocument", "MatchedFilterParam"'.

X4 <- xmlTreeParse("A001.mzdata.xml") mfp <- MatchedFilterParam(fwhm = 20) res <- xcms::findChromPeaks(X4, param = mfp) Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘findChromPeaks’ for signature ‘"XMLDocument", "MatchedFilterParam"’

Here is the session info:

sessionInfo() R version 4.3.0 (2023-04-21 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale: [1] LC_COLLATE=Chinese (Simplified)_China.utf8 [2] LC_CTYPE=Chinese (Simplified)_China.utf8
[3] LC_MONETARY=Chinese (Simplified)_China.utf8 [4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.utf8

time zone: Asia/Shanghai tzcode source: internal

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

other attached packages: [1] xcms_3.22.0 MSnbase_2.26.0
[3] ProtGenerics_1.32.0 S4Vectors_0.38.2
[5] mzR_2.34.1 Rcpp_1.0.11
[7] Biobase_2.60.0 BiocGenerics_0.46.0
[9] BiocParallel_1.34.2 CorrectOverloadedPeaks_1.3.3 [11] XML_3.99-0.15

loaded via a namespace (and not attached): [1] tidyselect_1.2.0 dplyr_1.1.4 bitops_1.0-7
[4] RCurl_1.98-1.13 MassSpecWavelet_1.66.0 RANN_2.6.1
[7] digest_0.6.33 lifecycle_1.0.4 cluster_2.1.6
[10] survival_3.5-7 magrittr_2.0.3 compiler_4.3.0
[13] rlang_1.1.2 tools_4.3.0 utf8_1.2.4
[16] S4Arrays_1.0.6 DelayedArray_0.26.7 plyr_1.8.9
[19] RColorBrewer_1.1-3 abind_1.4-5 grid_4.3.0
[22] preprocessCore_1.62.1 fansi_1.0.6 multtest_2.56.0
[25] colorspace_2.1-0 ggplot2_3.4.4 scales_1.3.0
[28] iterators_1.0.14 MASS_7.3-60 SummarizedExperiment_1.30.2 [31] cli_3.6.2 crayon_1.5.2 generics_0.1.3
[34] robustbase_0.99-0 ncdf4_1.21 affy_1.78.2
[37] zlibbioc_1.46.0 splines_4.3.0 parallel_4.3.0
[40] impute_1.74.1 BiocManager_1.30.22 XVector_0.40.0
[43] vsn_3.68.0 matrixStats_1.1.0 vctrs_0.6.4
[46] Matrix_1.6-2 IRanges_2.34.1 MALDIquant_1.22.1
[49] clue_0.3-65 foreach_1.5.2 limma_3.56.2
[52] affyio_1.70.0 glue_1.6.2 DEoptimR_1.1-3
[55] codetools_0.2-19 gtable_0.3.4 GenomeInfoDb_1.36.4
[58] GenomicRanges_1.52.1 mzID_1.38.0 munsell_0.5.0
[61] tibble_3.2.1 pillar_1.9.0 MsFeatures_1.8.0
[64] pcaMethods_1.92.0 GenomeInfoDbData_1.2.10 R6_2.5.1
[67] doParallel_1.0.17 lattice_0.22-5 MsCoreUtils_1.12.0
[70] MatrixGenerics_1.12.3 pkgconfig_2.0.3

sneumann commented 10 months ago

Hi, thanks for asking. Here are two comments: 1) xcms uses mzR to do the I/O for the MS data. So no need to read with xmlTreeParse() 2) mzData support was removed from mzR several versions ago (check NEWS). Either you convert the mzData to mzML via e.g. OpenMS FileConverter, or you resurrect an older xcms/mzR version. Hope that helped, yours, Steffen

RbWick commented 10 months ago

Hi Steffen! The issue has been resolved. Thank you for your response.