Dear All,
In addition to cluster formation, I'm interested in quantifying a specific ion in two different clusters. Therefore, after performing a clustering analysis, I used the following command:
segments <- MyFile$`r=2,k=10,s=64`$class
levels(segments) <- paste0("C",levels(segments))
MyFile_means <- summarizeFeatures(MyFile _peaks, stat="mean", groups=segments)
featureData(MyFile_means)
Then, I make 2 files resulting from these commands, and manually merge them in a table. I focused on the m/z values that were most likely to define a specific cluster and then examined the same ion in another cluster. I immediately noticed that the intensity values of the centroids were an order of magnitude different from the scale I see in the images—about 20 times higher.
So, for a specific ion of interest, I ran this other command:
cols <- paste0(levels(segments), ".mean")
write.csv(pData(MyFile_means), file="C:/MyFile_means_pData.csv")
intensity <-spectra(MyFile)[features(MyFile, mz=XXX),]
Then I marged the 2 file tables obtained.
Using the values obtained, I calculate the average, expecting results similar to the centroid values. However, the values produced by the spectra command differ from those generated by summarizeFeatures, though they seem more accurate compared to what I observe in the images. In some cases, I even noticed a difference with spectra command for a specific ion in two clusters, while summarizeFeatures showed no difference in average. I'm wondering why these differences occur and which value should be considered.
Thank you for your help.
M