Closed Anne-CharlotteD closed 1 year ago
Actually, with help of issue 611, using the function featureSpectra() on my XCMSnExp and then using $peak_id and $feature_id I succeeded to make a table linking the chromatographic peaks to the feature IDs. This should enable me to link the spectra object with the features which is what I was looking for! Therefore, unless you have any other advice to process multiple SWATH samples I suppose I can close this issue.
Dear Anne-Charlotte, seems you found a working solution. Thanks for reporting that - and sorry for my unresponsiveness/late reply, but I was on holidays...
Dear developers,
I am trying to process multiple (a test set of 3) SWATH files similarly as described in this vignette for 1 file. I did peak detection in MS1 level and MS2 level, all of which is stored in a XCMSnExp.
Then I ran reconstructChromPeakSpectra with return.type = “spectra”, which resulted in a Spectra object containing a set of reconstructed MS2 spectra of the peaks detected in the 3 files in MS1.
Because I worked with 3 files, I did correspondence (groupChromPeaks) to group the MS1 peaks across the samples, resulting in an updated XCMSnExp. Now I would like to link in some way the features with the spectra (object), but I don’t see how to do this. I do not even succeed in getting a table with the chromatographic peak ids per feature, which could serve as an intermediate step to link the reconstructed spectra to the features. I thought this would be possible using the peakidx column in the featureDefinitions table, but those listed values do not correspond with the peak ids that you get if you extract the peaks of a feature using chromPeaks(featureChromatograms()). This can also be seen in the example of the correspondence section of the LC/MS preprocessing vignette, wherein the peakidx of FT002 (47,272,542,...) do not correspond with the CP ids found a bit lower in the vignette, when using "chromPeaks(eic_2)" (this gives CP0055, CP0310, CP0595, etc.).
Anyway, my main question is if you could please advise me how to process multiple SWATH samples? Would you agree to first do the spectra reconstruction, then the correspondence and then trying to link the objects or results or would you change the order?