Hi,
I used xcms2 on my lcmsms and have successfully executed the following commands.
#Load all libraries
library(xcms)
#Create and spacify filepath
path <- "G:/msms"
files <- list.files(path, full.names=TRUE, pattern="cp.mzXML", recursive = TRUE)
xrawctrl <- xcmsRaw(files[1], includeMSn = TRUE)
peaks <- findPeaks(xrawctrl, method="MS1")
xs <- xcmsSet(files, method="MS1")
xfrag <- xcmsFragments(xs)
> xfrag
An "xcmsFragments" object with 5819 peaks in 912 Spectra
From Level 1 to 2 Number of Samples: 1 .
Sample 1 :
646 Peaks in Level 1
5173 Peaks in Level 2
Memory usage: 0.402 MB
I know that the searchmetlin is no longer available in xcms2. May i know how to extract the fragments with the parent ions out so i can do compound annotations ? I have tried the code as below but couldn't get it out.
xfragdata <- groupval(xfrag, value = "into")
write.csv(xfrag, file="xfrag.csv")
Thank you.
Regards.
Hi, the `xcmsFragments` is a rather old object class.
Your might want to look into the XCMS3 interface,
that heavily relies on MSnbase, which has much better
support for MS^n data. Yours, Steffen
Hi,
Thanks for the suggestion, i will look into your xcms3 in github,
Regards,
Goh.
We're actually currently implementing some potentially interesting stuff. In the next version you'll have a featureSpectra and chromPeakSpectra function that returns MS2 spectra related to a feature or chromatographic peak.
stay tuned.