Open linlennypinawa opened 1 year ago
When executing findChromPeaks on a MSnExp object of my data, I came across the message as follows: "Your data appears to be not centroided! CentWave works best on data in centroid mode."
This message helps me understand the MS data. The output of readMSData()
is a XCMSnExp
container in which data is not centroided. [a XCMSnExp]@featureData@data$centroided
confirms it. Chromtogram() transforms the non-centroided data to centroided data. Centroid mode is the key for applying centWave approach to find peaks. In order to get centroided mode, I have to put argument centroided = TRUE
in readMSData()
.
However, I tested findChromPeaks() on MChromatograms and XCMSExp containers of provided data at LCMS data preprocessing and analysis with xcms. I did not get "Your data appears to be not centroided! CentWave works best on data in centroid mode."
May I suggest adding centroided
information to a XCMSnExp
container file?
I tested findChromPeaks() on MChromatograms and XCMSExp containers of provided data at LCMS data preprocessing and analysis with xcms.
I followed the codes, and reproduced figure 6(left). In this case, apply findChromPeaks to the XCMSnExp object.
Apply findChromPeaks to the MChromatograms object, I got:
The preferred approach is to:
OnDiskMSnExp
(with readMSData
`mode = "onDisk").XCMSnExp
. These will also contain the identified chromatographic peaks, adjusted retention times, features etc from the m/z - RT slice.There is the possibility to run findChromPeaks
also on MChromatograms
objects, but the results (if you use CentWaveParam
) can/will be different. The reason for that is a) the way centWave estimates the background noise. It can use the full data if it is done on a OnDiskMSnExp
, but it can only use the data within the single MChromatograms
if it is performed on the MChromatograms
. Also, the centWave peak detection performs slightly different between the two, because for the MChromatograms
there is no scattering of values in m/z dimension. So, the first step (detection of the region of interest ROI is omitted).
If you run centWave on a MChromatograms
it can help to lower the value for the snthresh
parameter to get comparable results.
Regarding centroiding - usually, that information is encoded in mzML files, so, if your data is centroided and stored in mzML files, this information should be correctly imported. AFAIK mzXML do not support the centroided information.
Anyway, like you said, an alternative is to set centroided = TRUE
in the readMSData
call (if you are sure that the data is in fact centroided). Otherwise, you can call centroided(xdata) <- TRUE
on a OnDiskMSnExp
or XCMSnExp
object to force setting the centroiding information.
It supposes to call on a
MChromatograms
object according to the manual, and it returns aXChromatograms
object, calledobject_1
for example.However, it works with a
MSnExp
object as well. It also returns aXChromatograms
object, calledobject_2
for example.Here are codes to generate plotChromPeakDensity from
object_1
.Here are codes to generate plotChromPeakDensity from
object_2
.Two plots look different. What is the appropriate route to group peaks?