Closed hansenju closed 1 year ago
Hi Jule,
there would be two options to split an XCMSnExp
by isolation window. The first would be to use
split(swath_data, f = isolationWindow)
which should give you the data subsetted by isolation window - you would obviously need the variable isolationWindow
that defines the isolation windows (could be you have that already in fData(swath_data)$isolationWindow
.
The second option would be to use the filterIsolationWindow
function to subset swath_data
to the specified isolation window. The function would expect a single m/z value mz
and would return a subsetted object with all spectra with their isolationWindowLowerMz
<=
mz
and isolationWindowUpperMz
>=
mz
.
Hope that helps. Let me know if something is not working as expected.
Thank you very much, it's working as expected.
Closing this issue now. Feel free to re-open if needed.
Dear developers, thank your for the great xcms package. I am trying to use the MS2 data for a fingerprint analysis. My data (vDIA thermoscientific) is very similar to the SWATH data in the LC-MS/MS data analysis with xcms vignette. Since we don't want to identify specific compounds, I ran findChromPeaks() and findChromPeaksIsolationWindow() but skipped the reconstructChromPeakSpectra() step.
swath_data is a XCMSnExp object with the correct isolation windows. For my approach, single XCMSnExp objects containing the data of each isolation window would be very helpful because I would like to use the chromatogram() function in the next step. Is it possible to extract this information directly from the XCMSnExp object? My current approach is to use chromPeaks() and chromPeaksData() to access the information.
Thanks in advance. Jule