xcms
xcms copied to clipboard
How to combine MS level 1 and 2?
The chromatogram() only can separately run MS level 1 and 2. How to combine MS level 1 and 2 after chromatogram() for peak detection and alignment? chromatogram(object, rt, mz, aggregationFun = "sum", missing = NA_real_, msLevel = 1L, BPPARAM = bpparam(), adjustedRtime = hasAdjustedRtime(object), filled = FALSE)
Thank you so much for your help in advance.
Fang
With the chromatogram
function you want to extract an ion chromatogram from the data. It makes only sense to extract such a chromatogram from either MS1 data or MS2 data, but not both.
In xcms
the main object is the XCMSnExp
that contains the link to the raw mass spec data as well as all xcms
results. In that object you will also have MS1 and MS2 spectra. chromatogram
is only used to extract certain data from that XCMSnExp
object for data visualization purposes. You should keep the XCMSnExp
and work only with that.