sneumann / xcms

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

When I use xcms,I met error about mzR #507

Closed nyj123 closed 3 years ago

nyj123 commented 3 years ago

R 4.0.2 I use these packages.

(.packages()) [1] "xcms" "MSnbase" "ProtGenerics" "S4Vectors" "stats4" "mzR"
[7] "Rcpp" "BiocParallel" "Biobase" "BiocGenerics" "parallel" "stats"
[13] "graphics" "grDevices" "utils" "datasets" "methods" "base" And I also use X13cms,my code is

require(xcms)
require(x13cms)
getwd()
setwd('E:/Example/')
xs= xcmsSet(c('./C12', './C13'),
                                method= 'centWave',
                                ppm= 20,
                                peakwidth= c(20, 200))

and error,I don't know why! Failed to open file. Error in xcmsSet(c("./C12", "./C13"), method = "centWave", ppm = 20, peakwidth = c(20, : Chromatographic peak detection failed for all files! The first error was: Error in mzR::openMSfile(x, backend = backend): Unable to create valid cRamp object. 此外: Warning messages: 1: In serialize(data, node$con) : 载入时'package:stats'可能无用 2: In serialize(data, node$con) : 载入时'package:stats'可能无用 3: In serialize(data, node$con) : 载入时'package:stats'可能无用 4: In serialize(data, node$con) : 载入时'package:stats'可能无用 5: In serialize(data, node$con) : 载入时'package:stats'可能无用 6: In serialize(data, node$con) : 载入时'package:stats'可能无用

jorainer commented 3 years ago

Firstly, can you please show the result from sessionInfo()? It is crucial to understand which version of the packages you are using.

Secondly, this type of error usually indicates that mzR does not know how to handle the files you are trying to read. I would suggest you first try with a single file by actually specifying the full file name in the xcmsSet call.

Finally, the xcmsSet and related functions are no longer maintained, you should switch over to the new user functions and objects (see here).

nyj123 commented 3 years ago

Thanks a lot.And I try a single file and I meet the same error.And last I convert my files to centroid format, I can read these.

jorainer commented 3 years ago

OK, good to hear you could solve that. I'm closing this issue now. Feel free to re-open if needed.