Closed linlennypinawa closed 1 year ago
No, xcms
does not support between
or filter
and logic operations for filters. The only available filter for now is filterMz
as you already found and specifying an upper and lower m/z keeping all peaks with m/z within these.
The next large update of xcms
will use the Spectra package for MS data representation. So, in future there might be better and more powerful filters available.
Regarding your workaround - you can't put m/z data back into an OnDiskMSnExp
. you could however filter your data (using filterMz
) and then export it to an mzML file (using writeMsData
).
Thank you Johannes. It is not as clear as mud. Appreciate that!
I have an idea of cleaning up mz data by removing 'weeds'. They could be interferences. I read
methods-XCMSnExp.R
file. It seems to me the defaultfilterMz()
isrange(mz)
.Is it by any chance I could use filter() in R with between(), and logic functions, like
|
,&
, or!=
?The work around solution would be: extract spectrum data, manipulate mz data, and put back to MSnExp. Is it correct?