Closed Salonigupta3 closed 4 years ago
The problem is that the file "mgf/metlin-3598.mgf" does not exist within the xcms
package: the system.file
call returns an empty string.
system.file("mgf/metlin-3598.mgf", package = "xcms")
[1] ""
The code you are using does not query/export MGF files or MS2 spectra from Metlin, it is supposed to read one of the MGF files present within xcms (i.e. in the folder "mgf").
I've included only 3 MS2 spectra for which I created an mgf file based on the information I wrote down from the metlin website:
dir(system.file("mgf", package = "xcms"))
[1] "metlin-2724.mgf" "metlin-68898.mgf" "metlin-72445.mgf"
Thank you for the answer.
Then can you tell me how to export MGF files from Metlin? Or how did you created mgf file based on information from metlin website?
It would be a great help!
Unfortunately there is no mgf export in Metlin (or at least not that I know of). I wrote the information down manually from the metlin website - which was OK for the 3 example spectra, but not something one would/could do in a high throughput manner. Note that HMDB and Massbank allow to download/export MS2 spectra.
Thank you very much for your reply. And seems like I would use the other two databases now.
Dear Contributors,
I have recently started using xcms (3.11.4) in R(4.0.2) for metabolomics data analysis I was trying to use readMgfData function but got stuck in way and would really appreciate any help.
Match the consensus spectrum across metlin database
Why I am getting these options? I couldn't understand.
In some demo data set when I executed this step:
The options were not shown. Can anyone please answer this query? Thanks in advance!