sneumann / xcms

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

Cannot read mzdata.xml file #663

Closed chuyaowang closed 1 year ago

chuyaowang commented 1 year ago

I have some very old example data files that are in mzdata.xml format. The example script that comes with it reads in the data as

xs <- xcmsSet(c('./C12', './C13'), method= 'centWave', ppm= 20, peakwidth= c(20, 200)),

but when I run the code, it seems that this file type is no longer supported. The error message is

Scanning files in directory ./C12./C13 ... found 12 files 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 .mzRBackendFromContent(x): Could not determine file type for mypath/C12/081513ctrl12C1.mzdata.xml

I looked in msconvert trying to convert it to mzXML format, and mzdata.xml format is not supported in msconvert either.

sneumann commented 1 year ago

Hi, indeed mzData is not supported anymore:

https://github.com/sneumann/mzR/blob/master/NEWS#L20 https://github.com/sneumann/xcms/blob/master/inst/NEWS#L49

mzData is deprecated since ~10yrs, and in 2021 the parser caused too much pain to keep forward. You can use OpenMS FileConvert to convert mzData to mzML (even work under Linux), and should be a lossless conversion:

https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/2.7.0/html/TOPP_FileConverter.html

Yours, Steffen

chuyaowang commented 1 year ago

Thank you!

jorainer commented 1 year ago

I'm closing the issue - feel free to re-open if needed.