Open yufree opened 7 years ago
Hi, I am always supporting a wide range of possible formats. Since the above code example does not contain any xcms specifics, one could use it right away with a spectrum from xcms. Maybe also add the precursor from xcmsRaw@msnPrecursorMz.
In the coming months @jamesrco aims to contribute some work on MS/MS to xcms, maybe then there is a chance to support formats like MSP (and/or MGF). Thanks, Steffen
Just one note: I would not add I/O code into xcms
but rather into mzR
instead.
Also, I suggest to use the new objects in xcms
for new code and implementations, i.e. the XCMSnExp
object and the OnDiskMSnExp
(or MSnExp
) from the MSnbase
package. These objects do already have linking between MSMS spectra etc implemented properly. In the long run the xcmsSet
and xcmsRaw
might be deprecated and eventually removed.
Understood from this angle. We were planning to adapt whatever product we end up with to operate on the XCMSnExp
and/or OnDiskMSnExp
objects, so that's no problem. If mzR ends up being a better place for the functions, that's fine too. More to come, will push some code here soon in the next few months!
I'd also like to see this feature, especially since MS-FINDER and a number of other structure-prediction programs require .MSP input.
Hi, I wonder if xcms 3 or MSnbase could add support for msp file as output for ms/ms search.
msp is a mass spectrum file format for MS/MS spectrum. It need precursor mz, fragmental mz, intensity and metadata to write such files.
The main advantage of this file is that user could use msp file to search MS/MS libraries from NIST or structure prediction. Also, user could use msp file for ms-finder to search MassBank, LipidBlast, GNPS and in silica structure prediction.
As for LC-MS data, I am using xMSannotator package to annotate the xcmsSet object. Msp output support could enable the LC-MS/MS data identification.
Actually in my enviGCMS package, I have written a very simple function(without metadata) to output msp file :
Also, in OrgMassSpecR package, author also implemented such function
WriteMspFile
in a text format from dataframe.I wonder if new object in xcms 3 could add method for this function. I am a starter for
MSnbase
and might not understand details for this class.Hope this help and thanks,
Miao