Closed michaelwitting closed 2 years ago
PS: Proteowizard and MSConvert are version 3.0.21079
what version of mzR
are you using?
2.28.0
Can I have some context ? Would that happen if you exported faahKO
that way ? Or was there ion mobility in the original mzML, removed/dropped while processing, and now turning up as NaN
? Yours, Steffen
Reproducible example:
library(MSnbase)
fl <- system.file("sciex", "20171016_POOL_POS_1_105-134.mzML", package = "msdata")
data <- readMSData(fl, mode = "onDisk")
data <- pickPeaks(smooth(data))
writeMSData(data, file = "test.mzML", copy = TRUE)
the mzML file contains now this funny ion mobility drift time spectra variable.
No, there was no ion mobility data in the original files. It is from a Sciex X500R QToF. I perform smoothing and centroiding using MSnbase
and then export to .mzML. I wanted to import a testfile into mzMine for some visualization then got the complain of the software that it cannot deal with nan
note that the ion mobility drift time is a default header column (spectra variable) that is returned by mzR::header
(similar to others like "scan window lower limit", "scan window upper limit" etc). In theory having this header info in the exported mzML file should not hurt - since it is supported by mzML.
I guess it is normally no hurting, but mzMine for example cannot deal with the nan
as value in there.
@sneumann , do you know by chance what the correct encoding for a missing value would be in mzML? I assumed that proteowizard
would handle that correctly...
Hm - strange. If the ionMobilityDriftTime
is NA
it should actually not be exported: https://github.com/sneumann/mzR/blob/master/src/RcppPwiz.cpp#L768:L770 - there must be something strange going on.
I checked the original .mzML file, there is no single mobility thing mentioned... strange... I have it already after reading the data with readMSdata
, but all the entries are NA
.
After performing smoothing and centroiding, still all of the are NA
I checked it via @featureData@data
yes, it seems to be a bug in my Rcpp code - in fact, NA
variables should not be exported, but it seems I'm not correctly testing for NA
.
Fixed in PR #267
I'm using the
MSnbase
writeMSData
function to export to .mzML after some processing. Using this export the .mzML than contains information on ion mobility, thought it was only normal QToF data. Values are set tonan
.Here is an example:
<cvParam cvRef="MS" accession="MS:1002476" name="ion mobility drift time" value="nan" unitCvRef="UO" unitAccession="UO:0000028" unitName="millisecond"/>
Discussion with @jorainer have led to this issue.
Any ideas?